Jump to content
View in the app

A better way to browse. Learn more.

Obsidian Forum Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hello everyone I'm new here, I have registered mainly to ask one question that made me wondering for some time. I'm a Unity user too and was curious about Project eternity using 2d environments, so one day I wanted to try something in unity to achieve a quick half ***ed project.

 

But I was concerned about one important aspect of the whole thing, the depth in 2d. Now I'm not a big explainer so I'm gonna give you guys an example. So imagine you have an isometric 2d box room, and in the middle of it there is a pillar. Now when you are front of the pillar you see your character, when behind it should be hidden by the pillar, and thats fine. But how you really calculate the depth of the 2d space, the pilalr beign just a 2d element have no real height, so I was curious how Obsidian managed to have a fake depth on items like the pillar, how you know when something is in front of the item or behind.

 

I'm really interested in how that was done(in Unity, not just the basic concept of it), just for the hell of it.

Edited by Neurological

From the first experimental build video where the map editor was shown it looked like all 2D elements were in a 3D map, so it has a real height and depth, it's like a 2D prop on a stage. A 3D map is being rendered with both 2D (the pillar) and 3D (characters), the 2D elements are not being directly rendered. Obsidian can also use 3D models, but for pillars 2D should be enough.

Edited by AwesomeOcelot

As far as I know, the ocelot speaks truth.  The rendering of the pillar is 2d, but there is also a rough and invisible 3d model of it that determines occlusion and player movement.  I imagine this also serves as a hitbox for projectiles and the like.

  • Author

Still a model of the pillar alone won't do anything as is just a bunch of polygons, so my thougth was maybe some sort of shade using your idea of a dummy model when you get behind the shader on the model hides the player geometry.

 

I always found interesting one pic on the Baldur's Gate credits video:

 

If you look around 1:40 you see they drawn some invisible polygons probably weren't polygons there, but they were used to say what is background or foreground with a base too, so I wonder if Project Eternity have this approach like Pipyui suggested with the dummy model and maybe a shader to tell when is back or front.

The shader determines what is visible, e.g. ray tracing. The 2D elements are made like flat prop boards on a stage in a 3D map, the position in the 3D space determines whether something is rendered infront or behind another. The engine determines where a player can move with a collision mask that's semi-2D. All of this has been shown in the updates.

Edited by AwesomeOcelot

  • Author

Can you link me an update where I can see this? I guess I lost it in the sea of updates. Thanks.

the way i understand it, the engine calculates everything in a 3D enviroment, and then pastes the result in the 2D image on the screen.

The words freedom and liberty, are diminishing the true meaning of the abstract concept they try to explain. The true nature of freedom is such, that the human mind is unable to comprehend it, so we make a cage and name it freedom in order to give a tangible meaning to what we dont understand, just as our ancestors made gods like Thor or Zeus to explain thunder.

 

-Teknoman2-

What? You thought it was a quote from some well known wise guy from the past?

 

Stupidity leads to willful ignorance - willful ignorance leads to hope - hope leads to sex - and that is how a new generation of fools is born!


We are hardcore role players... When we go to bed with a girl, we roll a D20 to see if we hit the target and a D6 to see how much penetration damage we did.

 

Modern democracy is: the sheep voting for which dog will be the shepherd's right hand.

  • Author

Ah many thanks, very interesting.

We use a 2D depth map render that is separate from the final/beauty render.  The depth map has the same resolution as the final render and allows the in-game renderer to determine the depth each corresponding pixel has from the camera.  Because it's an isometric render (no parallaxing), it simply does a per-pixel comparison to sort the scene.

  • Author

Oh I see, I did my own way trying to figure out what you sued, in this simple prototype:

 

http://games.neuro-lab.net/resources/Build/Build.html

 

Just wait for the cylinder to move. I did it with two cameras, one is top down and render only the 2D background, the other render only the 3d portion which are placed on top of the 2d background, but the second camera render isometrically. Surely is not pixel perfect on the colliders, especially with AA off you can see the seams.

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.