Stereographic projection (planet surfaces) ideas? (solved)
  • Hello folks. Here is my dilemma:

    In my current HGE project, I'm making a space game. I'm using perlin noise (libnoise) to generate planet surfaces, like so: http://libnoise.sourceforge.net/tutorials/images/sphericalheightmap.jpg

    In my game I've created this fine, and copied the generated texture into an HTEXTURE, 512px x 256px. My problem is to cull and project this texture as a 2D planet, like a flattened 3D representation http://libnoise.sourceforge.net/tutorials/images/thumbs/celestia.jpg

    I've attempted to use a distortion mesh but that may not be the way to go because I'm going to use this texture with sprites.

    Does anyone have a good idea about how to go with this? The idea is to simply skew the texture and clip it to visible side, then it'll be just like any other 2D texture.

    UPDATE:

    Just going to to use a non-spherical perlin noise texture, and blend it with a shader and atmosphere texture as presented at this link:http://slick.javaunlimited.net/viewtopic.php?t=873

    Not perfect but good enough for me.
  • kvakvskvakvs May 2012
    HGE is 2D-oriented, at most you could simulate something like a sphere, in an ugly way. Best if you extract a pointer to D3D8 (or 9) Device from HGEImpl class (in HGE source) and call DirectX 3D drawing commands directly, to display it as a 3D model with lighting.
  • You'd be better off doing this in a 3D modeling program, placing your texture onto a sphere. Then render the results to an image format and just load that into HGE as a texture.
  • Thanks for the advice. I'm trying a few mathematical tricks in memory but will probably end up using one of your suggested methods.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion

Tagged

Who's Online (0)