Hey everyone, this is my first real project and my first forum post. I dident find anything that specifically addressed my problem so I decided to make this post. If this is something that has been asked to death and I was simply unable to find it myself I apologize.
Game idea:
As stated in the title, im trying to build a top down isometric game with
tile based movement ala shadowrun
or bastion
Like the 2 inspirations mentioned above, i also want my game
to have a 2d map with a 3d PC
Problem:
Im not sure how to go about / where to start looking when it comes to the 3d integration
There is plenty of information on how to make a fully 2d game as mentioned above, however,
im not even sure if (in the case of shadowrun for example):
the map is 3d (like xcom) with 2d sprites in front? (or are these weird 3d models ?)
the map is 2d and they somehow put 3d models on top of the sprite?
or something else entirely
Im pretty sure there is a rather simple clarification for this, but I simply wasent able to find it.
Im not necessarily looking for a solution, but rather some insight on how to approach the issue.
Anyways, thank you for taking the time and reading my post
Any help is greatly appreciated.
I am not a 3d specialist, but I already tried to manage 2d sprites in a 3d scene and it did not work very well. If you choose to work on 3d, then all your assets should be 3d objects. If you want to work with sprites and only a few 3d objects, I think you’ll have a better chance by manipulating 3d objects in a 2d scene. May be you can try to do it basically creating a simple 2d scene, putting a sprite that would take a large part of the screen, and adding a simple 3d object in front of your sprite to see what it happens and if you can easily manage your 3d model, light and other things. From code you can manage the “sorting layer” and “sorting order” properties of any renderer, it is not specific to the SpriteRenderer. I made a 2d isometric game and shared my experience, maybe this can help you to build the 2d map and manage 3d objects inside: Blogs | Game Developer
The above referenced game, Bastion, was made by creating 3D models and characters, then taking screen captures of them from different angles, saved as .png files and then they make sprites out of them and make a 2D world which looks 3D.
Shadowrun, as I’ve read, does use 3D polygonal characters in a 2D isometric world - however, the characters are sculpted and shaded to specifically match the setting. This is a long and difficult task for an individual to do alone if you also have to make the rest of the game on your own.
I am looking for the same thing as the one mentioned in the question. I want to combine isometric 2D static tilemaps with moving characters made with 3D meshes. This task looks very difficult, but it is not difficult when you know a special trick.
The main trick of combining 2D and 3D is a method of communicating them. Both types of graphics support horizontal coordinates and in most cases this information is enough for simple isometrically styled games and applications.
The universal way to combine 2D with 3D is rendering the 3D into a buffer, then splitting the buffer into tiles according to horisontal coordinates and then moving these tiles into the 2D sorter which combines all the tiles as it always does.
This task is quite simple and can be standardised in a game engine. If game engine supports this functionality, artists do not have to re-invent the wheel thousands and thousands times.
I have no idea whether such mechanism is built into Unity, but there are some other engines, including the customly made ones, which support this functionality.
Have a look at this demonstration:
Here is an explaination of how Godot engine does this thing.
A 3D model is rendered into a custom Viewport node rather than the main Viewport. The custom viewport is used as a source of a 2D sprite which is then used together with all the 2D tiles.
ViewportTexture
A ViewportTexture provides the content of a Viewport as a dynamic Texture2D. This can be used to combine the rendering of Control, Node2D and Node3D nodes. For example, you can use this texture to display a 3D scene inside a TextureRect, or a 2D overlay in a Sprite3D.