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!

Render big sky models and clipping

Postby The_Glitch » Sun Jul 23, 2017 1:48 am

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?
User avatar
The_Glitch
Competition winner
 
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Render big sky models and clipping

Postby hendu » Sun Jul 23, 2017 7:31 am

Snap them to the far plane in your vertex shader. Or render with two cameras, once with the sky and once with the game.
hendu
 
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Render big sky models and clipping

Postby devsh » Wed Jul 26, 2017 8:28 pm

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.
User avatar
devsh
Competition winner
 
Posts: 1882
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK


Return to Advanced Help

Who is online

Users browsing this forum: No registered users and 1 guest