Page 1 of 1

Z Transparencies How To

PostPosted: Wed Apr 28, 2010 2:49 pm
by andylegate
Okay, I had brought this up in another thread:

Remember I was trying to create ripples like we see in the water of the Hoods, Gira, the Ferry Dock, etc.

Part of the problem I was having was the ripple texture is transparent, as the Waveset, or the texture for animated texture water is.

By placing the ripples mesh over the water mesh, I was getting the X-Ray or See Through affect.

Image

In the picture above (ignore my lousy blending, heh), if you look towards the bottom, you can see where you can see through the ripples as straight through to the bottom of the well, as though the water texture is not even there.

In Blender we took care of this by setting the Passindex on the objects. The mesh with the water texture would have a lower passindex number than the mesh that had the ripple texture. So like the water mesh would be set to "1" and the Ripple mesh would be set to "2"

Well after a lot of looking around, I couldn't find anything like that in Max or with the Plugin.

However, I did find it by using PrpShop and looking at the materials assigned to things like Ripples. The answer was: "No Z Write"

Only do this to the mesh that has your ripples. leave the "bottom" mesh (your water) alone.

Open up the Material Editor after selecting your ripples (or what ever it is), and select the material for that mesh. Open up the roll out box for "Advanced Parameters" (at the top of your Material). Place a check mark where it says "Z No Write"

Image

That's it. That's all you need to do. Export and check out your ripples now:

Image

Ripples with proper blending this time, hehehehe.

Re: Z Transparencies How To

PostPosted: Thu May 06, 2010 9:26 am
by TheMagician
Hey Andy,
a question concerning the blending (fading out) of the ripples. Did you add a "Water Decal" component to these ripples? Because I have a blending problem when I use it. In its rollout it says that vertex color "red" stands for opacity. However, if I change the the color of some vertices to red and change their opacity settings in Max, they are displayed black in the game and not transparent. Without the "Water Decal" component everything works normally.

Re: Z Transparencies How To

PostPosted: Thu May 06, 2010 10:28 am
by andylegate
No I didn't use Water Decal for the ripples. Isn't that used for things like the lily pads in Kemo?

For plending, I used one of the Alpha blend textures that looks like a white strip that gradually darkens to black, oriented with the black part at the bottom. I made it my top layer, using Plasma Standard as my material.

Re: Z Transparencies How To

PostPosted: Thu May 06, 2010 10:38 am
by TheMagician
Thanks for he info :)