PDA

View Full Version : UT Skybox, how is it done!?!?



GL_ZERO
09-05-2003, 08:56 AM
Well if you fly throught the map (as ghost) in UT you'll see that the skyboz is actually a small box drawn at a distance from the game map.
I believe they render the skybox with a camera that can rotate but that is fixed in the center of the box. After that the view from the players camera is rendered.

Donno if its some sorft of dubble buffering. But how do you render something and then render of the same frame again without losing the previous frame. With this done you can have an HUGE world but with a small skybox, this saves some texture memory.

Hope you'll understand what im trying to tell, but does anyone know if its true or that my theory is correct??

Leyder Dylan
09-05-2003, 09:30 AM
If you center the skybox with the player position, that's you want to explain ?

GL_ZERO
09-05-2003, 09:35 AM
hmm thats alot easier ... i think lol http://www.opengl.org/discussion_boards/ubb/tongue.gif

edit.

No i meant that 1st render the view in the skybox. and then render the playerscam. I got it (sort of)

glPushMatrix();
skycam.glLookAt(); // Skycam
glCallList(Skybox); // draw skybox
glPopMatrix();

glCamera.glLookAt(); // PlayerCam
.
.
.
}

But now only the skycam rotates but the playercam is fixed. I can move but the mouselook doesnt work.

[This message has been edited by GL_ZERO (edited 09-05-2003).]

GL_ZERO
09-05-2003, 09:55 AM
Oke i got it.

The skycam is a copy of the normal camera, but i have removed the keyboard movement functions. In the mouselook function i had SetCursorPos(width, height). Width and height are the window size.

First i update any mousemovement in the skycam but i dont set the cursor in the middle yet. Afther that i update the playercam and in the playercam i do set the cursor in the center of the window.

The result is the UT skybox http://www.opengl.org/discussion_boards/ubb/biggrin.gif

edit

damn not quite yet. the size of the skybox has influence in the drawdistance.

[This message has been edited by GL_ZERO (edited 09-05-2003).]

GL_ZERO
09-05-2003, 10:11 AM
Damn im quick i solved that one 2 http://www.opengl.org/discussion_boards/ubb/tongue.gif

void DrawScene()
{
.
.
.

glPushMatrix();
glDisable(GL_DEPTH_TEST);
skycam.glLookAt();
glCallList(Skybox);
glEnable(GL_DEPTH_TEST);
glPopMatrix();

glCamera.glLookAt();
.
.
.
}

Leyder Dylan
09-06-2003, 11:20 AM
Hi,

Can you post some screenshots ?

GL_ZERO
09-06-2003, 02:25 PM
Sure

Here are the UT2003 screens (they used the same method in the 1st UT) Type "ghost" in the console command for noclipping mode and fly around and outside the map 2 see what i mean.

Normal sceen as you would see during gameplay
Screen00000 (http://members.home.nl/skynet2097/Images/UTSkybox/Shot00000.jpg)

Screen outside the map, still a normal skybox
Screen00001 (http://members.home.nl/skynet2097/Images/UTSkybox/Shot00001.jpg)

You can see the map with the skybox
Screen00002 (http://members.home.nl/skynet2097/Images/UTSkybox/Shot00002.jpg)

Here we see the actual skybox, it a small box a close 2 the map.
Screen00003 (http://members.home.nl/skynet2097/Images/UTSkybox/Shot00003.jpg)

Here we see it again.
Screen00004 (http://members.home.nl/skynet2097/Images/UTSkybox/Shot00004.jpg)

And here is my version, use the UT2003 textures http://www.opengl.org/discussion_boards/ubb/tongue.gif
My Screen (http://members.home.nl/skynet2097/Images/UTSkybox/Screen.jpg)

The skybox has a size of 1.0f while the grid you see it 20.0fx20.0f. I alwasy wondered how Epic did that (i didnt know anything from opengl programming then) and now i have my own http://www.opengl.org/discussion_boards/ubb/tongue.gif http://www.opengl.org/discussion_boards/ubb/biggrin.gif

[This message has been edited by GL_ZERO (edited 09-07-2003).]

Leyder Dylan
09-08-2003, 04:15 AM
Damned, looking good man.

But the last screen is taken from your engine ?

Are you using Pixel Shader for the water or it's a streched texture ?

[This message has been edited by Leyder Dylan (edited 09-08-2003).]

GL_ZERO
09-08-2003, 10:52 PM
Yeah the last screen is from my engine. I dont use any shaders, the textures are like that. (Extracted from UT2003) http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Leyder Dylan
09-09-2003, 12:38 AM
It's possible to follow your project with your website ?


I'm programming an engine too and I make my maps under UnrealEd 3.0, I export them into .t3d file and I clean the file with my own program for keeping only what I need.

Here're some screenshots :

The T3D Converter :

http://users.skynet.be/fa550206/Slug-Production/Download/Screenshot/T3D-Convert-0.7/08.29.2003.JPG

The T3D Engine :

The MDL Loader :

http://users.skynet.be/fa550206/Slug-Production/Download/Screenshot/Slug-3D-V-0.7/MDL-Model.jpg

The MD2 Loader

http://users.skynet.be/fa550206/Slug-Production/Download/Screenshot/Slug-3D-V-0.7/MD2-Model.jpg


The MS3D Loader

http://users.skynet.be/fa550206/Slug-Production/Download/Screenshot/Slug-3D-V-0.7/MS3D-Model.jpg


The Engine (map global view)

http://users.skynet.be/fa550206/Slug-Production/Download/Screenshot/Slug-3D-V-0.7/T3D-Engine.jpg

As you can see, I've many things to fix for the models loader because the fog is not applyed on them so many many work for only one man (me http://www.opengl.org/discussion_boards/ubb/smile.gif)



[This message has been edited by Leyder Dylan (edited 09-09-2003).]

GL_ZERO
09-09-2003, 07:17 AM
"t's possible to follow your project with your website ?"

Not yet, I was planning to do it but i dont have much time for maintaning my website.

this is my website, as you can see its till under contruction. from tha day i put it up lol 06 october 2002 lol.

But soon i will start with it cuz i have lots of work that i want to show and need some input about them. http://www.opengl.org/discussion_boards/ubb/smile.gif

Home (http://members.home.nl/skynet2097/)

WOW your engine is really kewl and your working with UnrealEd 3.0 to. I never got the hang of it (UnrealED) so i make all my stuff in 3ds Max and use it with a 3ds importer ASE or a complete opengl converted code. Im still stugglin gto get a good importer that has all the animation data. I got FlexExporter and it exports fine now i need to write/find an importer for ir http://www.opengl.org/discussion_boards/ubb/tongue.gif

Leyder Dylan
09-09-2003, 11:58 PM
I'm only one in the team so I program in my spare time but it's ok for me, I've posted some "Job Opening" but nobody respond me http://www.opengl.org/discussion_boards/ubb/smile.gif

Maybe my website or my project is not cool enoug for recruiting people.

So if you can use 3D Max, I think that MS3D can import/export the 3DSMAX Models so if I need help for making a few models, can you help me ?

GL_ZERO
09-10-2003, 03:24 AM
Sure no problem http://www.opengl.org/discussion_boards/ubb/smile.gif

What is the link 2 your website, i would have responded to the "job opening" http://www.opengl.org/discussion_boards/ubb/biggrin.gif

Leyder Dylan
09-10-2003, 01:16 PM
www.slug-production.be.tf (http://www.slug-production.be.tf)