Author Topic: Problems with Transparency  (Read 252 times)

Shalmu Yakubov   «   on: May 05, 2012, 04:01:39 AM »
I export the 3Ds Max scene using Flare and load the scene to a stage. Everything looks fine so far, except for a few issues: the semi transparent objects. Please take a look at this:
http://217.151.77.254/~shalmoo/flare_test/
move a mouse to see how the scene moves.
As you may notice, some of the things are transparent, but their background is filled with scene.clearColor instead of being filled with the objects behind them. Some parts render fine, but only if the background parts are in the same mesh.
I have sent an email with this issue a couple of days ago, but never got a reply, seems like an email is lost in spam filters.

Thank you.

Delnatte Julien   «   Reply #1 on: May 06, 2012, 06:10:39 PM »
(sorry for my English)
I think it's a problem of render priority.
Transparent things are rendered before objects in background and the transparence is calculated without objects in background. Change the render priority for objects in front and the transparency will be calculated with the objects in background.

Ivan Vodopiviz   «   Reply #2 on: May 08, 2012, 03:06:44 PM »
Hi,

Have you tried adding an alpha mask filter to transparent materials?

Regards,

Shalmu Yakubov   «   Reply #3 on: May 10, 2012, 05:35:59 AM »
Hi Ivan,
The trick with transparency mask does work, but turns additional issues on. Take a look at this version:
http://217.151.77.254/~shalmoo/flare_test2/
I have applied the AlphaMaskFilter to each material here, everything is now correct, but all the masked edges are rough, no matter how big my antialias is set. Further more, it will never allow us to use semitransparent tgextures, which we intended to use a lot in our ongoing scenes.
We are about to purchase the awesome flare3d engine, this is one end only issue that keeps us apart from that step. If you need a 3d max file with this sofa scene, I will send it to you, just drop me an email address.

Ivan Vodopiviz   «   Reply #4 on: May 10, 2012, 10:20:51 AM »
Hi,

You can send us stuff to info @ flare3d.com. It's always useful for us to test scenes like yours and see what kind of improvements can we make to Flare3D.

Now, alpha sorting is kind of tricky when you're working with 3d. It is possible to use partial transparency, but you'll have to configure Flare3D's alpha sorting accordingly to get it right. You can see an example of this here in the wiki.

With regards to the alpha mask, try using a very low treshold value, and set the "layer" of your objects to something higher than 0. Something like object.setLayer(1 ); should do the trick. This will force those objects to be rendered after those on layer 0. This might even work even without the need of an alpha mask, but it'll surre take some trial and error.

Regards,

Shalmu Yakubov   «   Reply #5 on: May 10, 2012, 11:37:02 AM »
Thank you, Ivan. Yes, I set all layers to 1 before posting this forum thread, as well as read this article at wiki, but it didn't help.

I've tried your recommendations regarding low treshold value, it solved the anti alias, but brought even more sophisticated issues, for example the edges are not rough anymore, but they pass a background color in between the edge, which looks even more spooky than the high treshold levels :)

Nonetheless, I have sent an email (from shalmoo {at] gmail.com ) with the scene attached to it.
And eventually we have decided to purchase the Flare3D license, in hope that the newer exporter may fix the problem by default: this video http://www.flare3d.com/demos/car/video/ demonstrated that a new exporter definitely has much more new features than a public one.

Ivan Vodopiviz   «   Reply #6 on: May 10, 2012, 05:43:47 PM »
Hi,

We've taken a look to your scene. One thing you'll have to do is to separate transparent objects from non-transparent ones. For example, the MOON banners should be separated from the columns. The same goes for the lamps. That way, giving them appropiate layer values should solve your transparency issues.

Regards,

Shalmu Yakubov   «   Reply #7 on: May 11, 2012, 08:01:52 AM »
In fact, almost all objects in scene have a transparency. Anyways, we
have split the scene to meshes, set them to layers and bingo! It worked!
 Properly arranged to layers, the whole stage now looks as expected.
Thank you, Ivan!