Let's see if I have this right...

Started by
14 comments, last by Greven 22 years, 5 months ago
I happed to see Resident Evil the other day (the original, in all of it''s glory) and it made me think. How did they put 3D characters in a pre-rendered 2D world. So I sat and thought about it for a while. The best solution I came up with was a pre-rendered z-buffer as well. I know in apps like Bryce, 3DS, TrueSpace, etc etc etc, you can render the depth buffer. If you did that and then placed that in your z buffer before each frame (as your erase of the z) wouldn''t that make whatever you draw on to it be placed in the scene? So if you put someone back in the scene behind something, that they would be partially hidden by it? I would try this to see if I''m right, but I really lack the 3D expertise to actually complete this. I just want to know if I''m on the right track... Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
Advertisement
I think you''re right. As far as I can tell, there are no semi-transparent things you can stand behind (except for smoke, but that''s made out of sprites), so it looks like it could be done with a zbuffer.

However, to define where you can walk about, the map would also have to have 3D blocks overlaid on it. These wouldn''t be for display, just for ''where you can walk''.

Now that I think about it, you might be able to make do with a top-down height-map, as long as you can''t walk under thinks that you can also walk over on the same screen.

All your bases belong to us
CoV
Its just an image written directly into the framebuffer.

So the order of operations at frame-end are.

1) Shove large background image into framebuffer.
2) clear z-buffer..actually, what im i thinking!?!, the playstation doesnt have a zbuffer except for in software..all it can do is render 2d images on the screen and its up to the game to make sure triangles are in screen space..hence no such thing as texture correction or projection.
3) render 3d objects to framebuffer
4) shove framebuffer out to video.

There are also tricks that can be done to overlay transparency effects and other backgrounds to give a better sense of depth.
quote:Original post by Anonymous Poster
Its just an image written directly into the framebuffer.
1) Shove large background image into framebuffer.
2) clear z-buffer.
3) render 3d objects to framebuffer
4) shove framebuffer out to video.


This simply isn''t true: you can walk behind parts of the scene, so it isn''t just a case of drawing a background and foreground; you have to make sure that any object isn''t obscured by something that''s in front of it.

All your bases belong to us
CoV
One possible way of doing it it to sort all the visuals on distance from camera, then draw them front to back.

[The views stated herein do not necessarily represent the view of the company Eurocom ]

Eurocom Entertainment Software
www.Eurocom.co.uk

The Jackal
One possible way of doing it it to sort all the visuals on distance from camera, then draw them front to back.

[The views stated herein do not necessarily represent the view of the company Eurocom ]

Eurocom Entertainment Software
www.Eurocom.co.uk

The Jackal
I have no idea why it decide to post twice! {;P
You don''t necessarily draw the entire background first, then the characters, since they do in fact go behind objects and such. What you do is for each part of the background you assign a z value, then you define how the character moves in relation to the depth of the current background, which basically means you decide what angle the camera and viewer are seeing the action from. Then you just draw farthest to nearest. You also have to apply collision rectangles or circles or whatever you want obviously. And you don''t need a hardware zbuffer either, you want a z value for each object, not each pixel.

------------
- outRider -
But then how do you use a fully pre-rendered scene? If I pre-render each object, sure that would work. But then your scene will lack the lighting quality and shadow effects that you would otherwise have... If you use the z-buffer approach and you pre-define the area in-game (where you can walk, where things are) as someone said earlier, the pre-rendered scene would look better I think...

Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
Render the whole scene as one, then later cut out all the parts that are supposed to go over the characters, so you can draw them seperately. To use the Z buffer to render your prerendered scene would be impossible, at least from the way you described as wanting it done. Z Buffer affects actual polygons with vertices, not a giant static texture.

------------
- outRider -

This topic is closed to new replies.

Advertisement