Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / How to adjust object transparency?

Author
Message
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 25th Feb 2016 11:29
How to adjust level of transparency for a 3D object?

We can use SetObjectTransparency( objID, mode ) to set transparency on/off, but how to change how transparent an object looks?
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 25th Feb 2016 11:38
I think the best way is just to colour the object pure white but with the alpha channel set to what you need.... like SetObjectColor(obj,255,255,255,alpha) - not sure what the exact command is to colour an object.
hakimfullmetal
9
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 25th Feb 2016 19:02
Thanks.

But it seems that SetObjectColor() alone does not make an object transparent.
The object does look transparent if I called both SetObjectColor() and SetObjectTransparency()

That is, If my eyes does not deceive me.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 25th Feb 2016 19:33
Yeah, makes sense that it's default to opaque, layers of alpha transparency can cause slowdown.

Login to post a reply

Server time is: 2024-04-26 18:52:50
Your offset time is: 2024-04-26 18:52:50