Render big sky models and clipping

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Render big sky models and clipping

Post by The_Glitch »

I have some sky models from halo but I have run into one issue in halo the sky models are fairly large models several times the size of a map or environment. What would be a good solution for rendering a skybox model that does not require the camera to have an insane far clip value?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Render big sky models and clipping

Post by hendu »

Snap them to the far plane in your vertex shader. Or render with two cameras, once with the sky and once with the game.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Render big sky models and clipping

Post by devsh »

It wont work if the model is not convex (i.e. should self-occlude from some view-points), for this you want to still use a functioning depth-buffer.

There is a way to build the projection matrix, so it has an "infinite far plane" however you will render with "two cameras" and you will have to clear the depth buffer in-between switching.
Post Reply