Opacity values are not working when exported

Discuss issues pertaining to the various game/web runtimes of Creature here.
Post Reply
Rakeshe
Posts: 3
Joined: Fri Jun 23, 2017 12:08 am

Opacity values are not working when exported

Post by Rakeshe » Tue Jun 27, 2017 2:07 pm

Hi Chong,

We are trying creature to animate a warrior character. There is an idle animation of the character with a stretched bow string and arrow in place, which loops. And then there is another animation, in which she releases the arrow and the arrow transforms along the x axis. The Bow string however straightens at release. So there are two images of the bow string, which are being used. One for stretched and one straightened after release. Their region opacities are being used to animate between the states.

The animation looks fine within the editor, but upon export to JSON file. Both the bow strings are visible at the same time, bypassing the opacity animations.

Can you please help us fix this issue?

Thanks
R

chong
Posts: 888
Joined: Thu Feb 19, 2015 2:21 am

Re: Opacity values are not working when exported

Post by chong » Tue Jun 27, 2017 3:30 pm

Hello,

What runtime is this for?
For UE4, you have to make sure you are doing something like this:
viewtopic.php?f=3&t=249&p=748&hilit=alpha#p748

For Unity, if you pick the correct shaders it should work. I just exported out an animation with animated opacity ( fading in from transparent to opaque ). I picked the "Alpha-Blended" shader and the transparent mesh regions displayed correctly.

For Phaser, I am not sure if their core runtime supports opacity fading yet for their shader:
viewtopic.php?f=1&t=308&p=1289&hilit=alpha#p1289

Rakeshe
Posts: 3
Joined: Fri Jun 23, 2017 12:08 am

Re: Opacity values are not working when exported

Post by Rakeshe » Wed Jun 28, 2017 4:11 am

Hi Chong,

Thanks for the prompt reply.

This is for the PixiJS WebGL runtime.

Best
Rakesh

chong
Posts: 888
Joined: Thu Feb 19, 2015 2:21 am

Re: Opacity values are not working when exported

Post by chong » Wed Jun 28, 2017 4:44 am

Hello,

Both the Phaser and PixiJS frameworks share the same rendering backend I believe.
I am not sure if they support alpha/opacity values for their rendering schemes right now.
As you saw from my previous thread about Phaser, I already have the code to activate opacity rendering on the Creature side. However, I have no control regarding the backend rendering portion.

If you can ask PixiJS what is the correct way to get transparent regions rendered with alpha values per vertex in WebGL, that will be great. I will be able to patch in the changes on my end to make it work.

Rakeshe
Posts: 3
Joined: Fri Jun 23, 2017 12:08 am

Re: Opacity values are not working when exported

Post by Rakeshe » Wed Jun 28, 2017 1:05 pm

Sure Chong. I will see if I can get those details for you.

However the guess the next best solution for the current issue would be to use image swapping. Will try and revert back.

Cheers

Post Reply