Custom portal 2 model is blank [SOLVED]
Quote from Tinarg on August 30, 2015, 10:32 pmThis 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?
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?
Quote from Arachnaphob on August 31, 2015, 2:49 amDon't really know much about modeling, but you may want to try out:
- Code: Select all
VertexLitGeneric
{
$baseTexture "models/npcs/hover_turret/hover_turret"
}
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"
}
Musical website Moddb
Quote from josepezdj on September 1, 2015, 9:22 amI 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?
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?
Quote from Tinarg on September 1, 2015, 9:40 amOkay, 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.
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.
Quote from Tinarg on September 1, 2015, 4:25 pmK, 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.
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.
Quote from Tinarg on September 1, 2015, 4:31 pmI should also mention that the texture file is 2048x1024. Would it being twice as long as it is tall make a difference?
I should also mention that the texture file is 2048x1024. Would it being twice as long as it is tall make a difference?
Quote from josepezdj on September 1, 2015, 7:25 pmOK, you need the following 2 files inside your folder "materials/models/npcs/hover_turret":
- hover_turret.VMT
- hover_turret.VTFInside 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
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
Quote from Tinarg on September 1, 2015, 9:18 pmBoth 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.
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.
Quote from josepezdj on September 2, 2015, 2:27 amHmmm... 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?
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?