PDA

View Full Version : 2d objects in 3d



fortikur
04-22-2004, 02:50 AM
I'm working on a 3d engine, which works almost like Resident Evil.
My questions about this are the follwing:

1. What is the technique programmers use, for example in Resident Evil to have pre-rendered, reality-like objects, which aren't really 3d. These object are only(?) "shaders", which let the users see the character if they are in front of that object, but they are "covered" by the object if they are behind it. I think these are only rectangles in 3d space, which the map is shown in a special way on. But that technique would cost too much time to use. Is there a better way to "blend" 3d objects by 2d objects?

2. Is there a name for that technique?

If I didn't express myself correctly, just think about objects, that can be walked around and if you get behind them, you see your character really behind them (blended?), but if you are closer to the camera, than the object, you have your character covering the background (and the object).

plasmonster
04-27-2004, 09:40 PM
I've never seen that game, but I think you might be refering to either billboards or imposters.

arekkusu
04-27-2004, 11:45 PM
It's called a Z-buffer and it goes back way earlier than Resident Evil. Look at old Sierra games like King's Quest or Space Quest.

For each room, there is a prerendered 2D bitmap that the character(s) can walk around in. Every pixel in the bitmap has a Z value (0-255 can suffice, but in GL it can be 32 bits if needed) which is used for masking. See GL_DEPTH_TEST.

Krisztian
05-18-2004, 11:06 PM
If't it's real time rendering, than of course the rendering engine. However, if you go to www.newtek.com (http://www.newtek.com) to look at lightwave, it has a feature called "surface baker" that has some incredible results that can be enhanced by making the rendering engine work with the "baked" objects. I think "serious sam" uses this also and they have plugins and an editor for lightwave. :) :) :) :) :) .