I3yG-MaK Posted August 8, 2007 Report Share Posted August 8, 2007 Well i have the model, then i aply the texture ( with a standart material ) and export it as smd, then y make the phys model, and export it ( with smd exporter with x normal ) Well i create the vtf and vmt: Here is the vmt "LightmappedGeneric" { "$basetexture" "models/luzcalle/luzcalle" "$model" 1 } The vtf and vmt are in --C:\Archivos de programa\Steam\steamapps\User\day of defeat source\dod\materials\luzcalle-- Well then i create the qc file: $modelname "luzcalle/luzcalle.mdl" $scale 1.0 $staticprop $body "Body" luzcalle.smd $surfaceprop "metal" $cdmaterials "luzcalle" $collisionmodel "luzcalle_phys" { $concave } $sequence idle "luzcalle.smd" fps 15 ACT_IDLE 1 qc and smd's are in --C:\Archivos de programa\Steam\steamapps\user\day of defeat source\dod-- Then i open the qc with studiomdl.exe and the mdl is compiled in --C:\Archivos de programa\Steam\steamapps\user\day of defeat source\dod\models\luzcalle-- Then i open the luzcalle.smd with hlmv.exe and he appear with purple & black squares texture. HELP PD: The model have the rotation edge 3 meters infront of model, how can i change that? Quote Link to comment Share on other sites More sharing options...
bitmap Posted August 10, 2007 Report Share Posted August 10, 2007 "LightmappedGeneric" { "$basetexture" "models/luzcalle/luzcalle" "$model" 1 } habe you tried removing one luzcalle from the path? Quote Link to comment Share on other sites More sharing options...
Wunderboy Posted August 10, 2007 Report Share Posted August 10, 2007 First of all, use "VertexLitGeneric" not "LightmappedGeneric". Second, you need to add "$cdmaterials materials/luzcalle" so that the model knows where to look for the textures. Basic rules for making textures are: 1) Although you assign a TGA/BMP/Whatever to you model when you export and compile, the model is looking for a VMT with that name, NOT a VTF. 2) You need to specify one or more $cdmaterials paths in your QC so the engine knows where to look for textures for the model. 3) Model VMT's should be in the folders specified by $cdmaterials. 4) Models use VertexLitGeneric as the shader type (except in some circumstatnces but thats for more advanced topics) 5) You need at least a $basetexure defined in your VMT which should point to a VTF texture. The paths assumes that it's under "materials" already so you should use something like "$basetexture "models/my_model/texturename". You DONT need the .vtf extension after the texture name. If you're still getting purple/black chequers and you're lost, try my MDLTexture Info tool. You can drag a MDL file onto it and it will tell you which folders it's looking in for textures and what VMT files the model uses. It can be useful working out if everything is where it should be. Quote Link to comment Share on other sites More sharing options...
I3yG-MaK Posted August 10, 2007 Author Report Share Posted August 10, 2007 OMFG IT WORKS!!! I exported the model with a TGA ast texture called luz calle ( as you can see there is a space ) and i called the vmt luzcalle. So the model was looking for luz calle.vmt. then i changed vertexlight and all worked. im your fan nº1 Wunderboy Edit: There is another problem, how i can change the rotation center? it seems to be 3 meters in front of the model Quote Link to comment Share on other sites More sharing options...
bitmap Posted August 10, 2007 Report Share Posted August 10, 2007 change the pivot in max or whatever program you use. like set the pivot to 0,0,0 Quote Link to comment Share on other sites More sharing options...
Wunderboy Posted August 11, 2007 Report Share Posted August 11, 2007 Warning: Don't uses spaces in your filenames. You should always use lowercase and use forward slashes "/". The reason is it screws up Linux servers that might end up running your content. As for the origin, the model's origin is the same as Max's i.e if your making something to stand on the ground, make it so it stands on the floor plane of the grid. 0,0,0 in Max is 0,0,0 in the model world. If you're making any kind of physics model, always move it so that the centre of the model is at 0,0,0 in Max. The reason is that any rotation is based on this point. I made the mistake of not doing this for a stick grenade model and it rolled around in a REALLY wierd way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.