-
2d objects in 3d
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).
-
Advanced Member
Frequent Contributor
Re: 2d objects in 3d
I've never seen that game, but I think you might be refering to either billboards or imposters.
-
Advanced Member
Frequent Contributor
Re: 2d objects in 3d
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.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules