Page 1 of 1

3D Mars and the new CVS code

Posted: 03.08.2006, 06:11
by cartrite
A while back I uploaded a stand alone model (no textures) called 3D Mars. It combines 2 models with 131k vertices with a 3rd model of the planet with about 16k vertices.

With the new cvs code (07/30/2006) that improves rendering I was able to modify that model in the following manner. I did not upload this. I may update this after the next release of Celestia but anyone who may be interested who has compiled the latest cvs and would like to try this, This how I did it.
1. cmodfix -a mars-mons-valles-131.cmod 1.cmod
2. cmodfix -s 180 1.cmod 2.cmod
3. cmodfix -t 2.cmod 1.cmod
4. cmodfix -u 1.cmod 2.cmod
5. open in a text editor and add to the materials section

Code: Select all

specular 0.5 0.5 0.55
specpower 1
texture0 "mars.png"
normalmap "norm.png"
specularmap "spec.png"

6. cmodfix -b 2.cmod mars-mons-valles131.cmod
7. Add a texture/medres folder with a 4k mars texture and normalmap called mars.png, norm.png
8. Add a texture called spec.png which is just a 1k grayscale file with one color that is dark grey.
9. The ssc file for this looks like this.

Code: Select all

"Mars2" "Sol/Mars"
{
       Mesh "mars-mons-valles-131.cmod"
       #Texture "mars.*"
       Radius 3396 #small
       Atmosphere {
      Height 50
      Lower [ 0.8 0.6 0.6 ]
      Upper [ 0.7 0.3 0.3 ]
      Sky [ 0.83 0.75 0.65 ]
                Sunset [ 0.7 0.7 0.8 ]
                # Slightly bluish sunset, as seen in true color pictures
                # from Pathfinder
   }

        CustomOrbit "vsop87-mars"
   EllipticalOrbit
   {
   Period            1.8809
   SemiMajorAxis     1.5237
   Eccentricity      0.0934
   Inclination       1.8506
   AscendingNode     49.479
   LongOfPericenter 336.041
        MeanLongitude    355.453
   }

   RotationPeriod        24.622962
   Obliquity             26.72
   EquatorAscendingNode    82.91
   RotationOffset       136.005
        Albedo            0.150
}

Of course one could change the names around but the important things to note are that I could not get this to work by simply modifying the ssc file. Tangents were generated after the smooth 180 run. The textures were declared in the model not the ssc file. The Modify command did not work so I had to define a new planet with it's own orbit. I used the same orbit as mars but made it orbit mars instead of the sun. A sreenshot of the same model thats on the motherlode modified as stated above.

Image

This new cvs code really makes a great improvement.

cartrite

Posted: 03.08.2006, 07:11
by cartrite
A word of caution. The new cvs code (07/30/2006) still has some bugs. This screenshot shows what the model looks like in rendering modes other than OpenGL 2.0. This seems to be caused by the specularmap, specular and specpower lines in the model. This problem will show up in any version of Celestia prior to the new cvs code, and with the new cvs code in all rendering modes but OpenGL.

Image

cartrite

Posted: 03.08.2006, 11:42
by selden
Cartrite,

Could you edit your post to specify the date that you downloaded the CVS code? Messages stay around for a long time and may be posted a day or so after the code was downloaded, so it's best to be explicit about the time stamps.
[edit]
Also, is this a 3DS model or a CMOD model?
If the latter, have you tried running cmodfix to adjust the surface normals?

p.s.
Usually when reporting a complex problem, I've found that it's more productive to provide a minimal standalone Addon that demonstrates the error, including an HTML document with a URL that takes the observer to a failing viewpoint.
That way the developers don't have to try to recreate the environment from scratch, which they may not be able to do.
[/edit]

Posted: 03.08.2006, 11:46
by cartrite
Sorry, The cvs was downloaded on 07/30/2006.

Posted: 03.08.2006, 12:20
by cartrite
Selden wrote:
Also, is this a 3DS model or a CMOD model?
If the latter, have you tried running cmodfix to adjust the surface normals?
This is the model on the motherlode which is cmod. The normals were already adjusted.
I modified it as stated in my first post.

Usually when reporting a complex problem, I've found that it's more productive to provide a minimal standalone Addon that demonstrates the error, including an HTML document with a URL that takes the observer to a failing viewpoint.
That way the developers don't have to try to recreate the environment from scratch, which they may not be able to do.


I wish I had a website to show these things but I don't. I could email it if someone needs to recreate the problem.

As far as I can tell this problem started showing itself after I generated tangents to get the normalmaps to work. I created a number of models and everyone that was modified with tangents, specmaps, and normalmaps, etc. show the same thing, with all versions of Celestia. Of course they work correctly with cvs 07/30/2006 in OpenGL2.0 which is why I modified them in the first place.

Posted: 03.08.2006, 13:18
by selden
You might want to consider one of the "free" web services, although they make up for it by having lots of advertisements. I'm pretty sure there have been some postings here about them.

GeoCities is one of the oldest.

Posted: 03.08.2006, 16:51
by Chuft-Captain
selden wrote:I'm pretty sure there have been some postings here about them.

GeoCities is one of the oldest.


I personally wouldn't recommend GeoCities for a number of reasons. Limit of 15MB on maximum filesize uploadable, unwieldy user interface, and there is always the danger that they may delete your site without notice and without giving you a reason: http://celestiaproject.net/forum/viewtopic.php ... highlight=
(EDIT: actually I think 10MB is the limit on individual files, and 30MB total filespace)

I'd recommend SiteSled.com which I've been using for at least as long as GeoCities and, although somewhere in the fine print they do reserve the right to delete your site without notice just like GeoCities, I haven't had any problems with them to date.
(100MB limit and no limit on individual file size)

Posted: 16.09.2006, 00:27
by avpruler
how do i get this thing to work, do i copy paste into a txt???

PLEASE HELP MEEEEEEEEEEEEEEEEEE

Posted: 16.09.2006, 00:32
by selden
How do you get what to work?

Including images in posts?

Celestia?

Downloading Addons?

Making your own Addons available for others?

I'm sorry, but you really have to be explicit.

Posted: 16.09.2006, 03:43
by cartrite
The model will work as downloaded by putting the extracted folder 3dmars into the extras folder and having a texture of mars in any of the textures folders, ie, lores, medres..

BUT...........

If you are trying to modify it to have a normalmap, the above instructions should work. That was exactly what I did and that was the order in which I did it. You will need cmodfix. First you should convert it to ascii with cmodfix and familiarize yourself with the models structure. To make a normalmap work, you do need to generate tangents.

At the time I wrote those instructions, all the SSC file commands where not enabled for meshes in cvs. I think that now they are. So you could modify the SSC file with texture names but the model will still need tangents. And you would also need a recent CVS version of Celestia.

cartrite