Hi there!
I'm currently working on a fern in 3dsmax for a HL2-mod. I started modelling 1 low-poly leaf of it and then put some together to get a bunch of them ![]()
For the leaf I simply use a picture of a real leaf, saved as a tga-file with alpha-channel.
Well, the alpha-channel kinda works, but not the way it's meant to be. In 3dsmax, everything looks fine, but in-game there is some strange error:
The first leaf I put for the model is shown correct. The second one is almost perfect, but doesnt work correct when being on front of the first leaf. The third one is correct except when it is in front of the first or the second leaf and so on... here's a picture showing the converted fern via hlmv with different rotation:
The numbers are for better orientation and show the order I placed the leafs within 3dsmax.
[Blocked Image: http://img82.imageshack.us/img82/7809/fern1fs2.th.jpg]
With leaf 1, everything is correct, there are no errors in viewing it
[Blocked Image: http://img174.imageshack.us/img174/884/fern2cp1.th.jpg]
Leaf 2 is shown correct for leaves 3-5, but on this picture u might see that leaf 1 is somehow shown IN FRONT of leaf 2, but should be hidden by leaf 2
[Blocked Image: http://img82.imageshack.us/img82/5541/fern3en7.th.jpg]
Leaf 3 isn't shown correct if leaf 1 or leaf 2 are behind it. Somehow leaf 1 can be seen at the front, the viewer places leaf 3 BEHIND leaf 1 and leaf 2, but it should be at the front.
[Blocked Image: http://img183.imageshack.us/img183/5436/fern4ft6.th.jpg]
Here's some close-up screenshot. There's leaf 4 in the front, but get's rendered by hlmv in the back, showing leaves 1-3 first.
I don't know what I'm doing wrong and it's really weird. Here is my complete .vmt for the fern-texture:
"VertexLitGeneric"
{
"$baseTexture" "(removed)\plants\fern\Fern3"
// Used by a model
"$model" 1
// Using alpha-channel
"$translucent" 1
// Shows back-faces. Needed, because otherwise I can't see
// the downside of the leaf.
"$nocull" 1
"$compilepassbullets" 1
}
Display More
Is there anything wrong or missing here?
Another problem is that white line around my texture. The line isn't visible when viewing the model very close (see picture 4), but from some distance the white line gets ever thicker, making the model look stupid and not fitting the green / brown-colored rest of the forrest.
But the alpha-channel fits perfectly...
Hopefully someone can help me
I would be REALLY thankful for any help I get!!!
I already wasted 3 days with reading tons of pages of Valve's documentation and trying many things, but couldn't find anything useful.