VGMaps

General Boards => Mapping Tips/Guides => Topic started by: Piranhaplant on May 27, 2011, 09:16:12 pm

Title: NSMB Wii Rotating ground
Post by: Piranhaplant on May 27, 2011, 09:16:12 pm
I am trying to recreate the rotating ground elements found in New Super Mario Bros Wii.  The game takes the image below and rotates it in a circle.

(http://img534.imageshack.us/img534/4093/smnp01688d59e94.png)

And forms something like this:

(http://img692.imageshack.us/img692/1461/smnp011.png)

If anyone has any clue of how to do this in Photoshop or GIMP, please let me know.
Title: Re: NSMB Wii Rotating ground
Post by: TerraEsperZ on August 08, 2011, 06:36:15 pm
I've actually been puzzling over this for a while but unfortunately, I don't have anything better than Paint Shop Pro 8 to help me. All I've managed to come up with (and you probably have as well) is that the whole circle appears to have a radius of 576 pixels (an elegant number that's easily divisible by 8, almost a requirement for measurements in old-school 2D games) and the small image you have there appears to constitute an arc of 11.25 degrees, meaning that this section should repeat itself 32 times around the whole thing.

Of source, I haven't played the game to check how accurate that is, and I simply don't have the necessary software that would support vector deformation or whatever you'd need to take for example, an image with that section repeated 32 times side-by-side, fit that inside a grid and turn that grid into a circle. Anyone with a better understanding of such deformations, feel free to point out how ignorant I am :P.

You can see a poorly assembled example of my findings as done in Paint.
Title: Re: NSMB Wii Rotating ground
Post by: Raccoon Sam on August 09, 2011, 03:25:01 am
I don't know if it helps, but Photoshop has a filter called "Polar Coordinates" under the Distort panel.
It transforms this:
link (https://i.imgur.com/UEaWq.png)

to this:
link (https://i.imgur.com/kLOJv.png)

The problem seems to be that it doesn't really repeat the pattern, only stretches. As you can see, the middle resembles the original texture the most, but the closer you get to the edge the stretchier it appears.

Don't know how to approach the problem really... If I figure out something I'll let you know.




EDIT: Okay, I figured out how to do it "perfectly".
Make a new document in Photoshop, match your canvas with the perimeter of your rotating sphere and double it once more (in this case 576 * 2 = 1152 * 2 = 2304)
Paste your texture in (https://i.imgur.com/kNiLl.png), flip it 180° and resize it to twice its size using the nearest-neighbor interpolation. Be sure to apply the transformation.
Then, transform it AGAIN (https://i.imgur.com/eoNIy.png), this time to 50% its width and 200% its height. Fill out the remaining empty space with the texture, seamslessly.
Should look something like this (https://i.imgur.com/aruoo.png) now.
Then apply the Polar Coordinates and add a full circle mask. Now resize the image's size to 50% and you're done!

Dunno if I explained that well enough but if you have questions be sure to ask.

This is the final product (resized by the forum, open in new window to see it in its full glory):
(http://img37.imageshack.us/img37/7744/circlex.png)

EDIT: Wait, no, it's still incorrect... But that was a mistake on my end. Instead of resizing the second time to 50% x 200%, make it 25% x 200%.
Title: Re: NSMB Wii Rotating ground
Post by: Piranhaplant on August 09, 2011, 08:45:23 am
Thanks so much!  And thanks for the instructions too, there are a lot of these in the game with many different sizes.
Title: Re: NSMB Wii Rotating ground
Post by: TerraEsperZ on August 09, 2011, 06:01:05 pm
From what I can see, this example doesn't repeat the texture enough times (18 times instead of 32) but Raccoon Sam essentially got the whole process as close to the actual game as possible.

We should almost start a sort of "VGMaps Mapping Help Thread" when one of us encounters difficulties he or she can't resolve on his or her own :).