Jump to content
  • Advertisement
Sign in to follow this  
iEat_Babies

[XNA 4.0] Sky sphere

This topic is 2568 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 a sky sphere to surround my 3d world. It will always be centered at the camera's location so the sky is "endless". Therefore the camera is inside the sphere.
However, the only way I can get it to render properly is if I change "CullMode.CullCounterClockwiseFace" to "CullMode.None" when I draw the sky sphere, then back again once it has been drawn. Is there a way to fix this other than to change the cull mode?

Share this post


Link to post
Share on other sites
Advertisement
When you're building your sphere mesh, invert the order of each faces' vertices. That way the visible face will be inside the sphere instead of outside.

Share this post


Link to post
Share on other sites

When you're building your sphere mesh, invert the order of each faces' vertices. That way the visible face will be inside the sphere instead of outside.

Ok that makes complete sense..... but how?
I'm sorry but I'm completely new to this. I am completely new to Maya (2012), that is what I am using. Could you please give me some direction on how to do that? All that I did was create a sphere in Maya and export it as a .fbx and import it.


Thanks!

Share this post


Link to post
Share on other sites

Ok that makes complete sense..... but how?
I'm sorry but I'm completely new to this. I am completely new to Maya (2012), that is what I am using. Could you please give me some direction on how to do that? All that I did was create a sphere in Maya and export it as a .fbx and import it.Thanks!


http://www.google.com/search?q=maya+2012+invert+normals

Share this post


Link to post
Share on other sites
[font="Arial"]

[quote name='iEat_Babies' timestamp='1310357485' post='4833579']
Ok that makes complete sense..... but how?
I'm sorry but I'm completely new to this. I am completely new to Maya (2012), that is what I am using. Could you please give me some direction on how to do that? All that I did was create a sphere in Maya and export it as a .fbx and import it.Thanks!


http://www.google.co...+invert+normals
[/quote]
Is inverting the normals the same as[color=#1C2837] inverting the order of e[color=#1C2837]ach faces' vertices?[/font]

Share this post


Link to post
Share on other sites

[font="Arial"][quote name='EJH' timestamp='1310398953' post='4833779']
[quote name='iEat_Babies' timestamp='1310357485' post='4833579']
Ok that makes complete sense..... but how?
I'm sorry but I'm completely new to this. I am completely new to Maya (2012), that is what I am using. Could you please give me some direction on how to do that? All that I did was create a sphere in Maya and export it as a .fbx and import it.Thanks!


http://www.google.co...+invert+normals
[/quote]
Is inverting the normals the same as[color="#1C2837"] inverting the order of e[color="#1C2837"]ach faces' vertices?[/font]
[/quote]

It's not the same thing, but it results in the same thing, namely the inversion of the plane normal. It has to do with the way the normal of a triangle is calculated in the GPU.

Share this post


Link to post
Share on other sites
You should be able to change the culling to front facing so that the sphere will not be culled. This way you dont have to worry about changing the winding order of the triangles.

But, just so you are not confused, inverting the normals will not allow you to use the cull setting you wish to render the skysphere correctly.

The easiest change is the one I just suggested.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!