Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About WilliamWyattEarnshaw

  • Rank
  1. WilliamWyattEarnshaw

    Inside-Out Sphere

    Does no one know how to do this? Come on, this seems like something simple I am just not familiar with the language.
  2. WilliamWyattEarnshaw

    Inside-Out Sphere

    I added a small red sphere to mark the position of the light and discovered I was very wrong in my thoughts as to what was happening. Anyways, here are some pictures. [attachment=2821:temp.jpg] In this picture it shows the light inside of the "arena." It is not illuminating the arena at all. [attachment=2822:temp.jpg] And here is a picture showing the light outside of the arena, illuminating it as usual. I need the light to illuminate the inside of the sphere. How do I do this?
  3. WilliamWyattEarnshaw

    Inside-Out Sphere

    Maybe I am wrong in my assessment then. I have tried making the arena sphere a +10 scale and then reversing the cull mode so I can see inside of it, but the lighting still looks very strange. I want the point light to illuminate the entire inside of the sphere, but it seems to only illuminate one bit at a time. Strange things appear to happen when you place a light inside of a mesh.
  4. WilliamWyattEarnshaw

    Inside-Out Sphere

    Ok, original post is below, but skip down a couple posts to the one with pictures to get a better understanding of the issue. ----------------------------------------- I am working on a project and have run into a problem. I want the entire game to take place inside of a spherical arena. I am using a very simple rendering process because I am not very familiar with C++ and Direct X but I am still unable to accomplish this. I am using a simple mesh, D3DXCreateSphere(d3ddev, 1, 20, 20, &sphereMesh, NULL); and my initial idea was to just draw another sphere the size I wanted the arena, namely at a scale of -10.0f or whatever. The problem is when I begin to use point lights in this program they behave very strangely with the mesh. I have the renderstate set to normalize the normals, but the problems appears to be that the normals are facing the wrong direction. When the light is very close to an edge, it illuminates it as if it were far away, and when it is near the center of the sphere, the closest side is illuminated as if the light were right next to it. If I am right, I must get a sphere with the normals pointing in the opposite direction, namely towards the center of the sphere. I have been unable to do this. I have tried to find the code for D3DXCreateSphere() to alter it, but I have not been able to find it. I have tried repositioning the light when drawing the arena, but I would need to reposition it to infinitely many positions outside of the sphere to reproduce the effect of a light being inside of it, which clearly would not work. I need a mesh with the normals pointing radially inwards, but I do not know how to do this. Code-wise, or building another mesh in another program and loading it in, I somehow need a mesh of an inside out sphere. Can anyone help me out with this?
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!