Page 1 of 1

Sprite splitting issues

Posted: Wed Aug 31, 2016 16:10
by Major Cooke
On MAP01
Image

You can try it out for yourself by downloading:

D4D - http://forum.zdoom.org/viewtopic.php?t=52164
DUMP2 - http://forum.zdoom.org/viewtopic.php?t=51072

Start the game on Nightmare difficulty, bind a key to +reload, face the rough direction as seen in the image and plopping down a syphon grenade (reload key). You'll immediately see how sliced up these discs are.

Re: ROLLSPRITE splitting issues

Posted: Wed Aug 31, 2016 16:55
by Graf Zahl
It's your feature, isn't it? Haven't you actually tried this in some more complex situations ?

Re: ROLLSPRITE splitting issues

Posted: Wed Aug 31, 2016 17:39
by Major Cooke
Partly. It was originally Nash's, Marrubs and fgsfds's before Nash upped and quit because Randi told him to rename the flags... But I do take responsibility for maintaining it after all that, so in a way, yes, it pretty much now is.

Yes, I did test it in a few more complex environments, but for some reason it never really went THIS apeshit on me.

Camera facing sprites by biospud also has this problem at times as well. So I figured it was more of a joint problem. See the tree in the upper left corner of the pic? Standard tree, with Sprites Face Camera enabled.

Image

Re: Sprite splitting issues

Posted: Sat Sep 17, 2016 23:34
by Major Cooke
Image

Since the changing of flat sprites, this has started to become more noticeable than before. I know nothing about the splitting stuff though. And, again, this also affects facing sprites, roll sprites and flat sprites all the same.

Re: Sprite splitting issues

Posted: Sat Sep 17, 2016 23:52
by Graf Zahl
I need some test map where this can be checked with non-moving sprites. Debugging a moving sprite is not very easy.

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 0:54
by Major Cooke
https://drive.google.com/file/d/0B6VLnV ... sp=sharing

Just go right up to the front of those three trees in front of you. They're splitting into thirds.

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 1:16
by Rachael
Has your code been merged with GZDoom's master, yet? I tried doing a pull in my child port and I am not getting the issue. I pulled and compiled not 20 minutes ago.

Also, has your build environment been cleaned lately? Sometimes you have to reset it from scratch - pull from a fresh Git, redo cmake, all that fun stuff.

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 2:08
by Major Cooke
Do you have Sprites Face Camera enabled? Because I just cleaned it out like you suggested but no change.

Image

I even tried it on my older laptop. Same deal. So, at least I know it's not NVidia card type specific...

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 2:24
by Rachael
That explains a lot. I never play like that. XD

I got the issue, too, now.

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 15:44
by Graf Zahl
No luck with this so far, so you'll have to wait a bit longer. Before doing a release I at least want to know if this is something critical or just a rare occurence.

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 16:27
by Major Cooke
It causes no crash -- merely an annoying visual glitch.
It's done this for the longest time -- it just tends to misbehave when more complex geometry is involved.

However I did find a way to make it trigger based on what angle you're facing.

Image

Press yourself up against this tree and the wall. When you look more to the left, it becomes visible. Turning right will return it to normal.

Hopefully that helps.

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 16:31
by Graf Zahl
Ok, well, I now know what's happening. These sprites all alter their vertices in the render pass, but the splitter for translucent stuff is run before that on the original vertex data.
Unfortunately this is not an easy fix because a lot of code would have to be rewritten and a few assumptions tossed out. On top of that my math is a bit rusty and I just can't quickly roll out a generic 'split a generic shape in 3D by an arbitrary plane' code - which is what's needed here.

So for now I just patched it over so that these sprites just get sorted by their center.

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 16:33
by Major Cooke
Fair enough! I'll try it when you push and see if anything else comes up.

Re: Sprite splitting issues

Posted: Sun Sep 18, 2016 23:09
by Major Cooke
Works well enough. Thanks!