Page 1 of 1

LOD Tree

PostPosted: Wed Mar 14, 2012 3:28 pm
by andy4729
I'm trying to create an LOD model for a custom tree for my mod. I have it all working except one thing.

The original tree model has a 3d trunk and I've used lots of flat planes to create the branches. For the LOD model I have the trunk and two flat, vertical planes, perpendicular to each other to act as the branches (created these from a render image). These two planes have alpha channels on their texture. In total the tree model (with the lod model) has 3 textures. One for the trunk, one for the small individual branches and one for the all the branches combined for the LOD model.

The problem is that when the LOD model activates, the model goes from the original tree to just the trunk, the two flat planes of the LOD model cannot be seen which obviously is wrong. Here's my vmt for the material that isn't showing:

Code: Select all
"VertexLitGeneric"
{
   "$color"            "[1 1 1]"
   "$baseTexture"         "models/tree01_lod_flat"
   "$selfIllum"         0
   "$alphatest"         1
   "$alpha"            1
   "$nocull"            1
}


Sorry if that was a crappy explanation, did my best lol.

Thanks
Andy

Re: LOD Tree

PostPosted: Wed Mar 14, 2012 8:17 pm
by Rick_D
I found that if you try to introduce a new texture to a LOD that isn't used in the original mesh that it won't show up - have you tried just putting that texture on a small triangle somewhere on the LOD0, and see if that works?

Re: LOD Tree

PostPosted: Wed Mar 14, 2012 8:39 pm
by andy4729
Sorted it.

I thought it may be the case that having a new texture might cause it to not work quite right.

What I did was apply the small branch texture to the two lod planes and then in the qc i has a replacematerial line for the lod which replaces the small branch texture with the flat plane texture when the lod model is activated :).