Sign in to follow this  

Mesh (Skybox) Positioning

This topic is 4032 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have mesh file which is a skybox. I am clearing the z-buffer and disabling z-writes, rendering the skybox, enabling z-writes, then rendering the rest. The problem i have is before rendering the skybox I am trying to move the mesh based on the camera position, ie so the camera is always in the middle of the skybox. I am unsure how to calculate this as i am not sure what point on the mesh is where i said draw the mesh. if i set the meshes transition to: (0, 0, 0) Which of the 8 points making up the mesh will actually be on (0, 0, 0)? Also the points in the .x file are all either -0.5 or 0.5, so would it be safe the assume in my application that the size of the square will be 1?

Share this post


Link to post
Share on other sites
The position of that mesh is it's (0, 0, 0) point. So if all of it's vertices are 0.5 or -0.5, then the center of that box is at (0, 0, 0). So, when rendered at (0, 0, 0), none of the vertices will be at that point: the center of the box will be.

And yes, the edges will have a length of 1. We're talking about units here, simple floating values. These translate directly from a modelling program to any other program.

Share this post


Link to post
Share on other sites

This topic is 4032 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this