Page 2 of 5

Re: vf3

PostPosted: Sun Jun 19, 2016 4:00 pm
by Ian
I realised today implementing culling fixed vf3 :o

Image

Image

Re: vf3

PostPosted: Sun Jun 19, 2016 4:27 pm
by Jiterdomer
Keep it up! Aoi and Dural Version of Pai's Stage (Hold down both start buttons at the Stage Select Screen until time runs out) background are all black compared to the arcade's 2D fog effect, is it a challenging thing to implement it on Supermodel?

Re: vf3

PostPosted: Sun Jun 19, 2016 4:34 pm
by Ian
it's 2d fog, I haven't really looked at the 2d code at all
It's simply unimplemented

Re: vf3

PostPosted: Mon Jun 20, 2016 7:28 pm
by Bart
Very interesting, Ian! Do you think these were culled out on the original hardware as well or are we just getting lucky? I thought someone had mentioned that these objects should actually be positioned elsewhere in the scene. It would probably be hard to verify. It's always possible, I suppose, that there was a legit bug in VF3 where some transform matrix was not being uploaded and the programmers never noticed it because the culling feature was active.

This would not be without precedent: Fighting Vipers 2 (and I think Lost World) has an actual bug in the program code when initially clearing RAM. Someone made a typo in the assembly language boot code and rather than adding a constant 4 to register r4 on each loop iteration, they add r4 to r4.

Re: vf3

PostPosted: Tue Jun 21, 2016 3:04 am
by Ian
Not entirely sure, half I think we got lucky, half I think they are meant to be culled out anyway.
The culling nodes contain a bounding box, that totally encapsulates the data for that node and successive child nodes. The child nodes do the same but define a smaller bounding box inside the original bounding box. If the top level box is outside of view it automatically culls all the children, since you don't traverse them.

I think the 'bad' polys are getting culled because the higher level nodes are outside of view. But the bad polys are still broken because they exist outside of their bounding boxes.

At this extreme view, you can still see the bad poly in the jacky stage

Image

and then higher up it's gone

Image

So not entirely sure where in the view these things should be positioned.

Ocean hunter has the same bug though, as a lot of the fish are missing their x/y/z positions. They simply don't get updated.

Re: vf3

PostPosted: Tue Jun 21, 2016 5:43 am
by Joaquim Gonçalves
Great Job Ian! Finally the stupid walls are gone. ;)

Re: vf3

PostPosted: Tue Jun 21, 2016 7:30 am
by MaLDo
Hi, in those screenshots you have correct shadows and culling activated.

In SVN 451, using old renderer, I have correct shadows but no culling in VF3. with new 3d renderer, culling works (no wrong polys in akira stage) but shadows flicker as always.

What I'm doing wrong?

Re: vf3

PostPosted: Tue Jun 21, 2016 7:46 am
by Bart
MaLDo wrote:Hi, in those screenshots you have correct shadows and culling activated.

In SVN 451, using old renderer, I have correct shadows but no culling in VF3. with new 3d renderer, culling works (no wrong polys in akira stage) but shadows flicker as always.

What I'm doing wrong?


Culling is not implemented in the legacy renderer and Ian added the translucent shadow hack in r453.

Re: vf3

PostPosted: Tue Jun 21, 2016 8:22 am
by MaLDo
Bart wrote:
MaLDo wrote:Hi, in those screenshots you have correct shadows and culling activated.

In SVN 451, using old renderer, I have correct shadows but no culling in VF3. with new 3d renderer, culling works (no wrong polys in akira stage) but shadows flicker as always.

What I'm doing wrong?


Culling is not implemented in the legacy renderer and Ian added the translucent shadow hack in r453.



Groovy!

Image

Re: vf3

PostPosted: Tue Jun 21, 2016 9:37 am
by terminator2k2
that looks nice......how you generating the scan lines?