decal problems

Posted By: 3run

decal problems - 07/14/11 11:05

I'm having problems with decals since I've started working with A8.
First I've faced problem with decal shadows, it looks like they have ZNEAR flag set on them grin
Quote:


And this happens with particles as well, they disappear if there is a decal shadow on the background.
Another problem with decal that I've faced, is that they really have ZNEAR flag set on sometimes grin
Quote:
I've made bulletholes here:

And when I walk away from it, decals appear throw the wall:

When I walk closer, they disappear again... and appear as soon as I walk away...
One more problem I've faced is this one:
Quote:



All sprites have proper alpha channel, and it worked flawlessly with A7, so there is nothing wrong with script and sprites as well.
I wonder how can I fix this problems. Waiting for advices.

Posted By: Superku

Re: decal problems - 07/14/11 12:17

Do you have a Radeon graphics card?
Posted By: 3run

Re: decal problems - 07/14/11 12:20

Nope, but I've faced this problem on both NVIDIA and Radeon cards.
Posted By: MasterQ32

Re: decal problems - 07/14/11 13:15

your particles are transparent.
use alpha check material from wiki to solve problem...
Posted By: 3run

Re: decal problems - 07/14/11 14:33

Non of my particles, models or decals which you can see on the screens are transparent.
Posted By: bart_the_13th

Re: decal problems - 07/15/11 02:13

Did you change the camera.clip_far or clip_near. Changing any of those could result in inaccurate zsorting.
BTW, I though decals are only for commercial version and above
Posted By: 3run

Re: decal problems - 07/15/11 06:04

They work pretty well with beta version as well, as you can see on the picture laugh
I've changed them to "camera.clip_far = 2000;" and "camera.clip_near = 0;"
It used to work perfect with A7, but I have no idea why it looks like this with A8.
Posted By: fogman

Re: decal problems - 07/15/11 09:42

Last pic looks like z-beating
Have you tried to use hit.nx / ny / nz to move the decals 0.1 quants away from the wall towards the player? That works for me.
Posted By: 3run

Re: decal problems - 07/15/11 10:28

When I place singe decal, it looks perfect. But when I place more than one and on the same position (as on the pictures) they get messed up.
Posted By: 3run

Re: decal problems - 07/15/11 12:03

Some one copied my thread? grin
Posted By: Superku

Re: decal problems - 07/15/11 12:41

No, it was moved to the appropriate forum. I've experienced a similar behaviour/ problem, so I'm interested in the solution, too.
Posted By: MasterQ32

Re: decal problems - 07/15/11 12:59

you use transparence...
Your bullethole is not square, it is round
so your border is transparent and you get problems with z-order...

try to use the material, only for testing
i know this problem...
Posted By: 3run

Re: decal problems - 07/15/11 19:08

That isn't a transparency! That is alpha channel I've made in photoshop! Or am I missing something? What about models? Are they transparent as well?
Posted By: Shadow969

Re: decal problems - 07/15/11 22:03

if entity has an alpha channel - it's considered transparent and is rendered after all opaque entities, besides it's depth-sorting is not pixel accurate. if your sprites have equal distance from the viewport - you'll experience 'z-fighting', which is noticeable on your screenshots. try assigning alphacheck material to them.
Posted By: Superku

Re: decal problems - 07/15/11 22:07

And what's the reason for the following problem 3run has already posted above?


Posted By: MasterQ32

Re: decal problems - 07/15/11 22:11

that could also be an alpha-sort problem...
i know this problem from 32bit alpha channel textures with terrains
Posted By: Shadow969

Re: decal problems - 07/15/11 22:11

i saw this, but i cannot neither confirm nor comment this. the statement that it appeared only in A8 makes me think this one is a bug, while other images show a common effect, that can be noticed even in commercial products.
Posted By: bart_the_13th

Re: decal problems - 07/15/11 23:56

Originally Posted By: Superku
And what's the reason for the following problem 3run has already posted above?


z-fighting, that caused by zbuffer inaccuracy, that caused by his change to camera.clip_far = 2000

@3run: try to remove those line that change the camera.clip_...
Posted By: Superku

Re: decal problems - 07/16/11 00:10

Reducing the clip_far to 2000 should increase the accuracy, right?

Ok, I see:
"camera.clip_near = 0;"
0 is an invalid value, because that would mean a divison by zero. Keep the value above 0 (or >= 1 as the manual suggests).
Posted By: 3run

Re: decal problems - 07/16/11 07:10

OK, I've set "camera.clip_nera = 1;" but this problems still appear.
Shadow969@ only decal sprite has alpha channel, pistol's model doesn't have one, so it isn't transparent, or am I wrong?
I'll try to apply material from Wiki, let's see how it'll go. I've mentioned this problem a long time ago, it was just ignored.
Posted By: bart_the_13th

Re: decal problems - 07/16/11 08:29

Originally Posted By: Superku
Reducing the clip_far to 2000 should increase the accuracy, right?

Ok, I see:
"camera.clip_near = 0;"
0 is an invalid value, because that would mean a divison by zero. Keep the value above 0 (or >= 1 as the manual suggests).

Theoretically yes,decreasing the clip_far and increasing the clip_near can increase the accuracy as stated by the manual. But I found that it works the opposite way, increasing the gap between them give me the better result, in fact, I'd just use the default value(by not setting any of them) for the best result.

For 3run's problem, there's a possibility that the sprite is zneared somehow, how about resetting znear flag each frame, just to see the result?
Posted By: 3run

Re: decal problems - 07/16/11 08:32

grin I've tried that bart_the_13th, but no way for it to be reseted.

So, ok I've tried material from Wiki, I'm not surprised, here are results:
Quote:
Same "ZNEAR" problem:


Same "layering" problem:

I didn't make particle and models screens, they are just same as well. BTW "camera.clip_near" is set to "1"
Posted By: Shadow969

Re: decal problems - 07/16/11 09:47

i guess it's time for a bug report then.
Posted By: 3run

Re: decal problems - 07/16/11 18:05

Ok, so I've made a thread under "Bug Hunt" forum, lets see how it will go, I hope they wont tell anything about workaround...
© 2024 lite-C Forums