Jump to content
  • Advertisement
Sign in to follow this  
immuner

Tnaslucency

This topic is 4129 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!