🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Hid. Surf. Rem. / Clipping technique?

Started by
1 comment, last by paulcoz 24 years, 4 months ago
Just wondering if anyone else has considered this insane idea before (I think it will only work with objects that never move in the world). It has one bad-ass array: Instead of taking an objects position, transforming it to world space, then transforming it to camera space, then calculating whether or not it can be seen (doing frustrum clipping etc..) or some other fancy-pants clipping technique, you pre-calculate everything like this: (1) Design your map. (2) Run pre-calculation which: (a) carries out all transformation calculations on all objects for a specific camera position. At this stage the only thing left to do is transform to 2d-screen-coordinates. You store these values in an array and you only store the values of objects which can be seen. (b) repeat this process for every possible camera position and also every possible camera orientation. Instead of doing a lot of transformations everytime you move the camera you "simply" plug in your camera position and orientation in the world and you have all the transformed values at your fingertips: typedef struct { float x,y,z; // values just before projection (any other values here too) } world; world[cam pos x][cam pos y][cam pos z][xaxis][yaxis][zaxis]; If you just store all of the visible objects at each memory location (which represents a specific camera position / orientation) you don't have to do any VSD or clipping because you did it all before. I'm not quite how you can adapt this to work with floating-point values for x, y, and z camera position & xaxis, yaxis, and zaxis rotations (eg. arrays requiring int values as parameters) & that array might take up a lot of memory. Paulcoz. "He of crazy ideas" Edited by - paulcoz on 2/18/00 1:53:36 AM
Advertisement
I seem to recall the Myst used this technique...

Seriously, the amount of memory required for what
you are talking about is astronomical.
Hey, at least it will be compatible with a 486 in software......with 1.5 gb of ram

This topic is closed to new replies.

Advertisement