Thursday, September 22, 2016

Ice caps and exports

I made a little bit of progress today.  There are now ice caps!

Map with ice caps

There are also specular maps such that water and ice appear relatively shiny in 3D mode, and in exports that support specular maps.  A little more work is required but I should be able to generate bump maps in the near future as well.

Globe with specular map applied - note the shiny spot toward upper center,
just below the ice, where the sun is glinting off it.

The general code reorganization is complete.  Each planet type is created by its own class that inherits from PlanetCreator.  The abstract method CreateMaps accepts a PlanetParaneters object with all the necessary parameters.  It returns an object containing texture, elevation, bump map, and specular map.

It looks like Blender is wrapping a quarter or half the texture around the entire circumference.  I need to learn why.

I also managed have some basic export functionality working.  The save of the map or globe images to file works - except it is shifted down 25 pixels, with the bottom 25 pixels being cut off, because of some WPF implementation details.  This problem should be correctable by simply placing the Viewport3D and Image elements inside new Border elements.  The initial 3D export to OBJ format is also almost working, but when I import and view the model in Blender the mapping of the texture appears wrong.  I need to investigate further.

That leaves three things in progress: bump maps, fixing the exports, and figuring out why the texture is mapped wrong when imported into Blender.  I've also got to start on clouds, the UI for entering parameters for more control over planet creation, the crater dimples, and a proper DNoise implementation.

No comments:

Post a Comment