Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Portals in GDK - Joining two 3D scenes

Author
Message
Cyber Knight
16
Years of Service
User Offline
Joined: 28th Apr 2008
Location:
Posted: 4th May 2008 23:21
Is there a tutorial or documentation about portal rendering with with GDK? I did a search on the GDK forum for "portal" and got zero results.

I'm trying to come up with a way of rendering outdoor terrain and plopping a pre-built building into it that you can enter and then run around inside like a dungeon. I'm not finding any portal functionality in the .chm that shipped with the GDK, so I wondered if anyone could point me in the right direction. I also read some interesting threads in the DBPro forum, so I assume this must be possible.

I think I could build a system like this, but if the GDK can already do it, it would be a lot easier.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 5th May 2008 06:49
I personally would start with a OOP wrapper of sorts to manage the models I have going etc... so I could easily turn off all the outdoors and turn on the building stuff and vice versa.

Whether you load portal on demand, or preload all... you at the minimum needs a "list" system so you can switch what objects are around.

Another trick.. is to set up each "Area" in a different place in 3d space.. (like building outside the skybox that surrounds the outdoors... then - just move the players position accordingly... you still need a list to exclude all the "out of eyeshot" things though...

And the load on demand technique still needs a list so you can remove the old, and on with the new... OR... Make separate programs and chain them... easier to manage MAYBE... but clunky... multiple load times etc.. which is acceptable if you ask me.. Far cry kinda does that.... though I think they do the remove all from ram and reload.. they dont chain processes.

I'm rambling ideas for ya ....

Cyber Knight
16
Years of Service
User Offline
Joined: 28th Apr 2008
Location:
Posted: 5th May 2008 11:03
Thanks for the ideas Jason - I was trying to DL your OOP wrapper from your code page on google and I kept getting an error with the archive :/ Looks very interesting from the threads though!

I started brewing my own OOP wrapper - got the big one done cDGObjecct lol - damn. Tons of functions in there. (Btw, there are a few functions that show up in the intellisnese that aren't documented - I might start a thread about those later.)

I spent a few hours wandering around the seamless world in WOW.
Conceptually I'm struggling a little here with implementing this with what I can find available in the GDK. I've got an object manager to create, link, unlink show and hide meshes. I could flag a mesh as "this is a portal to scene p," and check to see if it's being drawn, but from there I'm not sure how to tell the GDK renderer "make this a knockout and instead of drawing this polygon, render this list of objects from vector [x,y,z] at this angle and draw the contents where this poly should be"

Is there a way to per-pixel clip against a poly in the GDK?

If I could figure that part out, translating a culling shouldn't be a huge problem.

I thought of cheating a little by making a new camera and dropping that into the scene with a polygon cut-out but I can't seem to find the low level draw functions to do it - any ideas?

Login to post a reply

Server time is: 2024-11-20 09:33:37
Your offset time is: 2024-11-20 09:33:37