Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: anarchist on February 14, 2011, 02:13:34 PM

Title: 2.5D Items that hide the actor
Post by: anarchist on February 14, 2011, 02:13:34 PM
Our graphics designer has almost finished the first scene and it is about time to tell him what to deliver. But I got a bit confused as to what and how to deliver. My confusion was increased when I saw this otherwise excellent 2.5D demo http://forum.dead-code.org/index.php?topic=2527.0 (http://forum.dead-code.org/index.php?topic=2527.0)

In the demo mentioned above, they have their background image and a separate image (which is rendered last in the scene) with the items that hide the actor. Is this really necessary? I thought that when we export the simple 3d model of the scene (the .3ds file), those things were done automatically.

So, what do we need to export to have everything required to build and start scripting our 2.5D scene?
Title: Re: 2.5D Items that hide the actor
Post by: Spellbreaker on February 15, 2011, 09:58:19 AM
Sure you can put them into the geometry file too. As far as I see the things like the lamp or the window layer are simply always "on top" and are not connected to the floor in any way, so you can simply put them as a layer on top of your scene.

You can mix the variants if you like to. Take a look at the wme3d tech demo in the WME package for the other way :)

In general, the rendered scene and a correct geometry file should be enough.

greets,

spellbreaker.
Title: Re: 2.5D Items that hide the actor
Post by: anarchist on February 15, 2011, 06:11:13 PM
Thank you Spellbraker. I have checked the wme_demo_3d that comes with WME Dev Kit and I have noticed that it uses the "common" way of adding a sprite entity in the scene as a free entity. This seems enough to let the engine know when to hide the 3D actor.

Sure you can put them into the geometry file too.
.
.
.
In general, the rendered scene and a correct geometry file should be enough.

I want to believe you but neither demo shows what you claim  ::) If the geometry file is enough then why use the methods in the two 3D demos? Is it because the geometry file takes up resources when the game is run?
Title: Re: 2.5D Items that hide the actor
Post by: Mnemonic on February 16, 2011, 12:50:20 PM
WME1 is still predominantly 2D engine. So all the masking is done in 2D. However, as a side-effect of the stencil shadow algorithm, the hidden geometry is also rendered to the depth buffer, so when stencil shadows are enabled, 3D actors are masked by hidden geometry. But like I said, it's just a side-effect.
Title: Re: 2.5D Items that hide the actor
Post by: anarchist on February 16, 2011, 01:23:49 PM
Thanks for your response Mnemonic but you haven't really answered my question  :-\

Is the hidden geometry enough to hide the actor from objects in front of him or do I have to use one of the two methods I have discovered so far?
Title: Re: 2.5D Items that hide the actor
Post by: Spellbreaker on February 17, 2011, 10:40:49 AM
That was what I meant. As Mnemonic said, it's just a side effect, but it actually works.

However, as a side-effect of the stencil shadow algorithm, the hidden geometry is also rendered to the depth buffer, so when stencil shadows are enabled, 3D actors are masked by hidden geometry.
Title: Re: 2.5D Items that hide the actor
Post by: anarchist on February 17, 2011, 12:34:38 PM
Ok now it is clear thanks a lot Spellbraker and Mnemonic.