|
Placing panels behind the view...
#125784
04/23/07 09:30
04/23/07 09:30
|
Joined: Aug 2000
Posts: 7,490
Orange Brat
OP
Senior Expert
|
OP
Senior Expert
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]
#125787
04/24/07 09:01
04/24/07 09:01
|
Joined: Sep 2005
Posts: 96
lyingmime
Junior Member
|
Junior Member
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]
#125790
04/25/07 06:12
04/25/07 06:12
|
Joined: Aug 2000
Posts: 7,490
Orange Brat
OP
Senior Expert
|
OP
Senior Expert
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#365449Zbuffer masking...2D gaming...: http://216.46.205.166/ubbthreads/showflat.php?Cat=&Number=398441&Main=377071If 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: lyingmime]
#125792
05/01/07 07:47
05/01/07 07:47
|
Joined: Aug 2000
Posts: 7,490
Orange Brat
OP
Senior Expert
|
OP
Senior Expert
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=aMHCK5MTBOcThe 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
|
|
|
|