Alpha texture "bleeding"

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Re: Alpha texture "bleeding"

Postby Nadnerb » Tue Oct 23, 2007 4:43 pm

Even if you only use alpha values of 1 and 0 in your texture, when displayed by the engine, it will 'filter' the texture when viewed at greater than it's native resolution by interpolating all the colors, including alpha, and mipmaps will also, being scaled and filtered versions of the original texture, have partial alpha values, so unless your model is z-sorting perfectly, it is impossible to eliminate this effect completely.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Alpha texture "bleeding"

Postby Trylon » Wed Oct 24, 2007 12:21 am

I'm not sure if that's caused by the engine or by pyprp.
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Alpha texture "bleeding"

Postby Nadnerb » Wed Oct 24, 2007 8:02 am

Well... if referring to the mipmaps, then yes, it's caused by the plugin, but only because it is working correctly. You can tell the plugin not to generate mipmaps, if I recall correctly. Mipmaps, however, are useful for rendering distances. Perhaps there could also be an option to 'clamp' the alpha values in mipmaps to integer values. however, the other effect, (filtering at short range) is a function of the engine, which I'm not sure you can change. While we're on the subject, I'll note that you can find this effect in Cyan made ages as well, and they've likely tried pretty hard to eliminate it. Basically, unless you can guarantee that your objects will only be seen from certain angles, for which a single z-sorting will work, this will show up.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Alpha texture "bleeding"

Postby JulyForToday » Fri Oct 26, 2007 11:50 am

Have you tried just not having a semi-alpha texture?


That sort of defeats the purpose. Some things that would be fine with, but other things you'd want to be able to have it semi-transparent.


Although it may be impossible to actually 'fix' this issue, the intentional sorting of the z-buffer would be largely helpful in being able to reduce these kinds of defects. So is there a way to explicitly set the z-buffer's order? I posted before about the naming effecting it, but I can't seem to get it to work 100% of the time, so I'm not sure what is really controlling the order they get drawn it. Something like my sky would be totally fixed by specifically setting the z order.
User avatar
JulyForToday
 
Posts: 118
Joined: Sat Sep 29, 2007 5:34 am

Re: Alpha texture "bleeding"

Postby Trylon » Fri Oct 26, 2007 1:36 pm

Yes and No,
there is a way to set it in plasma (I think), but it's not in the plugin (yet).
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Alpha texture "bleeding"

Postby Paradox » Fri Oct 26, 2007 3:22 pm

Just a question that popped into my head: Is every leaf an individual object?

What happens if you put all of the leaf patters into one big texture, and make all of the leaves for a single tree one object with leaf-specific UV coordinates?
That might solve the issue of which object is rendering first (since they should all render simultaneously).
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Alpha texture "bleeding"

Postby Nadnerb » Fri Oct 26, 2007 4:04 pm

Paradox wrote:Just a question that popped into my head: Is every leaf an individual object?

What happens if you put all of the leaf patters into one big texture, and make all of the leaves for a single tree one object with leaf-specific UV coordinates?
That might solve the issue of which object is rendering first (since they should all render simultaneously).

That would be a great big NO. :?

Polygons are rasterized. No matter what, polygons are always drawn separately, regardless of whether they're part of the same object. I would guess that, currently, the order they're drawn in is simply the order they're written to the file. Currently it seems ambiguous as to how the blender draw order translates to the plasma draw order. In fact, if one could find a way to properly specify this, it might actually be better for all the leaves to be separate objects. The way that I get objects to z-sort properly in blender is to "make parent" the object that I want to be drawn first, and then immediately clear the parent, leaving the objects in a different draw order. This would help if objects were written to the prps in the order they're stored in the blend file. However, this is untested. Perhaps somone could test that.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Alpha texture "bleeding"

Postby Aloys » Sun Oct 28, 2007 7:23 am

I spent quite a bit of time working on this lately for Ahra Pahts, and as of now I haven't been able to find a solution that works every time.. :(
I tried renaming the files different ways and couldn't get it to work. Also during one version my lightflares worked fine, and then for the following version I couldn't see them anymore although I hadn't touched them at all..
Now, even the sun is gone in Ahra Pahts.. :cry:
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Alpha texture "bleeding"

Postby Grogyan » Sat Nov 03, 2007 9:33 pm

I have a small idea, why don't you use a shade of grey instead of white for the edge of the texture, or not use white at all and leave the texture with a sharp edge or blur the sge with the colour of the texture?

I just had a look at JangaLela, and it uses a lot of alpha transparent textures, and all of them use white to blend the texture.
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Alpha texture "bleeding"

Postby Marcello » Sun Nov 04, 2007 9:14 am

Considering the z-buffer order solution...

I always assumed this should be possible. Every time Cyan uses a decal (like the Yeesha symbol on the wall and floor in our Relto hut, the decals on the floor in the City, etc.) the underlying mesh and the decal mesh are in the same spot. No noticable difference in height to force an order. So yes I think Plasma does accept some way to influence the rendering order. I'm pretty sure it happens in the examples I mentioned. (Nothing technical to back this up ;) ).
User avatar
Marcello
 
Posts: 374
Joined: Sun Nov 04, 2007 8:59 am
Location: Haarlem, The Netherlands

PreviousNext

Return to Building

Who is online

Users browsing this forum: No registered users and 39 guests