Transparency

Does anyone know the easiest way to make a shpere (or any other object) looks transparent? I think I may have to do something with alpha value, but I am not sure. I do not want a completely transparent. I actually want a blue sphere that I can still see what is inside of it. So, it would be a semi-transparent sphere. Thanks for any input.

Hello,
change your alpha value.
alpha is <hand wavvy here> “transparency”. actually, its not really. well, its argubably a reflection on how much light a given pixel contributes to the final scene, which isn’t QUITE the same thing (insofar as opaque surfaces can have non-one alpha values).

it all depends on your blending modes, of course, but set an alpha to be non-one and you should see stuff ‘appenin’, man. <nods>

cheers,
John

Hi, i think the easyest and fastest way to draw a transparent sphere is not to draw it!
It is fast and 100% transparent.

Hello,
for making a transparent object, do i have to set a blending mode in the initgl function? and how do i do that? (apart from changing the alpha value to 0.5 or less)

Thanx

Howdy,

well, you can set the blend function anytime you want with the

glBlendFunc(…, …);

there are man pages on this stuff all over the shop for parameter modes.

cheers,
John

Hmmm, not exactly anytime john. You can’t call glBlendFunc inbetween a glBegin/glEnd pair. I figured since you want to play topic police lately, I could play detail police.

well, yes, this is true. but my point was it wasn’t something that could ONLY be done at init, and then never again.

what’s this about topic police? I only get slighty narky about guys who post non-relevent non-opengl stuff to an opengl usegroup. its hardly being unreasonable.

you are right, of course. no state changes between glbegin/glend pairs. <looks stern> =)

cheers,
John

This reply is unrelated!