mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

4.8K
active users

Alfred R. Baudisch

When pre-rendering 3D models as isometric 8-directions sprites, should I (1) rotate the camera, (2) rotate the camera + lights or (2) rotate just the object?

I'm so confused about this, and I can't figure out whether the lights were rotated or not, for example when checking Rollercoaster Tycoon 2 graphics.

I even extracted ALL of Rollercoaster Tycoon 2 sprites (~29k pngs) but still can't figure out what exactly was rotated when rendering.

I guess I'll simulate it first in real-life, but the answer is kind of obvious: the sun and the light source are stationary, then either the camera or the object rotates.

But then why every tutorial I saw recommends rotating both the camera and the light? That's what so confusing.

@alfredbaudisch Is rotating the camera + light == rotating the object?

@alfredbaudisch the only reason for rotating the lights with the object that comes to my mind is for visual consistency between different frames: if light comes from the right, a character walking to the left would have the front side in shade and one could decide to avoid this. But this would only work with a very flat/uniform ambient lighting, otherwise the change in lighting when rotating the sprites would be too apparent 🤷

@oldschoolpixels thanks for the tip, I did a bunch of tests last night and rotating the light alongside the object seems the way to go to render " 3D as pixel art" to keep the consistency.

@alfredbaudisch well, come to think of it, in a platformer, for example, the artist will draw the character with a fixed lighting and it will be flipped for moving left and right, so it makes sense... still super counterintuitive, though.

@alfredbaudisch Depends on what you want to do.

If you only rotate the object, you will end up with eight different light directions. For characters that can rotate, that's what you want.

If you would allow the view of the game to look at the same environment from different orientations, then the light would have to remain aligned to environmental objects.