Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: piere on August 03, 2013, 11:26:39 AM

Title: Changing the Alpha value for 3D actors
Post by: piere on August 03, 2013, 11:26:39 AM
Hello Is it possible to change the alpha color for 3D actors? Here is the code I am using:

Code: WME Script
  1. actor.AmbientLightColor = MakeRGBA(255,255,255,100); //100 being the alpha, tried other values as well, no luck

Is this how to do it ? I tried with jpg and png images and nothing works.

Let me know Thanks
Title: Re: Changing the Alpha value for 3D actors
Post by: dongo on August 03, 2013, 12:32:04 PM
i try your code and works fine for me and wme 3d demo.

i try with actor.AmbientLightColor=MakeRGBA(255,255,255,100); and actor.AmbientLightColor=MakeHSL(100,150,200); and the two work fine for me.

try with actor.AmbientLightColor=MakeRGBA(255,0,0,255);<--- The character change to red?? try with differents values and look the diference.

You can use Scene.AmbientLightColor but this affect to all 3d actor of the scene
Title: Re: Changing the Alpha value for 3D actors
Post by: piere on August 03, 2013, 09:02:10 PM
I dont need to change the colors, only the alpha. I just tried it in wme 3D demo just now and still it does not work. Changing the RGB values work, but I don't need to do that. I just need to change the alpha value, and that is not working.
Title: Re: Changing the Alpha value for 3D actors
Post by: piere on August 06, 2013, 10:33:02 AM
Can someone please help? Can 3D actor's alpha value be properly change? Thanks   ::rock
Title: Re: Changing the Alpha value for 3D actors
Post by: fireside on August 06, 2013, 10:43:52 AM
That's just the way the light hits the object, so it's asking a lot for it to disappear, which sounds like what you are asking.  If there's no code for it, you're kind of out of luck.  You would have to use a sprite or get it added to the next version.
Title: Re: Changing the Alpha value for 3D actors
Post by: fireside on August 07, 2013, 01:50:18 AM
I think the texture sets the alpha value, so you could change the texture to a texture with a different alpha value.
Title: Re: Changing the Alpha value for 3D actors
Post by: shuin on December 06, 2013, 11:04:31 AM
Hi piagent,

have you found a way to change the Alpha value for your 3D actor?
Title: Re: Changing the Alpha value for 3D actors
Post by: piere on December 06, 2013, 11:55:43 PM
Hi shuin, no I have not. I just set the texture's alpha value in Photoshop and save it as a png
Title: Re: Changing the Alpha value for 3D actors
Post by: metamorphium on December 10, 2013, 02:32:20 PM
You would need to do it through shader.