Please or Register to create posts and topics.

Custom portal 2 model is blank [SOLVED]

Page 1 of 2Next

This is my first time making a custom model for Portal 2, or any Source game for that matter. I've exported the model and I've gotten everything working except the model is white with no shading or anything.

http://i.imgur.com/8zEkvD9.png

There aren't any errors in the console, so I don't think its a missing texture. The model's VMT file is a barebones basic

LightmappedGeneric
{
$baseTexture "models/npcs/hover_turret/hover_turret"
}

I was gonna start refining things like the vmt file after I got it working. What's wrong here? Am I doing something wrong that's embarrassingly obvious?

Don't really know much about modeling, but you may want to try out:

Code: Select all
VertexLitGeneric
{
$baseTexture "models/npcs/hover_turret/hover_turret"
}
When life gives you lemons, make apple juice and have everyone wonder how you did it.
Musical website Moddb

I just tried it. It's still blank.

I think your model must be looking for a different material location. I use to check out the .MDL file with a Hex Editor and look at the bottom part of the code, where the path and materials that the model is looking for are readable.

Could you post a screenshot once you open it with the hex editor and scroll down to the bottom part?

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Okay, I'll try looking at it when I get home.
I remember that the SMD file had "Texture.png" listed every other line, which was the name of the texture when the model was being made in Blender. I used a find and replace to replace them all with the path to the actual textures, but it still didn't work. Maybe that's why it's not working to begin with.

K, checked it out, and this is what it looks like:

http://i.imgur.com/PIVKKrK.png

The directory looks right. The model files are in models/npcs, and the texture files are in materials/models/npcs/hover_turret.

I should also mention that the texture file is 2048x1024. Would it being twice as long as it is tall make a difference?

OK, you need the following 2 files inside your folder "materials/models/npcs/hover_turret":

- hover_turret.VMT
- hover_turret.VTF

Inside the VMT file of course you must use the shader VertexLitGeneric as Arachnaphob already said, and the path already mentioned for the texture:

Code: Select all
VertexLitGeneric
{
$baseTexture "models/npcs/hover_turret/hover_turret"
}

You mentioned you replaced the "texture.PNG" inside the .SMD reference file.... by "hover_turret.VMT"? this is important to check out before compiling the model...

Check these things out and confirm if all is ok.

About the texture size, as long as it is proportional to the one used in Blender, it is fine. I use to make textures double the original size when I need more detail in any model that I reskin ;)

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Both the VMT file and the VTF file are in place. VMT's code is exactly that. In the SMD file, I replaced Texture.png with modelsnpcshover_turrethover_turret before compiling the model.

Hmmm... you shouldn't have replaced the part 'Texture.png' with the whole 'modelsnpcshover_turrethover_turret' part, but only with 'hover_turret' and you can also add the extension in the way, so: 'hover_turret.vmt'. The reason is that in your .QC file you already added the path for the model's materials.

Can you post the content of your .QC file and also say the folders where you have the files before compiling the model please?

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]
Page 1 of 2Next