It is currently Tue Dec 18, 2018 6:29 am

All times are UTC - 7 hours



Forum rules





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat Dec 01, 2018 6:18 pm 
Offline

Joined: Sat Dec 01, 2018 6:02 pm
Posts: 2
I was curious earlier how the battle backgrounds in Earthbound work. I had always assumed that they relied on some kind of Mode 7 effect, but (if I'm not mistaken) Mode 7 uses the BG1 layer, but by disabling the backgrounds one at a time in Snes9x, the battle backgrounds seem to be in the BG3 layer. I had always thought it was impossible to do transformations on backgrounds (except for scrolling, of course) unless Mode 7 was enabled. Does anyone have any insight into how this effect could have been achieved? I am wondering specifically about the sinusoidal shifting and scaling of the background, and have been trying to recreate it.

For those who do not know what I am talking about, here are some examples of battle backgrounds from Earthbound.

https://www.youtube.com/watch?v=nomLvfvtAWE
https://www.youtube.com/watch?v=KpmyQUA ... 0s&index=8


Top
 Profile  
 
PostPosted: Sat Dec 01, 2018 6:36 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20896
Location: NE Indiana, USA (NTSC)
>Earthbound / Mother 2: Battle Against Frank Background
HDMA to the background horizontal scroll registers.

>Earthbound / Mother 2: Battle Against Bionic Krakken Background
HDMA to the background horizontal and vertical scroll registers.

Neither of these is substantially more complex than the backgrounds in Recca or Isolated Warrior or Super Spy Hunter for Famicom/NES.


Top
 Profile  
 
PostPosted: Sat Dec 01, 2018 6:36 pm 
Offline

Joined: Sun Mar 27, 2016 7:56 pm
Posts: 183
Like a lot of effects on the SNES, this sort of thing can be done by changing parameters (such as scrolling, colors, etc.) while the screen is being drawn.

For instance, for the sinusoidal effect, between each scanline (row of pixels) of the screen being displayed on the TV, the background layer is scrolled to the left and right in a sinusoidal pattern. The result is that the background appears to be distorted on-screen.

Even the effect Mode 7 is most famous for (3D perspective) is only possible by doing things like this. Mode 7 on its own can only zoom a single background layer in and out, rotate it, and skew it, so it can't do a perspective effect all by itself. To achieve the effect, the background is zoomed in a little bit more each scanline, so that things near the top of the screen appear small, and things near the bottom of the screen appear large.


Top
 Profile  
 
PostPosted: Sat Dec 01, 2018 6:42 pm 
Offline

Joined: Sat Dec 01, 2018 6:02 pm
Posts: 2
That is very interesting! I had actually considered that as a possibility while I was awy from my computer.


Top
 Profile  
 
PostPosted: Sun Dec 02, 2018 2:31 am 
Offline
User avatar

Joined: Mon Jan 23, 2006 7:47 am
Posts: 146
Nicole wrote:
Like a lot of effects on the SNES, this sort of thing can be done by changing parameters (such as scrolling, colors, etc.) while the screen is being drawn.

For instance, for the sinusoidal effect, between each scanline (row of pixels) of the screen being displayed on the TV, the background layer is scrolled to the left and right in a sinusoidal pattern. The result is that the background appears to be distorted on-screen.

Even the effect Mode 7 is most famous for (3D perspective) is only possible by doing things like this. Mode 7 on its own can only zoom a single background layer in and out, rotate it, and skew it, so it can't do a perspective effect all by itself. To achieve the effect, the background is zoomed in a little bit more each scanline, so that things near the top of the screen appear small, and things near the bottom of the screen appear large.

Visualization. Castlevania also uses Mode7 here for a neat effect.

3D effects can be created with all "normal" background modes by changing the vertical scrolling registers (Axelay), or both horz. and vert. registers (DKC2).


Top
 Profile  
 
PostPosted: Sun Dec 02, 2018 5:33 pm 
Offline

Joined: Fri Jul 04, 2014 9:31 pm
Posts: 998
One more thing you can do to distort backgrounds is offset-per-tile. In Modes 2, 4, and 6, you can repurpose an unused tilemap as a column scroll table, whereby each column of 8x8 tiles can have its own vertical scroll offset (at least, that seems to be the most useful aspect of offset-per-tile). In addition to wavy effects like in Yoshi's Island (in that case the foreground is column scroll while the background is HDMA scroll), you can combine it with HDMA scroll on one layer to produce a moderate amount of decently convincing rotation. Star Fox does this with its backdrops. The Mega Drive can do both line and column scroll too, but its column scroll table is smaller and can only do columns 16 pixels wide rather than 8 pixels. Batman and Robin uses a similar technique to Star Fox.

Using Mode 7 is a bit restrictive because you only get the one BG layer, so anything that has to share scanlines with the transformed Mode 7 image has to be made out of sprites. Technically you can get a BG2 in Mode 7, but it literally just reuses the BG1 VRAM fetch for each dot, so you can't do independent scrolling or transforms or anything; it mostly just lets you do per-pixel priority relative to sprites.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group