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

Author Topic: [Resolved] Gradient Alpha Issue (renamed title)  (Read 1322 times)

Lunchbox

  • World Owners
  • ****
  • Posts: 136
    • View Profile
    • BrandNGames
[Resolved] Gradient Alpha Issue (renamed title)
« on: Dec 26, 12, 04:58:00 PM »

Not sure what is going on or if its something to do with my photoshop but now when I export white is solid and black is transparent, and when i use gradient things just go half transparent half solid depending on the camera angle. The later might be due to how my model is set up but the reversed alpha situation has got me totally stumped.
« Last Edit: Jan 17, 13, 09:38:46 AM by HE-Cooper »
Logged

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Re: Reversed Alpha
« Reply #1 on: Dec 27, 12, 07:15:50 AM »

Could you make an example in a Photoshop file perhaps and upload it somewhere?

Lunchbox

  • World Owners
  • ****
  • Posts: 136
    • View Profile
    • BrandNGames
Re: Reversed Alpha
« Reply #2 on: Dec 27, 12, 11:58:20 AM »

Here you are www.brandngames.com/ViralDawn/Issues/alpha_example.dds You will notice the solid part is all white. If I do all black it makes it see through for some reason. When I use gradient in the material options in max it gets even weirder.
Logged

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Re: Reversed Alpha
« Reply #3 on: Dec 27, 12, 12:59:24 PM »

Do you want something like this?

I selected the alpha channel solely, and painted with the black brush (opacity 100%) and saved it as DDS3. Painting over the selected "red" areas with a brush opacity different from 100% yields the effect you might want to have (semi-transparancy).

Attached 100% opacity. And where I put 78% opacity at random times (eraser at 22% opacity). Was this the effect you wanted to achieve?
« Last Edit: Dec 27, 12, 01:01:37 PM by PN-Dwight »
Logged

Lunchbox

  • World Owners
  • ****
  • Posts: 136
    • View Profile
    • BrandNGames
Re: Reversed Alpha
« Reply #4 on: Dec 27, 12, 01:36:14 PM »

Well this is what I was going for www.brandngames.com/ViralDawn/Issues/building.jpg The circled area is translucent well the top part anyway. This doesnt work in HE when I do this the gradient bugs out. Even the solid parts end up with faces either missing or what not depending on the camera.


As far as the white black thing I think i was confusing myself. Seems after 16 hours of importing exporting and texture tweaking will do that to you. Still not sure why gradient is bugging out though. I dont have a shot to show you unfortunately though. As gradient is the only way to do translucent as mask does straight 100 or 0 not inbetween.
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Gradient Alpha Issue (renamed title)
« Reply #5 on: Dec 27, 12, 01:40:18 PM »

We don't have a two pass alpha renderer, so you don't want use alpha blends outside of the UI.
Logged

Lunchbox

  • World Owners
  • ****
  • Posts: 136
    • View Profile
    • BrandNGames
Re: Gradient Alpha Issue (renamed title)
« Reply #6 on: Dec 27, 12, 01:43:59 PM »

This is what I get inside the engine www.brandngames.com/ViralDawn/Issues/InEngine.jpg

Not sure I understand completely. What do you mean outside the UI? Im just curious as to why I get different results in max using He material compared to in engine now, or is it possible something is screwed up on my end somehow.
« Last Edit: Dec 27, 12, 01:46:22 PM by Lunchbox »
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Gradient Alpha Issue (renamed title)
« Reply #7 on: Dec 27, 12, 01:47:24 PM »

I don't know what you're pointing to there, but if you use a gradient or "blend" alpha within the game world then it will arbitrarily sort with other alphas. If you are attempting to use an alpha blend in a texture and it's showing up black, then most likely you are exporting with the wrong DDS type, or using a bad exporter.

DXT1, 3, and 5, all refer to the types of alpha to be used, Test, Blend, None.
Logged

Lunchbox

  • World Owners
  • ****
  • Posts: 136
    • View Profile
    • BrandNGames
Re: Gradient Alpha Issue (renamed title)
« Reply #8 on: Dec 27, 12, 02:33:47 PM »

Trying to have translucent windows. Which work fine using He material in max but then bug out in the engine like the last shot. If I move the camera the polys effected change based on the camera angle.
Logged

grogbro

  • World Owners
  • ****
  • Posts: 117
  • ZOMBIES! YAY! RUN!!
    • View Profile
    • My Portfolio
Re: Gradient Alpha Issue (renamed title)
« Reply #9 on: Jan 02, 13, 08:28:33 PM »

It looks like to me like your actual model might be a bit messed up. Did you run an STL check on it to check the geometry (if you are using Max) ?