1
\$\begingroup\$

I'm trying to make a simple scene where the camera is in orthogonal mode with isometric settings just like if it was an isometric 2D game. That's because I have already tried doing it with 2D only but it wasn't possible, so I switched to 3D hoping I will achieve that.


MAJOR EDIT:

Switching to 3D I would like (if it's too complex I don't care) to add a sort of lighting feature in order to make some sides darker or brighter than other sides. In addition to that, I want to be able to rotate the camera by 90deg in 90deg around the player to visualize the scene from 4 different angles.

My scene has to render some cubes (which could also be on top of each other) and make them look like this (taken from here):

2

Original size image: 3


Without any anti-aliasing filter applied, just the pixels... Here's an example of how it should be rendered with other blocks using Tiled:

4


MAJOR EDIT:

I tried making the cubes a billboard QuadMesh always facing my orthographic camera but it's a very strange way to do this and as the cubes are now 2D billboards at the center of the block, the player gets sometime rendered before and sometime after the billboard based on the position, and that's absolutely WRONG!

Then I tried to make a shader to make a cube like this:

5

to look like the previous images but it didn't work as I wanted.


I also already tried the shader applied to a 2D image which floors the pixels. Still, the output effect is not what I need, because I don't like the single pixels to be in a fixed position. I want the pixels to be aligned with the block, so when the player moves, the pixels don't get brutally shifted to the new giant pixel size but get shifted smoothly on the screen. Obviously, down-scaling also doesn't work as I want.

Is that possible?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ You can still use 2D pixel art in a 3D game. I think having such specific control over how the art looks is going to require pixel art. Otherwise you're going to get aliasing artifacts in whatever kind of pixelation effect shader you're using. So I would suggest making the blocks have 3D collision but rendered as sprites always facing the orthographic camera. \$\endgroup\$
    – Romen
    Feb 24, 2023 at 20:18
  • \$\begingroup\$ @Romen that could be a good idea! I'm gonna try but I have a question... Assuming I'm using the exact same image of the post (the one in the original size) on Quad meshes in billboard mode, how should I size the quad and where should I put a new quad in terms of coordinates or distance from the other block? it's very tricky!! (also sorry for by bad english) \$\endgroup\$
    – Crih.exe
    Feb 24, 2023 at 21:03
  • \$\begingroup\$ I would start by setting up the ortho camera to the correct angles (pixel art isometric uses 30° inclination from the horizontal plane). Place the blocks as if they were just cubes at integer coordinates, and render the billboards at the centers of the cubes. Then see what it looks like from there, the sprites are probably going to need to be scaled up or down to fit with each other. The size of the orthographic camera view and the apparent width of the cubes can be used to calculate what scale factor for the sprite you need, but you can also just experimentally determine it. \$\endgroup\$
    – Romen
    Feb 24, 2023 at 21:17
  • \$\begingroup\$ @Romen I tried it, its a nice workaround but I don't think this is a good way to do that (please let me know if I'm wrong), considering that I want to create little worlds (idk like 128x128 or 256x256) where blocks can be on top of other. btw unfortunately the billboard gets rendered at the center of the block and that makes sprites being rendered before the blocks resulting in a strange player rendering. \$\endgroup\$
    – Crih.exe
    Feb 25, 2023 at 17:50
  • \$\begingroup\$ I'm not sure if you've seen this yet: reddit.com/r/godot/comments/mcqzwc/… there is a detailed explanation of how it's done in the comments. However, sprite pixels are still slightly distorted in 3D in that example (and the same happens with billboarded 3D sprites) - which I'm hoping to find a fix for.. not sure if there is a way around that though. \$\endgroup\$
    – waffles
    Mar 31, 2023 at 17:45

0

You must log in to answer this question.

Browse other questions tagged .