Planets for Partiview


Contents


0.0 Introduction.


1.0 Earth, Mars and Jupiter.


Planets v0.21
  • planets_v021.zip (861KB, 10Feb04)

    Planets v0.21 improves on Planets v0.1 by including a cloud layer and specularity.


    Planets v0.25
  • planets_v025.zip (11MB, 10Feb04)

    Planets v0.25 has improved resolution. The models have 16x as many facets, and the images have 16x as many pixels as those in v0.21. This is at the cost of increasing disk usage from 1.7MB to 25MB.


    These are the start of an attempt to make planets visible within Partiview. Development was done on a system running Windows XP Pro, SP1. It should be straight forward to translate the .BAT file into an appropriate shell script for Unix or Linux.

    This demo projects simple cylindrical (aka "Plate Carée") surface texture maps onto a Wavefront .OBJ model which roughly approximates a sphere. This "spherical" object could be replaced by one with more facets and thus a smoother surface at the cost of having a much larger file that takes longer to load.

    Planets v0.21 includes low resolution, 512x256, surface map images of the Earth, Earth Clouds, Mars and Jupiter . I used ImageMagick to convert public domain JPEG surface texture maps into the SGI image format that Partiview uses. Planets v0.25 replace these images by higher resolution, 2048x1024 versions.

    Both of these versions of Planets position all three planets at or near the origin of Partiview's World coordinate system. Each planet is defined as a separate group, though, so you can select the one you want to see.

    Mars
    Mars
    Cloudy Earth
    Cloudy Earth
    (planets v0.25)
    The "thumbnail" images above link to much larger pictures.

    Planets v0.21 and v0.25 improve on v0.1 by including specularity in the cloud layer for the Earth. Partiview's default white surface texture is modified by specifying a cloud texture image as an Alpha channel. That texture image includes its own Alpha channel. In combination with an "rgb" declaration, this seems to cause Partiview to display specularity on the planet's surface image. I have not the slightest idea why.

    In Planets v0.21, the 512x256 surface textures are projected onto sphere1.obj, which has 32 sections and 16 layers. The Cloud texture is projected onto sphere1c.obj, which is identical to sphere1.obj except that it has a diameter of 101 units instead of only 100.

    In Planets v0.25, the 2048x1024 planet surface textures are projected onto sphere2.obj, which has 128 sections and 64 layers. The Cloud texture is projected onto sphere2c.obj, which is identical to sphere2.obj except that it has a diameter of 101 units instead of only 100.


    2.0 Problems.

    1. Clipping problems found with v0.1

      In the process of creating this, I discovered that Partiview seems to have some bugs related to clipping, which affects the textures projected onto Wavefront objects. As best I can tell, the code that implements the bounds speciried in the "clip" directive causes very strange visual effects as the object approaches the more distant clipping boundary: the surface texture becomes partially transparent.

      bug
      clipping bug

      Partiview displaying a clipping bug.

      The far side of the Earth (Africa and Madagascar) is visible through the near side of the Earth (the south Pacific, including Australia and the western rim of South America).

      If you look closely, you'll notice that Africa is reversed. The section of the surface texture image that's projected onto the far side of the glob is seen from its "underside".

      This error can be seen by selecting the Earth "group" and using the RighMouseButton to slowly move away from it. As the image of the Earth approaches the far clipping plane, some rather strange effects will be seen, long before the planet is entirely clipped and no longer visible.

      A related problem can be seen if the arguments to the "clip" directive are modified. The code used in planets.cf is

      eval clip 0.1 1000
      If this is changed to
      eval clip 0.001 1.0e6
      so that the object should not be clipped until it is very, very far away, then the Earth is drawn partially transparent at all distances.

      bug
      clipping bug: second example

      Partiview displaying a clipping bug.

      The far side of the Earth (southern South America) is visible through the near side (the Indian Ocean).


    2. Positioning problems found while creating planets v0.2

      While learning how to add a layer of clouds, I discovered that the objects declared in the .cf sometimes are not placed in exactly the same location. Since no position is specified for any of them, I assumed the objects all would be centered precisely at [0,0,0].

      Jupiter offset
      Jupiter offset from its clouds
      Unfortunately, this seems not to be the case. Although the transparent EarthCloud layer defined as group 2 seems to properly surround the Earth, the JupiterCloud layer defined as group 6 obviouly is not centered at the same location as Jupiter, group 5. The clouds can be seen on only one side of the planet.

    3. Priority of order

      At least some of the time objects seem to be drawn in the opposite order from which they're listed in the .cf file rather than being depth sorted.

      This problem can be reproduced by selecting group 2 (EarthClouds) and group3 (Mars). Although the EarthCloud object specified as group 2 is partially transparent, it completely obscures the opaque Mars object, group 3, instead of being drawn around it.

      When only groups 3 and 4 are selected, the expected image is drawn. MarsCloud layer defined as group 4, which otherwise is identical to group 2, is drawn around Mars.

    4. Size of enclosing models

      Another problem encountered was that the cloud layer object did not properly display clouds above the surface of the associated opaque object unless its model object (sphere1c.obj) was made significantly larger than the enclosed object. The models have exactly the same shape, so I had hoped to place the cloud layer at a height comparable to real clouds. Unfortunately, when I created a model with a diameter of 100.1 units, the cluds weren't drawn properly. The diameter had to be increased to 101 units instead.

      My current guess is that this problem actually is related to the positioning problem seen with the clouds associated with Jupiter. The models are not all being positioned exactly at [0,0,0].


    3.0 Missing Features.


    4.0 Obsolete Versions.


    5.0 Credits.


    Contents



    [back to Contents]

    Appendices.