• Welcome to MX Bikes Official Forum. Please login or sign up.
 
March 29, 2024, 12:56:19 AM

News:

MX Bikes beta18j available! :)


See through edges of alpha textures

Started by 𝖙𝖋𝖈, July 28, 2016, 05:07:10 PM

Previous topic - Next topic

Ruubs

I made some 3d trees for Southwick. I also got the problem.
Kinda makes me sad to be honest. Trees can look a lot better if we didn't have this problem.

𝖙𝖋𝖈

Ok, so I think I've found a solution.. Think!

I got this working last night to where there were virtually no visible errors but the method is a bit cumbersome.

Firstly, I experimented with different formats, initially BMP but had no luck getting transparency to work so I moved on to DDS. I ended up doing some reading and after trying 8 or 9 different format settings I got the best results from DXT5 with a bunch of other settings using a DDS gimp plugin. I think the biggest help here is the way it blends the alpha edges.

The Next thing I did was break a 3d tree into individual faces making them their own objects. This is the frustrating part at least for me. A 2d tree, broken in two down the middle, separated into loose parts to make two objects. Copy and flipped 180 as blender can't export two sides faces, then copy the whole lot and rotate by 90* to make the 3d X shape. This results in 8 objects for one tree, all loose. This makes having more than a couple of trees fill up the outliner and makes them very hard to select.

But.. It works so thought I'd share.

I will continue to experiment later today, maybe I can join them together, maybe I don't need to use DDS when splitting up all the faces, not sure yet.

Does this sound about right PiBoSo/Snappe? Anything I can do to refine this process?


PiBoSo


𝖙𝖋𝖈

Quote from: PiBoSo on August 06, 2016, 12:41:30 PM

Have you tried using the "CK_" prefix in the filename of the foliage textures?
http://docs.piboso.com/wiki/index.php/Track_Creation_Rules#Textures

Pib, I love you, you know that, but I do sometimes wonder if you actually read my posts  ;D

𝖙𝖋𝖈

I thought I'd figured it, but I tried to add a different tree last night and for some reason this one is showing entirely semi see through in game.. Must have got something wrong as it looks just fine in blender and in mapview..

The original tree I did which works still shows up fine.

Any thoughts on what I might have wrong? And yes, I am using the CK_TREE prefix and it's working just fine ;)

PiBoSo

Quote from: TheFatController on August 07, 2016, 11:10:49 AM
I thought I'd figured it, but I tried to add a different tree last night and for some reason this one is showing entirely semi see through in game.. Must have got something wrong as it looks just fine in blender and in mapview..

The original tree I did which works still shows up fine.

Any thoughts on what I might have wrong? And yes, I am using the CK_TREE prefix and it's working just fine ;)

If the trees are better in the latest Map Viewer, then the next build of MXB should fix the problem.

𝖙𝖋𝖈

That sounds good.. In the meantime I'll see if I can figure out why the current ones I have are now transparent..

There's a lot to this track making business! Suddenly remembering why I stuck to desert style tracks for so long lol

Ruubs

Quote from: TheFatController on August 07, 2016, 01:44:55 PM
That sounds good.. In the meantime I'll see if I can figure out why the current ones I have are now transparent..

There's a lot to this track making business! Suddenly remembering why I stuck to desert style tracks for so long lol
If you have a full black alpha channel on your texture, your texture is transparent for some reason. At least that's a problem I had with my banners on Southwick.

𝖙𝖋𝖈

Thanks mate! Will try it out later.. So what make it like 1 1 1?

Ruubs

Quote from: TheFatController on August 07, 2016, 04:17:58 PM
Thanks mate! Will try it out later.. So what make it like 1 1 1?
I'm using no alpha channel on my texture at the moment.

𝖙𝖋𝖈

Quote from: Sandbiter on August 07, 2016, 06:57:02 PM
Quote from: TheFatController on August 07, 2016, 04:17:58 PM
Thanks mate! Will try it out later.. So what make it like 1 1 1?
I'm using no alpha channel on my texture at the moment.

Care to elaborate?

Ruubs

Without alpha channel:


With alpha channel:

𝖙𝖋𝖈

Ok but if you don't have an alpha channel how are you getting transparency?

Ruubs

Quote from: TheFatController on August 07, 2016, 07:12:56 PM
Ok but if you don't have an alpha channel how are you getting transparency?
Didn't think of that unfortunately.

It's really weird my banners where half transparent while I had a full black alpha channel then. From some angles I could see the textures with a lot of shiny-ness on them.