Author Topic: See through edges of alpha textures  (Read 10588 times)

тғc

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 2835
    • View Profile
    • TFC's YouTube
See through edges of alpha textures
« on: July 28, 2016, 03:07:10 PM »
I'd like to re-open this discussion please  ;)

http://forum.mx-bikes.com/index.php?topic=104.msg11174#msg11174

I've recently started learning Blender so figured I'd give it a proper try. There is absolutely no way I've found to get rid of these 'halo's'.

I understand that Snappe has said the problem will always be present to some degree, and I understand PiBoSo has said that the reason stock tracks don't have this issue is because of the way the trees are made, but I'm not convinced.

I've also seen the odd video of GP Bikes where a custom track is used and the issue is not present.

Some trees on the stock tracks are indeed made using a trunk, but others are not, and the ones that are just 2 planes (or 4 if each are flipped to get the texture on both sides) and these don't suffer with this issue at all.

The problem I have right now is that I can no longer work on a track because the issue is so visible.. So..

Any tips for fixing this in Blender?

Anything I can do to reduce the effect to the level seen in the stock tracks?

Please  :(
Last Project Alta Redshift MXR

Current Project Hawkstone Replica

Next Project Unknown

Buy Me a Beer

Asdrael

  • OEM Nerd
  • Hero Member
  • Sr. Member
  • *****
  • Posts: 1086
    • View Profile
Re: See through edges of alpha textures
« Reply #1 on: July 28, 2016, 04:03:08 PM »
HELP THAT MAN! He needs it  ;D
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

тғc

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 2835
    • View Profile
    • TFC's YouTube
Re: See through edges of alpha textures
« Reply #2 on: July 29, 2016, 08:51:58 AM »
Please, I'm really trying here..

This morning I've experimented with Blenders 'Alpha Clamp' although my guess is that only applies to the viewport. Some people have said it helps with the Blender Game engine but since I think it only exports using the internal render engine that's not the answer.

I've also tried a premultiplied alpha image again with no luck. Looks perfect in Blender but the same result in game.

Please help :( as I said, there must be something to this as stock tracks trees, X shape with no trunk don't have this problem. I'm pulling my hair out!
Last Project Alta Redshift MXR

Current Project Hawkstone Replica

Next Project Unknown

Buy Me a Beer

Sandbiter

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 1263
    • View Profile
    • RK Web development
Re: See through edges of alpha textures
« Reply #3 on: July 29, 2016, 09:10:31 AM »
This is probably not the answer you're looking for. But might the mask just be a little too small? By that I mean that it leaves an edge around the tree, which you don't want. Try making the mask a little bigger so you definitly have no background color.

That probably doesn't make any difference though. But I'm just trying to help :/
If you enjoy my work, please consider making a donation:


тғc

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 2835
    • View Profile
    • TFC's YouTube
Re: See through edges of alpha textures
« Reply #4 on: July 29, 2016, 09:14:42 AM »
Thanks, but no that's not it.

My mask is literally black and white, no blur, no antialiasing.. I'm also using a plugin similar to Flaming Pear for PS to ensure the tree colour extends outside the mask edges.

Thanks though :(
Last Project Alta Redshift MXR

Current Project Hawkstone Replica

Next Project Unknown

Buy Me a Beer

Sandbiter

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 1263
    • View Profile
    • RK Web development
Re: See through edges of alpha textures
« Reply #5 on: July 29, 2016, 09:34:57 AM »
Hm, okay. I hope Piboso or Snappe (or maybe someone from gp-bikes or KRP) can help you out. There has to be a way I think..
If you enjoy my work, please consider making a donation:


тғc

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 2835
    • View Profile
    • TFC's YouTube
Re: See through edges of alpha textures
« Reply #6 on: July 29, 2016, 09:47:27 AM »
Yes, there must be a way..

Even if something was done to fix this on the stock tracks after the scenery was imported to the map that we are not capable of doing, I'd rather know so I can not waste any (more) time on this..:(
Last Project Alta Redshift MXR

Current Project Hawkstone Replica

Next Project Unknown

Buy Me a Beer

Asdrael

  • OEM Nerd
  • Hero Member
  • Sr. Member
  • *****
  • Posts: 1086
    • View Profile
Re: See through edges of alpha textures
« Reply #7 on: July 29, 2016, 12:53:17 PM »
Stupid question:

Are you rendering with or without shadows? Maybe the problem becomes less with shadows on, or maybe changing the shadow settings would help?
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

тғc

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 2835
    • View Profile
    • TFC's YouTube
Re: See through edges of alpha textures
« Reply #8 on: July 29, 2016, 01:34:48 PM »
Gave it a try.. No change unfortunately :(
Last Project Alta Redshift MXR

Current Project Hawkstone Replica

Next Project Unknown

Buy Me a Beer

Asdrael

  • OEM Nerd
  • Hero Member
  • Sr. Member
  • *****
  • Posts: 1086
    • View Profile
Re: See through edges of alpha textures
« Reply #9 on: July 29, 2016, 01:42:21 PM »
What about rotating the light source or trees?

It would be interesting putting trees in a blank map with different rotations (aligned, 10, 20, 30, 40, 45 degrees) in relation to the light direction to see if there is any link, since it's only on certain faces (and seem to be always the same one from your picture).
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

тғc

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 2835
    • View Profile
    • TFC's YouTube
Re: See through edges of alpha textures
« Reply #10 on: July 29, 2016, 01:46:57 PM »
Yeah it's always the same affected faces.. Weirdly though in blender I built a tree, duplicated it, rotated and scaled to get many different variations of the same tree. In game all trees work from one angle but not from another..

I'm not sure what relavence light source may have if any, but my guess is that like shadows probably none :( may experiment though.
Last Project Alta Redshift MXR

Current Project Hawkstone Replica

Next Project Unknown

Buy Me a Beer

Asdrael

  • OEM Nerd
  • Hero Member
  • Sr. Member
  • *****
  • Posts: 1086
    • View Profile
Re: See through edges of alpha textures
« Reply #11 on: July 29, 2016, 01:53:11 PM »
Then I don't have any more ideas.

Try changing the light XYZ when compiling the track, maybe the shadow sampling... and do the same with the .amb file.

Sorry :/

- Maybe the rendering doesn't like your tree. Tried with another one, maybe a from a free database?
- Suggestion two: if it works better using SketchUp, why not do a scene with trees in SketchUp and one with the rest of the objects in Blender? 2 2D planes intersecting, I am sure SketchUp will not be that heavier.
« Last Edit: July 29, 2016, 02:02:27 PM by Asdrael »
Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

тғc

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 2835
    • View Profile
    • TFC's YouTube
Re: See through edges of alpha textures
« Reply #12 on: July 29, 2016, 02:02:00 PM »
No prob mate, thanks anyway!

Yeah I've tried with lots of trees.. Even made my own textures from scratch (very basic) to guarantee there were no bleed issues and same problem..
Last Project Alta Redshift MXR

Current Project Hawkstone Replica

Next Project Unknown

Buy Me a Beer

Asdrael

  • OEM Nerd
  • Hero Member
  • Sr. Member
  • *****
  • Posts: 1086
    • View Profile
Re: See through edges of alpha textures
« Reply #13 on: July 29, 2016, 02:03:10 PM »
edited my post as you replied with this:


Suggestion two: if it works better using SketchUp, why not do a scene with trees in SketchUp and one with the rest of the objects in Blender? 2 2D planes intersecting, I am sure SketchUp will not be that heavier.

Donate to me -> feed my coffee addiction -> get more mods!
OEM bikes pack
MXBikes Discord

тғc

  • Hero Member
  • Sr. Member
  • *****
  • Posts: 2835
    • View Profile
    • TFC's YouTube
Re: See through edges of alpha textures
« Reply #14 on: July 29, 2016, 02:16:13 PM »
Oh no, they already look better than 2d trees in SU ;D that's one positive I guess..
Last Project Alta Redshift MXR

Current Project Hawkstone Replica

Next Project Unknown

Buy Me a Beer