Decal blending problem

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!

Decal blending problem

Postby pinupower » Sun Jul 13, 2008 12:46 pm

Hello to all the writers. This is my first post.

I have a problem with decal blending. I use GoW-PyPrp 1.4.0 and blender 2.46
I follow the tutorial http://guildofwriters.com/wiki/Decal_Blending but this is the result


What i did was to create two objects that exactly overlap on the marked faces. I created a vertex color named "Alpha" painted etc...
The transparency works, but i have this z-fighting artifacts (is it called like this?)
I tried to use ZTransp and Zoffs up to 3.00 on the transparent object, also the PassIndex as suggested here http://guildofwriters.com/phpbb/viewtopic.php?f=59&t=1977&start=30&st=0&sk=t&sd=a (but this i think is for GoW-PyPrp 1.5.0)
Any suggestion?

Thanks a lot

P.S. i apoligize if i said sth stupid, i'm new in 3d modelling world, just started 3 days ago.....
P.P.S. can someone explain in two words what PassIndex is?
Attachments
zoffs.jpg
zoffs.jpg (94.84 KiB) Viewed 2949 times
pinupower
 
Posts: 2
Joined: Fri Jul 04, 2008 4:56 am

Re: Decal blending problem

Postby Nadnerb » Sun Jul 13, 2008 5:09 pm

If you're going to use the PassIndex setting you're going to have to upgrade to PyPRP 1.5, anyway, the passindex setting sets which span the object will be placed in. Generally speaking (if sorting is disabled) spans will be rendered in order. Higher passindexes will be rendered later.

Anyway, the z-fighting issue is a result of the two objects not actually being exactly the same. The way they're stored, it's very finicky, if you do anything to the verts (even without moving them) including joining objects, they will be shifted slightly. (some sort of rounding error, I figure)
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: Decal blending problem

Postby Aloys » Sun Jul 13, 2008 6:57 pm

Nadnerb wrote:Anyway, the z-fighting issue is a result of the two objects not actually being exactly the same. The way they're stored, it's very finicky, if you do anything to the verts (even without moving them) including joining objects, they will be shifted slightly. (some sort of rounding error, I figure)

That'd explain a lot of things. If that's true that's very annoying, because then you can't get really predictable results until you see it ingame, and then it's too late to change your mesh..
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Decal blending problem

Postby pinupower » Mon Jul 14, 2008 11:52 am

I checked the coordinates of the ovelapping vexteces. They are the same in blender precision (3 digits).
What is the values of Zoffs you generally use for blending?
pinupower
 
Posts: 2
Joined: Fri Jul 04, 2008 4:56 am

Re: Decal blending problem

Postby Jonnee » Mon Jul 14, 2008 1:14 pm

Your screenshot looks like if your objects are at the same position on the Z axis. So the game can't decide which object has to be infront constantly. It's not a Zoffs problem, it would look different.
I always move the object that I want to blend (the one with the alpha channel) by 0.1 on the Z axis upwards, or I scale it about 0.1 sometimes. It's just a small value that noone realy notices, but it avoids that flickering.

I use Zoffs if I have some more blended textures in one area. An object with Zoffs 3 for example will be correct displayed infront of an object with a value of Zoff 1 or 2. But never use descending or with identic values! If this happens you will get a grafic error that causes that the alpha painted edges become complete transparent. Then you could look through the whole age at these edges. The object below will not be displayed.
I always use the values 1, 2 and 3. I tried number 4, but then the game crashed.
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Decal blending problem

Postby Paradox » Mon Jul 14, 2008 4:05 pm

Woah, careful with the ZOffs setting in the Material panel. Higher values do not make a difference. A value greater than 0.0 will cause the linked textures to have a Z-offset flag set. This can cause even more unexpected issues that are much harder to debug.

Please use the PassIndex option per-object to tell objects to render after other objects.
Paradox
 
Posts: 1295
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada


Return to Building

Who is online

Users browsing this forum: No registered users and 1 guest

cron