MapObject Model Question...


(neotic) #1

If I have a UV mapped .OBJ file(non-animated) and a .TGA texture file, how would I go about converting it to an MD3 file for insertion in a map?

I have tried importing it into Gmax(imports correctly), but upon exporting to MD3, it doesn’t have any texture in radiant. I’ve tried applying a shader to the model, however it still does not display correctly.

Any help?


(Aikon) #2

Well, I haven’t really started the modelling, but I can however give you a great site which I have looked through before. It’s milkshape, but I think it is about the same. www.paposo.com

Hope this helped.


(¤SoS¤fre2d) #3

In 3ds max: You need to apply the .tga as a bitmap material to the model (in the diffuse slot), and have the “display texture”-box checked in the material editor´s top level. Do NOT check the “display texture”-box in the diffuse subtree, then it wont work. You also need the texture to be in same library in the game as when you export it from 3ds max, becuase the path to the texture (and model too) is encoded in the md3. Why? I dont know…


(neotic) #4

Hmmm…

That Milkshape model tutorial definatly helped… I haven’t been using any sort of “control” file before, that might be what is needed.

Fre2d, can you explain how to do that in Gmax? :slight_smile:

No money for 3ds max or anything else that cost…


(ausman) #5

what I did to build my models is construct all my brushwork in Gmax, export it to milkshape and texture it, then export it to md3 with the help of the control file. A bit of a hassle but it works.


(zl1corvette) #6

you can do it all in gmax
What I would suggest is put all your files (textures and model) in models/mymapname then make sure all your paths in gmax point to there new spot. Then simply use this plugin http://home.comcast.net/~lowkory/ExportMD3_gmax_beta1.zip (the one you have might work or even be the same but this one does export the normals correctly) and just export to md3 in your models/mymapname directory. This should fix any path problems you were probaly having. :banana:


(MacGyver) #7

Hey this is the guy that neotic was posting for…

Covette, could you explain how to set paths inside Gmax?

Here is what I have been doing so far:

Importing an .obj file that has UV mapping and a .mtl(obj’s material file) that links it to a certain TGA texture.

The model appears fine inside Gmax, but upon exporting it, I find it has no texture applied inside radiant.

I’ll try with the paths again, but I don’t know how to set paths or anything inside Gmax.

The Milkshape control file and export worked for all but one of my models, but milkshape keeps crashing on it.

The last model, has about 1500 vertex’s, and 1500 UV coords, but accourding to Gmax, it says I have 4600 vert’s(I don’t know how). And that this is over some limit.

Does anyone know how to get around that limit or something?

Also, does anyone know how to set up mapobject model’s with transparecy based on the Alpha channel of a .tga file?

I know that you can do it with shaders, but not sure if you can with md3’s and model’s.

Any help?


(zl1corvette) #8

I am not really familiar with obj & mtl files but,
If you see your textures in gmax everything should be okay, but to check that your materials point to the right spot click on the material navigator (three balls on toolbar), then double click on any of the materials to edit it. Like I said before make sure all your project files (textures, models) are in your models/mymapname directory and that your materials point to those textures. If for some reason it still doesn’t work try
http://dl.fileplanet.com/dl/dl.asp?q2pmp/NMD3C.zip
you can edit the texture paths with this.


(The Wanderer) #9

I’m not sure how you do this on Gmax

I’ll explain it how to do it in 3dmax when using a shader(as you should) for your materials.
For 3dMax:
First grab the md3 exporter from here
In max in the material editor press the button next to diffuse(or you can press the None button next to diffuse color in the maps rollout)
Double click bitmap.
select any image file you want or even press cancel…this is completely irrelevant as this image will not be used for anything. However it’s best to use the image you will use in your shader because this is the image you will see in max for that material so this way you can check your UV mapping.
In the name field (this is the field next to Bitmap at the top of the window) enter the shader name.(as in textures/somemap/someshader)
Go up one step(to parent material) and enter the same shader name in the parent name field also.
Apply material and export.
If you have multiple textures/shaders/etc you want to use then do the same thing but use a multi-subobject material instead of a standart one.


(Orange) #10

The Wanderer, I have edited my terrain with EasyGen, generated an Alphamap by heights and then saved the HeightMap and the AlphaMap.
Then I opened 3dsmax and used the heightmap with displace to create the terrain, then I applied the Alphamap to the terrain and converted it to Editable Mesh.
I selected the areas I want to each texture and assigned them numbers in the Surface Properties rollout.
When I was done I created a Multi/Sub-Object material and did as you said (with the shader name in the Name box on the Multi/Sub-Object material, on the material itself and on the bitmap)
Then I exported it using the md3 exporter you gave and created a misc>model entity to load it in gtkRadiant but I only had one texture applied for all the terrain.

Did I miss something? Did I do something wrong?


(The Wanderer) #11

I have never made terrain with max and so I’m not sure how to do it or if it’s even possible. You have to realize that the blending on the terrain is done by the engine through the shaders NOT by max. Terrain entities are treated specially by the compiler which alters the alpha value of the vertices to perform the blends. If you make a terrain with easygen, load it in radiant and then check its properties, you’ll see that there are a lot of keys that go in it to define its properties. Your first job it to start adding these keys(alphamap,terrain, layers etc…) in your max terrain and hope that it works, but i have my doubts.
Your best bet is to forget about alphamaps etc and instead use alphaMod brushes to perform the blends. This might take a bit longer but it will definitely work. Except if your model is a miscgame_model in which case it probably won’t since they’re not compiled.
Which reminds me: why are you making your terrain a model? It’s just a lot more extra work. The only reason I can think of is to have more control over the shape since you have a lot more freedom in max, but in your case you’re just importing the easygen heightmap which means you’re not getting any of the “max benefits”(unless of course you’re tweaking it further in max). Why don’t you just use the easygen exported terrain directly ?

OFF-TOPIC RANT: Can the powers that be please change the time before the forum logs you out when you’re inactive. Everytime I type a semi-long response it logs me out. Some of us are a little slow and it takes us a while so please…


(Orange) #12

I wanted to use max because I am much more comfortable with it and whenever I try to texture my terrain in Radiant it drives me crazy and I just close everything and go to see if there are any good movies on TV…
When I saw it is possible to use max and the textures will be imported into gtkRadiant, I opened max and sang Haleluja while it was loading…
But now it doesn’t work as I expected.


(The Wanderer) #13

My advice is use easygen for your terrain. It’s very easy to use and makes texturing it a breeze.


(badong) #14

one you get the hang of easygen it’s easy, but it takes a while to get there. What with all the shader thingies that need changing and what have you. It does do some very nice blending though.

What I would say about max, is that the game (md3 I guess) is very specific about what it will take and what it won’t. Most texturing options from max will not work, and it’s hard to figure out the right combinations of things that work. What i know that works is, diffuse map, UVW map, UVW unwrap and multi sub-object. I tried a bunch of different other material types (like blend) but none of them worked. I think actually that the game only recognizes the UVW map and the texture file associated with it, cause if you try to edit the mapping paramaters that come with each material and the diffuse map, they don’t do anything.


(Orange) #15

I used EasyGen but when I saved the map (as .map file) the whole terrain had one “Terrain” texture and I was just wondering why all the fancy blending and the texturing if they aren’t used?


(MacGyver) #16

Small update:

Well, even though Milkshape crashes everytime I try to get it working, I managed to get it working in Gmax thanks to zl1corvette’s help on finding the materials button(Do you know why the “main” toolbar is hidden in the Tempest Pack? I had to search forever just to find those 3 little balls) and ¤SoS¤fre2d’s help about putting it in the right directory and applying it as a “diffuse” channel as a bitmap.

I now have this monster of a model loaded into radiant and it looks all textured…

The next part is getting Q3 to blend the alpha channel of my .tga file correctly, but I think there is a radiant tutorial on alpha shaders somewhere that will probably get me set up correctly.

Thanks all for the help!!!

I’m really glad to know that I can do it in Gmax, as milkshape will expire soon


(neotic) #17

Macgyver and I have run into some trouble. Notice in the following pictures:

In picture one, on the yellow bulb, white lines are drawn to mark every face. This picture was taken in an non-lit map. If you stand near the model, its not very noticable. However, if the viewer moves further away the model gets smaller and the lines do not. Eventually they will cloud your view of the model. If this is even relevant, I do not know, I am not a modeler. I just recognize the problem.

In picture two, we lit the map. The problem here is that each face of the curves and contours of the yellow bulb is lit differently and the changes have a great deal of contrast. How could we go about fixing this? Is vertex smoothing, limiting the number of faces, an option?

:angry:

heh thanks! soon as we get this fixed I should be able to release my first beta of Ruins.