• Multiple materials on one model - doesn't work.
    14 replies, posted
I've applied different materials (and kept track of the filenames for Source to refer to when rendering materials) on the pipey thingy and the boltish thingies in this model. And I am sure the materials are correctly named and refer to the correct textures. But it still looks like this. [img]https://dl.dropbox.com/u/3550705/The%20Mod/wrongish2.png[/img] When I apply the same material to all of the parts of the model, it works. But of course I won't settle for that. Are there any limitations that I'm not aware of, or is there something potentially technically wrong with my model? I just started modelling this week, and things like this takes away all of my motivation. Thanks in advance.
This is entirely possible. I've done it myself several times. It would be helpful to see your qc file.
Yeah, post your QC. But you could see how's your SMD file inside by opening it with some notepad and then checking the material names. You need atleast 2 different names to be sure it's all right and the problem is only in the QC code.
Here goes. I know I misspelled artifact. [code]"$modelname" "artefact\drop.mdl" "$body" "drop" "drop.smd" "$staticprop" "$surfaceprop" "Metal" "$cdmaterials" "models\artefact" "$sequence" "idle" "drop.smd" "loop" "fps" "15" [/code]
and your VMTs?
[QUOTE=Aceid;27306381]Here goes. I know I misspelled artifact. [code]"$modelname" "artefact\drop.mdl" "$body" "drop" "drop.smd" "$staticprop" "$surfaceprop" "Metal" "$cdmaterials" "models\artefact" "$sequence" "idle" "drop.smd" "loop" "fps" "15" [/code][/QUOTE] Qc looks fine as long as both materials are in models\artefact. As Haxxer said, post your vmts.
The bolty thingies: [code]"VertexlitGeneric" { "$basetexture" "models/artefact/drop_bolt" "$surfaceprop" "Metal" "$model" "1" } [/code] The bolty thingie: [code]"VertexlitGeneric" { "$basetexture" "models/artefact/drop" "$surfaceprop" "Metal" "$model" "1" } [/code] They are just test materials. I make them fast and simple to see how the geometry looks ingame.
are you 100% sure that the VMT's names are the same as the textures you used on the model in 3DS Max?
I have tripple-checked. That's what's really confusing me.. To summarize; It works if i use the same material on all of the different meshes. The geometry is fine, regardless. The materials are fine; they work on other models. I am 100% sure that the bitmap images in the model are namned exactly as the materials used on the final model.
Have you tried selecting the objects (in elements) and dropping the texture from your desktop?
I will try that. [editline]9th January 2011[/editline] It didn't work. The only thing it did was making the texture visible in the perspective window. Is there any other way to do that by the way?
Using a Hex editor, open up the .mdl file and look at the last few lines. Right before the material path it should have all of the materials listed. Use that to check the materials.
Try adding this to the .qc [code] $texturegroup skinfamilies { { "vmt_1_name" "vmt_2_name" } } [/code]
[QUOTE=highvoltage;27311296]Using a Hex editor, open up the .mdl file and look at the last few lines. Right before the material path it should have all of the materials listed. Use that to check the materials.[/QUOTE] Both materials are listed there. Thanks for the help, though. [QUOTE=Jukka K;27311564]Try adding this to the .qc [code] $texturegroup skinfamilies { { "vmt_1_name" "vmt_2_name" } } [/code][/QUOTE] Nothing happened. Though now noticed that HL Model Viewer says "Model attempted to load one or more VMTs it can't find." in the "VMTs Loaded" box in the Model tab. This is really strange since both of my materials are in the same place and are named correctly.
It seems I have solved the problem by copying the contents of the missing VMT and pasting it to a new VMT with the same name. I have no idea why this worked, but it did. Most of the bugs with missing or should-be-working-but-isn't stuff in Valve tools seems to have the same solution. "Copy content and paste in new file." or "Rename and save. Change back and save again." This applies to missing particle systems, non-compilable maps and (apparently) should-be-working-just-fine VMT files. Well, thanks for helping me narrowing down the different sources of error, guys.
Sorry, you need to Log In to post a reply to this thread.