Modular 3D Mesh to 2D Sprite

Hello!

I am working on a Unity 2D project. I am designing my graphical assets in 3ds Max and then rendering them out to be placed into a spritesheet. The issue I’m having, is that I’m attempting to create modular assets, which just doesn’t work with a standard perspective camera. Switching to orphographic projection fixes this, I however then lose details such as the floor. I initially tackled this by simply cutting the undesired areas from the image, however this method fails for repeating imagery.

There may be a really simple way to deal with this that I’m not seeing, or maybe a better way of going about the whole scenario.

Is there a way of rendering which will give me straight edges whilst still giving me the floor and other details? Any help is appreciated.

Thanks!

Perspective:


Orthographic:

Well, that’s a bit of a jam huh. I actually work the same way. I’m figuring out some tricks that help, but it isn’t always perfect. If for example you know your game is for PC, not for mobile, you could actually render out the whole level at once. If it was a “room at a time” like older zelda, you could do perpective and be fine. Ortho on the other hand is more versatile in other ways, allowing you to more easily create modular sections, but indeed leads to the problem you mention.

If you worked with certain platform/floor sizes, you could create multiple versions. You could render them as perpective, and then cut out the whole top section leaving you bottom section for the floors. You could do the opposite for the ceiling. But then when you get to the sides you are going to have an issue. This is one big advantage of pixel art(though I suck at it) that you can directly control the pixels, therefore you can draw with any perspective you want for the tiles and have it work.

For my current project that is just getting started, I’ve decided to do it in ortho render, rendering whole levels out at once instead of tile by tile. I’d like to get perpective view but it is too much hassle to get it right. And if you make sure the UVs match up, you can still create modular pieces to put together. Another small trick to do is to have something on the ground, even you can’t see it form the top. One section may need grass. And you can see that grass from the side. You might not want your character to collide with the grass so you would adjust your colliders to make that work right.

Remember that an ortho view isn’t all that bad, especially for what you get. All the older Mario games, and the Metroid games, and many other platformers, were all done in ortho, even when using pixel art. I could also mention that the famous Donkey Kong Country on the other hand had some perspective to much of the level terrain. And the SNES wasn’t really properly capable of using full screen size tiles, so I’m sure they built the levels out of smaller tiles there too. This shows that it is indeed possible to create tile-map style graphics with a perpective view. But I’m sure it will take more work.

Max’s scanline renderer struggles with oblique surfaces, more so from an orthographic camera.

Enabling supersampling in the material (Hammersley at 0.5 should be nice and crisp) or Global settings should help. Setting render antialiasing to i.e. Cook Variable (try a 1.2 filter) may improve matters further.

I think the problem the OP is having with ortho rendering isn’t the surface type, rather the fact that you can’t see the tops of surfaces facing upwards with a camera on the side simply due to the projection, while with perpective projection when something is lower than the camera you can see the tops. See the pictures in the first post to see what I mean.

You will have to model it differently for ortho. Ex. Make the floor parrallel to the wall not perpendicular. And angle the light above so that it shows the bottom for the orthocam.

Thanks for the replies! I ended up modifying my scenes to make use of DaDarkDragon’s method which is working well so far. I’m having another issue with max’s Z-Depth rendering, but that’s a whole other issue.

Thanks again.

1 Like

That it is not getting the depth for something like the floor? if its that then you can try something like this ____/ (but 90 degrees) where you move the bottom floor verts towards the camera so you can still get the same ortho render but get the depth pass/render you need.