- Home /
Setting up isometric scene with 2d pre-rendered ground and 3d models
Hi.
I have a question about setting up isometric scenes. So I have a pre-rendered image which I took from isometric view. I set it up as a texture on the quad with it's face rotated to look up.
So I need orthographic camera rotated by 90 degrees on X axis to look down at this quad. That's all fine and dandy since ground is already pre-rendered from specific angle and it looks isometric that way. I add a new model, let's say a PC. Like I said, it's a 3d model, no sprites. I set it on 0,0,0, so camera shows him from the top. Now I need him in isometric view also. I add new orthographic camera rotated to 30,45,0 and I set up the position of the camera so I can see him correctly. I set new camera to render first, only 3D models layer and I set clear flag to depth only. Old top down camera is set to render second and only ground (quad) layer. That creates great composite render which shows both ground and 3d models in iso view.
When I move my character he moves outside of the plane since secondary camera rotation is different and the "plane" on which he is moving is actually intersection of the camera projection and x,0,z plane.
This is problem because I want to use depth maps for the ground to obscure 3d objects, also I would use nav grids to mark parts of the ground as walkable and so on.
There aren't many games made like this. Most of the solutions I found are either going full 3d or using tile grid with sprites. Obsidian is doing for Project Eternity something similar, check their update #49. http://www.youtube.com/watch?v=AUleDEFkUtE. So if you have any idea what they used I would appreciate if you share that knowledge. I'm just talking about basic stuff here, not their dynamic lightning and fancy animations :)
So that's it. I'm open to any ideas and I'll appreciate any help you have to offer.
Thanks
Answer by Cherno · Nov 18, 2013 at 12:57 AM
I would do it like this:
make a quad with the background image, directly facing the camera, which is actually set up as an isometric camera itself. Then, make another quad parallel to the ground but make it invisible, and give it a collider. This will be your actual ground on which characters etc. move. Now you have to also put in some invisible colliders for the terrain that correspond to the terrain of the background image. Lastly, make sure that the background plane is either farer away from the camera than anything else, or render it with a seperate clone camera that onyl renders the background, with a depths greater then the main camera that renders everything else.
Thank you for your input. I thought about something like that, but there are a quite few problems with that. One of them that it would be hard to make collisions/depth masking pixel perfect like with depth mask. On the other hand it gives us the freedom of maybe easier implementation of "static" 3d objects on the scene.
Anyway thanks again.
Cheers
I would think it's easy enough for simple movement obstacle blocks, but for anything more detailed, like for cover in ranged combat, there have to be other solutions.
Your answer
Follow this Question
Related Questions
Several 2d scenes on screen 0 Answers
Object Collider Isometric problem 0 Answers
Need help with Collision detection for tiles in Isometric 2D 1 Answer
Can't change TileMap tile height when painting 1 Answer
Colliders, colliders everywhere 1 Answer