3d graphics, how?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
babycarlitos
Posts: 4
Joined: Thu Aug 20, 2020 9:20 am

3d graphics, how?

Post by babycarlitos » Thu Aug 20, 2020 9:54 am

Hello all,

Newbie here and I have a simple question for all the veterans out there. How are the graphics of 3-d battles of world runner done? Specifically the floor. It looks 3d. Is this drawn on the fly? Using FCEUX and looking at the PPU i can see the orange square with the color. Is it just skewing the image ?


I found the creator of the 3d programming portion (Nasir Gebelli) https://www.resetera.com/threads/the-st ... tion.2066/ Interesing article about how that game bombed and they used the 3d glasses for rad racer instead.

User avatar
pubby
Posts: 557
Joined: Thu Mar 31, 2016 11:15 am

Re: 3d graphics, how?

Post by pubby » Thu Aug 20, 2020 10:03 am

Yeah it's pretty much just skewing the image by changing the horizontal scroll every scanline (a row of pixels). It's the classic background parallax effect.

User avatar
tokumaru
Posts: 11858
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: 3d graphics, how?

Post by tokumaru » Thu Aug 20, 2020 10:08 am

There's nothing 3D about it... Apparently, there are pre-rendered stripes coming from the horizon towards the screen, and the checkerboard pattern is created by changing the horizontal scroll at the correct scanlines (e.g. move the scroll by the width of one stripe at a specific scanline and light stripes become dark and vice versa). The illusion of movement is created by varying the scanlines in which these scroll changes happen over time.

User avatar
tokumaru
Posts: 11858
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: 3d graphics, how?

Post by tokumaru » Thu Aug 20, 2020 10:13 am

There's a more advanced version of the effect in the game Cosmic Epsilon, where more complex patterns are drawn on the floor. The idea is similar, but instead of creating the floor patterns using scroll changes, the game uses CHR bankswitching to select sets of tiles that represent different configurations of stripes coming from the horizon. Scroll changes are still used to bend/skew the perspective, like in World Runner.

babycarlitos
Posts: 4
Joined: Thu Aug 20, 2020 9:20 am

Re: 3d graphics, how?

Post by babycarlitos » Thu Aug 20, 2020 11:07 am

Thanks for the reply guys, I have some work to do to understand this better, going to have to do a horizontal and vertical example.

User avatar
tokumaru
Posts: 11858
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: 3d graphics, how?

Post by tokumaru » Thu Aug 20, 2020 1:10 pm

Here's what the static background of the game looks like (it stays like that in VRAM at all times, it never changes):

world-runner-static.gif
world-runner-static.gif (6.34 KiB) Viewed 738 times

But if the scroll is changed every scanline, skewing the image, we can create the illusion of side-to-side movement (click to view the animation):

world-runner-scroll.gif

And if you offset the scroll values by an entire stripe, you can create the checkerboard pattern (click to view the animation):

world-runner-checkerboard.gif

Finally, if you just vary the scanlines in which those larger scroll changes happen over time, you create the illusion of forward movement.

User avatar
Bregalad
Posts: 7951
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: 3d graphics, how?

Post by Bregalad » Thu Aug 20, 2020 2:11 pm

tokumaru wrote:
Thu Aug 20, 2020 10:08 am
There's nothing 3D about it...
Absolutely not, but you have to admit that, for it's time, it was a very clever trick !

This game was a simple rip-off of a similar Sega game called Space Harrier. I wonder wether it uses a similar trick to simulate 3D.
Useless, lumbering half-wits don't scare us.

babycarlitos
Posts: 4
Joined: Thu Aug 20, 2020 9:20 am

Re: 3d graphics, how?

Post by babycarlitos » Thu Aug 20, 2020 3:29 pm

tokumaru wrote:
Thu Aug 20, 2020 1:10 pm
Here's what the static background of the game looks like (it stays like that in VRAM at all times, it never changes):
what emulator/program did you use to 'see' what is in vram?

User avatar
tokumaru
Posts: 11858
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: 3d graphics, how?

Post by tokumaru » Thu Aug 20, 2020 4:58 pm

Any NES emulator with minimal debugging capabilities will let you inspect the name tables. I used Mesen. The animations are simulations made in Photoshop, though.

babycarlitos
Posts: 4
Joined: Thu Aug 20, 2020 9:20 am

Re: 3d graphics, how?

Post by babycarlitos » Thu Aug 20, 2020 8:41 pm

tokumaru wrote:
Thu Aug 20, 2020 4:58 pm
Any NES emulator with minimal debugging capabilities will let you inspect the name tables. I used Mesen. The animations are simulations made in Photoshop, though.
ah photoshop of course :lol: silly me. I thought there was a table-to-UI app out there...... hmm :cry:

User avatar
Gilbert
Posts: 395
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: 3d graphics, how?

Post by Gilbert » Thu Aug 20, 2020 10:44 pm

Bregalad wrote:
Thu Aug 20, 2020 2:11 pm
This game was a simple rip-off of a similar Sega game called Space Harrier. I wonder wether it uses a similar trick to simulate 3D.
Though many people considered this a rip-off of Space Harrier, I'll say it's merely inspired by SH, as it does a lot more (don't get me wrong, SH is a VERY great game).
This Square game was actually a platformer where you're running and can jump (except boss fights), instead of flying in SH, and you can even walk backward(I think its "sequel" JJ just removed this feature). There are also items to collect and pits to jump over.
(But yeah, Highway Star/Rad Racer by the same people is more a rip-off of OutRun.)
Also it had good presentation and the programming was great. (Consider that sloppy developers could fail horribly doing the same things on the powerful PC-Engine.)

On the other hand, the SMS used only palette cycling for its port of SH so it's actually inferior (though it has HUGE enemies since EVERYTHING is background) and the Famicom version of SH was a port of the SMS version, so...
For a real rip-off of SH on the Famicom, we have this...
Last edited by Gilbert on Fri Aug 21, 2020 2:48 pm, edited 2 times in total.

User avatar
Bregalad
Posts: 7951
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: 3d graphics, how?

Post by Bregalad » Fri Aug 21, 2020 2:27 am

Oh you seem to be right, 3D World runner makes a larger depart from SH than Rad Racer did from Out Run. Sorry to have implied this game was uninspired.

And yeah, the "squell" JJ is more like 8 more levels for the same game with improved graphics. Just like the japanese SMB2 which feels more like more levels for the same game than a sequel to SMB. Since you're forced in JJ to run very fast already in the 1st level it really feels like the 9th level of 3D-Worldrunner and so on. The game is even called "Tobidase Daisakuten Part 2" which makes it clear it's the second part of the same game.

I don't think you can ever walk back anywhere. The only exeption is when you bounce against a pillar, where you momentally advance backwards. Is that what you were refering to ? This happens to both games.

Also, both of your links are identical, that's most likely an error from your side.
Useless, lumbering half-wits don't scare us.

User avatar
Gilbert
Posts: 395
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: 3d graphics, how?

Post by Gilbert » Fri Aug 21, 2020 3:04 pm

Bregalad wrote:
Fri Aug 21, 2020 2:27 am
And yeah, the "squell" JJ is more like 8 more levels for the same game with improved graphics. Just like the japanese SMB2 which feels more like more levels for the same game than a sequel to SMB. Since you're forced in JJ to run very fast already in the 1st level it really feels like the 9th level of 3D-Worldrunner and so on. The game is even called "Tobidase Daisakuten Part 2" which makes it clear it's the second part of the same game.
I think the text "Jumping Jack" or something appears in the overscan area of the first game, so yeah. One big reason for the release of the second game was to support the shutter 3D glasses. The first game only featured red-blue 3D mode. It doesn't matter for the western releases though, as the shutter glasses weren't released there, so only red-blue for all these games including Rad Racer.
I don't think you can ever walk back anywhere. The only exeption is when you bounce against a pillar, where you momentally advance backwards. Is that what you were refering to ? This happens to both games.
As far as I remember (I could be wrong) you can walk back (just) a little bit by pressing down in the first gane, so that you may still manage to collect missed items. They probably thought it's not very useful and affected the pace of the game, so they removed this feature in the "sequel".
Also, both of your links are identical, that's most likely an error from your side.
Didn't know why that happened, but should ve fixed now.

Post Reply