Sign in to follow this  
immuner

Tnaslucency

Recommended Posts

Hello, What is the best way to do translucency (cpu or gpu). What would you reccommend as the best approach? Thank you

Share this post


Link to post
Share on other sites
Sure, but that is not enough. Alpha blending can give you a semi transparent effect, but you also need the object to be more bright depending on the light direction(simple dp) and i assume you also need to check the pixel intensity to get it darker in the dark areas and brighter in the bright ones right? I think the rest is on the alpha value in the texture which has to be specified according to the surface of the object....Am I missing something or this is fine?

Share this post


Link to post
Share on other sites
In the simplest case, you just do alpha-blending. Since you want to add lighting and texture, it is more complicated. It depends a lot on how you want the lit surface to affect the transmitted color. Also, the exact implementation also depends on whether you are using a shader or not.
Quote:
Original post by immuner
... and i assume you also need to check the pixel intensity to get it darker in the dark areas and brighter in the bright ones right...

That statement is not clear

Share this post


Link to post
Share on other sites
Quote:
Original post by immuner
Sure, but that is not enough. Alpha blending can give you a semi transparent effect, but you also need the object to be more bright depending on the light direction(simple dp) and i assume you also need to check the pixel intensity to get it darker in the dark areas and brighter in the bright ones right? I think the rest is on the alpha value in the texture which has to be specified according to the surface of the object....Am I missing something or this is fine?

You're describing two different things. The lighting and shading model are responsible for, well, lighting and shading. The blending model takes care of translucency. The three are very much compatible.

Depending on how many resources you're prepared to devote to the cause, you can trade off visual quality against processing time. A simple and cheap system would use vertex diffuse and specular lighting, bilinear texture sampling and alpha testing. A more expensive, but much better-looking system would additionally use per-pixel Phong lighting, displacement-mapping, trilinear anisotropic texturing and alpha-blending.

The headache comes from choosing the lighting and shading models. Alpha blending is cheap and unsurpassed, so you should probably use it.

We really couldn't tell you which shading or lighting model to use, as you have told us nothing about your goals and resources. If you'd like more specific advice, you'll need to be more forthcoming.

Admiral

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this