HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Gradient alpha problem  (Read 1449 times)

Dencii

  • Developer
  • *
  • Posts: 6
    • View Profile
Gradient alpha problem
« on: Oct 06, 13, 01:33:10 PM »

Hi everyone.

So the main problem is when I have the Alpha Type set to gradient, parts of the mesh becomes see through or semi transparent in the engine. When I switch to anything else, it looks fine but then I lose the gradient alpha. Mask as Alpha Type works but it doesn't look good.

Another problem seems to be that when I set the alpha to Gradient before exporting with Maya, the mesh loses collision once in HE. My workaround is to export the mesh with Alpha Type set to None and then use the override in the engine to change the alpha setting. I just thought mentioning this could help with my main problem.

I  save my textures as DTX5 by the way. And this seem to happen with all my assets and all my textures.
Logged

Dencii

  • Developer
  • *
  • Posts: 6
    • View Profile
Re: Gradient alpha problem
« Reply #1 on: Oct 06, 13, 01:37:18 PM »

Here's without gradient alpha
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Gradient alpha problem
« Reply #2 on: Oct 06, 13, 03:12:05 PM »

There's no per pixel alpha sorting, so alpha blended textures will arbitrarily sort with other alpha blended textures.
Logged

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Gradient alpha problem
« Reply #3 on: Oct 07, 13, 09:49:49 AM »

Precisely what Cooper said.  When using gradient alpha it determines what renders on top of what on a per-object basis (using their center point).  In the current renderer, polygons within the object are not checked against each other to determine proper ordering.

Due to the performance cost many modern games still rely primarily on hi-res 1-bit alpha (mask) or on designing their assets such that transparency is not needed.

Looking at the screenshot there, I'd guess that the alpha is intended for the thatching hanging off the roof?  You might try just using the mask alpha.  If you can't get it clean enough, try using a separate material on just the polygons that actually need the alpha.  That way you can use much more texture space in a second texture to do the alpha.  This of course increases the performance cost for that asset, so use that technique sparingly.


The loss of collision is interesting though.  What version of Maya are you using?  Are you using the most recent version of the art pipeline?  If you turn on "View Physics Data" in the physics panel, do the assets have a physics representation?
Logged