Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 877 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
Placing panels behind the view... #125784
04/23/07 09:30
04/23/07 09:30
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
In the manual it states:

Quote:

Panels and texts will always be displayed over all views independently of their LAYER values.




I'm assuming this is still relevant given "layer_sort" doesn't specifically mention that views and panels/text are independent of one another in regards to layer management.

The feature request is the ability to place panels behind a view. I don't know if this is a technical impossibility with DirectX, but if it isn't and is implemented, it would make the creation of 2.5D projects (realtime 3D on top of 2D backdrops) a much less tedious endeavor. In regards to implementing this into existing syntax, you could implement negative numbers for the panel.layer value (assuming layer can't already be set below zero). It would work just like the current panel.layer but if the value is negative then it will affect the layer stack behind the view.


Here's how you have to create a 2.5D in 3DGS without this requested feature. There may be alternatives, but this is the only way I can think of at the moment. I'll provide an example of the workflow with the feature afterwards:

--------------------------------------------------------

You have to place the 2D background on a block as a texture or import it as a sprite and place this background object a certain distance away from the camera so that it fills your screen. It also has to be scaled appropriately.

The actual 3D geometric level is completely invisible and will be in front of this background entity. The purpose of this geometry is to act both as a walkway for the player/NPC entities and as a collision hull for the walls and various obstacles (tables, chairs, rocks, buildings, etc).

Any element of the 2D background that the player can walk behind requires you to place a sprite representation of the object in front of the appropriate collision geometry. Not only must you figure out the correct distance from the camera to place it, but it also must be scaled to the correct size to match where it belongs on the background render.

This process can become very very tedious if there are a number of these sprites that must be placed, and the more backgrounds you have the more time consuming it can become.

-------------------------------------------------------------

If the requested feature existed, this entire process would be dramatically simplified. Placement of the background and those areas that can be walked behind is simply a matter of placing them on the correct layer in relation to the view and the player's position. Scaling would be eliminated given the nature of panels.

The master background will be at the bottom of the layer order and behind the view. There would be two panels for each walk behind object. One would be behind the view and the other in front of it. Depending on the player's position relative to the screen, the panel in front of the view would be toggled on or off, so the player will appear to walk in front of or behind the object as appropriate. I suppose "layer_sort" could be used, but I'd like to avoid a "slow" command that would have to be used all the time.

-----------------------------------------------------------------

If you combine this with my recent shadows on none surfaces request, you have two essential features that can be used to make a top of the line modern adventure game or any genre that uses similar techniques. Not being able to see stencil shadows cast appropriately on the hidden geometry just doesn't work if you want to compete.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Placing panels behind the view... [Re: Orange Brat] #125785
04/23/07 10:08
04/23/07 10:08
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This is an interesting feature, but I believe it can be realized with the current version. The SKY element is meant for just that, a backdrop bitmap on a layer behind the view.

We indeed plan to offer a 2.5 D template in the future. It is intended to use normal entities for the foreground (that can be walked behind), and sky layers for the background. This should work without new engine features.

Re: Placing panels behind the view... [Re: jcl] #125786
04/23/07 17:35
04/23/07 17:35
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Hmm, I actually considered the sky for background use, but I wasn't sure if it could be used for something like this. I'll have to experiment a bit. Thanks for the info. on the template.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Placing panels behind the view... [Re: Orange Brat] #125787
04/24/07 09:01
04/24/07 09:01
Joined: Sep 2005
Posts: 96
L
lyingmime Offline
Junior Member
lyingmime  Offline
Junior Member
L

Joined: Sep 2005
Posts: 96
The problem with sky is that you're going to want multiple layers in your scene (assuming there are things that the player can walk behind) and for the 3D player to be able to change layers relative to the 2D layers.

View entities are the way to go for this type of system as they can freely move above and below panel layers. The usual 3D level is run invisibly to provide collision detection. (The view entity positions are updated from the invisible level.) [I take it that this is basically the case for games like Final Fantasy 7 and 9.]

The advantage of using view entities over having the 3D level change layers is that each character can change layers independently (say, if you have one character in front of a wall and another behind it). The 3D level would treat all characters as though they were on the same layer and therefore as if they were at the same depth in your 2.5D environment.

If I understand, the difficulty that you are facing is in getting the collisions from the 3D level (the placement of walls, for example) to match the visual of the wall in the 2D image. This should be somewhat easier using the above approach. If you're making all of your backgrounds in a 3D application, this isn't too bad, as you have the 3-space coordinates of all of your scene elements. And if you're drawing all of your backgrounds, you're going to have to painstakingly match everything by hand anyway.

In the style of game that I am going for, it is important to relay depth information to the view entities (so that one can run to/away from the camera in addition to up/down/side), but there are times when a 2D collision-detection system for view entities would be helpful as well.

Here is where Conitec would have to help us out. Implementing this would likely involve having a 2D image mark the places where the view entity should not be passable. The image would scale as the entity moves to/away from the camera. There would be a similar scheme for panels, and the two would interact to create collisions. If you drew all of your background images, then, you would simply draw lines over them to mark impassible regions for the character. (And Gamestudio would gain a valuable tool for making more conventional 2D games in the process.)

Re: Placing panels behind the view... [Re: lyingmime] #125788
04/25/07 00:25
04/25/07 00:25
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Quote:

View entities are the way to go for this type of system as they can freely move above and below panel layers. The usual 3D level is run invisibly to provide collision detection. (The view entity positions are updated from the invisible level.)




There have been 1-2 long discussions about the use of view entities in regards to 2.5D games. I think it came down to too many limitations vs. level entities. Can view entities actually interact or be scripted to interact with the 3D level (geometry, lights, etc)?


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Placing panels behind the view... [Re: Orange Brat] #125789
04/25/07 05:32
04/25/07 05:32
Joined: Sep 2005
Posts: 96
L
lyingmime Offline
Junior Member
lyingmime  Offline
Junior Member
L

Joined: Sep 2005
Posts: 96
Could you point me to those? I would be interested in reading.

I've scripted view entities to interact with level geometry (and to depth sort with panels and other view entities). I can do the same for lights as far as using their direction, intensity, and color for shading, though I'm still working on how best to handle shadows. Simple drop shadows are do-able, but the level approach definitely has an advantage for any sort of stencil or dynamic.

How would you get around all characters occupying the same layer using the level approach? Multiple copies of your level with layered view cameras?

I've wondered why the level doesn't treat rays that travel on to 'infinity' as transparent and then show panels behind.

Re: Placing panels behind the view... [Re: lyingmime] #125790
04/25/07 06:12
04/25/07 06:12
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
I can't seem to find the old threads. I've tried all kinds of searches with different year ranges, but there's nothing. Here are my old bookmarks, but I can't figure out how to convert it (if you even can) to the new forum syntax. I think the first one was in User Requests and the second in Feature Requests, although I could be wrongs since these are ancient:

2D Zbuffer masking...: http://www.conitecserver.com/ubbthreads/...;fpart=1#365449

Zbuffer masking...2D gaming...: http://216.46.205.166/ubbthreads/showflat.php?Cat=&Number=398441&Main=377071

If I were to use a normal level along with panels, I wouldn't have to worry about NPCs since in most adventure games (what I'm interested in), the NPCs don't move around. The only time I'd have to switch panels on and off for the walk behind objects is when the player is at a certain part of the screen. If the player is above a certain predetermined section, I'd switch whatever panel(s) needed switching and then I'd switch back when the player crossed that threshold again.

I would think a major problem using view entities would be dealing with stencil shadows. I'm assuming you've gotten dynamic lights to look correct on an entity? For example, in the screen below, there's a dynamic light highlighting my character and because of my cast flag settings, I get that nice self shadowing across the face. This is an all 3D level and not 2.5. Can you get an effect like that with your view entity experiments?



The Wintermute Engine already has both of the features I've requested in this thread (the main one and the shadows one I linked to), but its 3D instruction set is young and nowhere near as mature as 3DGS. Plus, I don't want to use Blender or Cinema4D (the only two packages with a 3DS export that contains the info WME needs for collision, cameras, lights, etc).


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Placing panels behind the view... [Re: Orange Brat] #125791
04/25/07 17:35
04/25/07 17:35
Joined: Sep 2005
Posts: 96
L
lyingmime Offline
Junior Member
lyingmime  Offline
Junior Member
L

Joined: Sep 2005
Posts: 96
Self-shadowing should be possible. It's getting the shadows to cast on other objects that is problematic at the moment. The only thing I can think to do is render the shadow from the 3D level to a texture and apply it to a depth-sorting panel. Maybe? The problem with that is that the character stand-ins in the 3D level will need to be higher poly to get good shadow shapes (and they'll also need to be animated). One of the original advantages to this method was that the 3D level entities could be extremely low resolution and not animated, as they would never be seen.

I am unable to view those threads.

Re: Placing panels behind the view... [Re: lyingmime] #125792
05/01/07 07:47
05/01/07 07:47
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
The fact that those threads seem to be lost is irritating. There was some nice info pertaining to 2.5D techniques in them. I can't find them in a search, and I can't seem to convert the old format to the new forum syntax. I'm sure there's a way, but I've run out of variants.

Instead of bumping the shadows on none surfaces thread, I'll just post his here since it's related to it, but also to this one in some sense. The Animatrix short, "A Detective Story" from YouTube is copyrighted, so jcl once you view it, please remove the link if you don't want it posted on the forum. Sorry for posting it, but it best shows what I'm want to explain because 1. It's a black and white Noir work like The Disenfranchised (plus it kind of looks like it in places..the snow, this layering effect, the contrast, etc)), and 2. It shows the effect I've been playing with since the beginning:

http://www.youtube.com/watch?v=aMHCK5MTBOc

The relevant portion starts around the 53 second mark and ends at 1 minute 6 seconds. The parallax scrolling in the mid- and foreground layers is what to look out for, and specifically the part where the camera moves back and shows the telephone. My title will be using this effect a lot and I think it's what The Vampyre Story game I've mentioned does, too. That little piece of art is 2D in nature, yet it will be in a 3D world. As I've stated, I don't want to do a pure 2.5D game. If I wanted to, I'd be using Wintermute. I want to combine that aesthetic with realtime, so let's call it 2.75D.

Anyway, if I wanted to cast a nice shadow across that telephone, I can't do it in 3DGS right now (using stencil shadows I mean). In an actual level, the telephone sprite (or panel depending on how you do it) would be at that location and some invisible geometry that represents it would be just behind it. I'd want the shadow to adhere to this geometry, thus my shadows on none surfaces request.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Placing panels behind the view... [Re: Orange Brat] #125793
05/03/07 10:14
05/03/07 10:14
Joined: Sep 2005
Posts: 96
L
lyingmime Offline
Junior Member
lyingmime  Offline
Junior Member
L

Joined: Sep 2005
Posts: 96
I agree with your shadows on none request. Invisible objects should be able to receive shadows---that is, to have shadows appear in the level at the invisible object's position and conformed to its shape. Just as a thought, you want to make sure that the shadows appear only on the object's faces that are facing the camera (since the object itself is invisible you might see through to the shadow on the other side of the object) because when you position the shadow in front of a sprite or panel you're going to want only the 'forward' shadow shape.


It would be awesome if parts from threads like that (rather than disappearing) made it to the WIKI as discussions of why certain features in the engine are the way they are and what they can be used for.

Page 1 of 4 1 2 3 4

Moderated by  aztec, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1