Can someone give a step-by-step for picomodel/mapmodel?


(rgoer) #1

I’m intrigued by the possibilities of using mapmodels with q3map2, but I’m not quite sure how to go about doing it. I’ve modeled my architecture in LW and saved it out as various .obj files, I’ve made my textures and UV mapped them to the geometry… now I just need to know how to go about getting it into Radiant. Do I need to still create a .qc file for these .obj files? How do I tell Radiant that the “foo.obj” model uses “foo.shader” as it’s texture? Sorry, I’ve just never tried this. By the way, does q3map_autoclip work like physics_clip or just normal clip? I mean, if you autoclip some mapmodels, will you get hit-marks when you shoot at them?


(system) #2

sorry i can’t help you with LW but in max5 you just build your geometry put the textures (or skin on it) and export the stuff as an .ase file.

You can also convert your gtk-radiant brushwork into an .ase file using this command in a .bat file:

"C:\Mapping-Tools\Q3Map2\q3map2.exe" -threads 2 -convert  -v -game wolf  "C:\Mapping-Tools\Wolfenstein\main\maps\cliptest.map"

To see your textures ingame you have to set up the correct path the textures (material-name) in your .ase file (to be opend with notepad).

*MATERIAL_LIST {
	*MATERIAL_COUNT 1
	*MATERIAL 0 {
		[b]*MATERIAL_NAME "models/mapobjects/fies_models/generator_skin.tga"		
*MATERIAL_CLASS "Standard"
		*MATERIAL_AMBIENT 0.7059	0.8118	0.5882
		*MATERIAL_DIFFUSE 0.7059	0.8118	0.5882
		*MATERIAL_SPECULAR 0.9000	0.9000	0.9000
		*MATERIAL_SHINE 0.1000
		*MATERIAL_SHINESTRENGTH 0.0000
		*MATERIAL_TRANSPARENCY 0.0000
		*MATERIAL_WIRESIZE 1.0000
		*MATERIAL_SHADING Blinn
		*MATERIAL_XP_FALLOFF 0.0000
		*MATERIAL_SELFILLUM 0.0000
		*MATERIAL_FALLOFF In
		*MATERIAL_XP_TYPE Filter
		*MAP_DIFFUSE {
			*MAP_NAME "Map #10"
			*MAP_CLASS "Bitmap"
			*MAP_SUBNO 1
			*MAP_AMOUNT 1.0000
			BITMAP "models/mapobjects/fies_models/generator_skin.tga"
			*MAP_TYPE Screen
			*UVW_U_OFFSET 0.0000
			*UVW_V_OFFSET 0.0000
			*UVW_U_TILING 1.0000
			*UVW_V_TILING 1.0000
			*UVW_ANGLE 0.0000
			*UVW_BLUR 1.0000
			*UVW_BLUR_OFFSET 0.0000
			*UVW_NOUSE_AMT 1.0000
			*UVW_NOISE_SIZE 1.0000
			*UVW_NOISE_LEVEL 1
			*UVW_NOISE_PHASE 0.0000
			*BITMAP_FILTER Pyramidal

To autoclip you need the q3map_clipmodel command in your shader.
I had problems to get the model clipped with this command but i selected the misc_model Entity and entered the key: spawnflags and the value: 2
The model will be clipped and you see marks on the surface.

I hope the explanaition is good enought with my english-skills. :slight_smile:


(rgoer) #3

Ok, one last question. If I get a .ase file for export, and edit it in Notepad to use the correct paths, how to I tell it that I want to use a q3map2 shader as its skin? Sorry, but how do I define a shader to be used by a model? Do I still put the shader into mymap.shader (where all the map shaders are)? Or do I put model shaders into a different file? And, since a shader doesn’t necessarily have a file extension, can I just leave the “.tga” off when I edit the .ase paths? One last thing: I still put my .ase (or .obj or anything) models at the baseq3/models/mapobjects/mymap/ path, right? Thanks a lot. And Fiesling–you were very helpful! I’m just that clueless.


(system) #4

You have to put the .shader file into your /scripts directory.
The shader got the same name like your .ase

For example i made a Generator. It’s name is just generator.ase and the skin is generator_skin.tga, witch can be in the /textures directory or with the model. It’s up to you how you like to do it.
I have this shader:

models/mapobjects/fies_models/generator
{    

	q3map_forcemeta 
	q3map_splotchfix    
	q3map_nonplanar    
	q3map_shadeangle 45    
	q3map_clipmodel
{
                map models/mapobjects/fies_models/generator_skin.tga
	blendFunc GL_DST_COLOR GL_ZERO
                rgbGen identity
     }

{
               map $lightmap 
               tcGen lightmap
               rgbGen identity
     }
}

Don’t forget to list the shader in your shaderlist.txt. :slight_smile:

[SNIP]
But /me got’s a problem too. Then i compiled with an old q3map2 version and looked with r_lightmap at my map the texture dissapeared like all other textures.
With the newer versions the skin of the model still shows up but the rest of my levels is in Lightmap view.
Any solutions? Is my shader bad? And yes it’s listed in shaderlist.txt and fresh compiled. :wink:


(hummer) #5

Man… I’ve been trying to find an answer for this stuff for months and no one could answer it… thanks Fies!

One question about md3s… you can’t simply open them up in notepad and change the shader name. So, if I were to export an md3… how do I go about setting the shader paths? Nphernos?


(system) #6

Check out this Link for a exporting Tutorial.

http://dynamic.gamespy.com/~polycount/ubb/Forum8/HTML/000809.html

There was a md3-fix Tool made by Ydnar, but i can’t find it any more on the shaderlab webspace. But i have it here at home and will upload it when i come back from work.


(hummer) #7

Ah man… perfect :slight_smile:

Now, only if there was such a tutorial for Maya… I think Maya is easier to use… I’m trying to learn both ATM :confused:


(Tigris) #8

Ok, the question is a bit off, but are ASE and MD3’s replaced by brushes/patchmeshes on compile? The reason I ask this is that if not, and if the q3map_clipmodel won’t do anything likewise (eg. building bruhes around the model automatically), then I could use this as a solution to another problem I’m working on ( http://www.splashdamage.com/forums/viewtopic.php?t=1795).


(sea) #9

the answer is yes. map objects (this includes all model types supported by the picomodel library, eg. md3 and ase) are turned into map geometry by q3map2 on compile. this also eliminates the need to package the actual model files with your maps.


(Tigris) #10

NOoooo :frowning: narf… Ok, thanks for the insight- Now I at least know that it can’t be done. Otherwise it would eat away silently- taunting “It could have perhaps been done, but you didn’t try…” :wink:


(ydnar) #11

They’re converted into drawsurfaces, not brushes or patch meshes. The difference is that drawsurfaces are only referenced by the renderer, and have no effect on the server/gameplay.

Course, q3map_clipModel is a totally different ballgame… :slight_smile:


(sea) #12

blepp. hi there y. nice to read you again.
:bump: