Page 1 of 1

Radius problem with .cms files

Posted: 22.10.2008, 18:06
by cartrite
I'm not sure if this is intended behavior so I thought it may be a bug.
This was my last post from my thread about svn updates. Reiko found that .cms files placed out of the solarsystem and around a different star will render tiny if the MeshScale is not used in the ssc file duplicating the radius. In other words, the ssc file must have a line MeshScale 292.45 along with the Radius 292.45 for the .cms model to render correctly.
cartrite wrote:The ssc file I did used a radius of 0.7 or 700 meters. When this is used, the asteroid is full size. When I used your radius of 292.45 km, the onscreen text confirmed that the size was 292.45 km but the model was tiny. "NormalizeMesh true" or "NormalizeMesh false" had no effect on size. But adding the line

Code: Select all

MeshScale 292.45
got the model to render the correct size. I'm not sure but this may be a bug. I'll start a thread in the bug forum.
I created a ssc file that basically copied part of asteroid.ssc and assigned an asteroid to Wolf 359.

Code: Select all

"test" "Wolf 359"
{
   # Data for Dactyl taken from:
   # Petit et al.: The Long-Term Dynamics of Dactyl's Orbit
   # (Icarus 1997: 130; 177-197) - linked in the InfoURL

   InfoURL "http://www.lpl.arizona.edu/~hurfordt/research/papers/Icarus130.pdf"

   Class "asteroid"
   Texture "asteroid.jpg"
   # Use the same color as for Ida--uncertain if this is correct
        Color [ 1.000 0.901 0.815 ]
   BlendTexture true
   Mesh "roughsphere.cms"
#   NormalizeMesh true
#   MeshScale 292.45
   Radius   292.45

   EllipticalOrbit
   {
   Epoch        2449228.2028  # 1993 Aug 28 16:52:05UT
   Period             0.96534 # stable 5:1 resonant orbit (Petit et al.)
   SemiMajorAxis     83.5     # stable 5:1 resonant orbit (Petit et al.)
   Eccentricity       0.13    # stable 5:1 resonant orbit (Petit et al.)
   LongOfPericenter 310       # stable pericenter at 90:E Ida longitude (Petit et al.)
   AscendingNode     90       # VERY approximate - chosen to place Dactyl north
                                   # of Ida's equator, as seen at time of Galileo encounter
   Inclination        8       # estimated at 7-9 degrees (Petit et al.)
   }

   UniformRotation
   {
   MeridianAngle   123       # place prime meridian facing Ida
   }

   Albedo 0.2
}


That ssc file will render a tiny model. If the MeshScale line is uncommented, the model will render correctly.
Here is a cel url.

Code: Select all

cel://Follow/Wolf 359:test/2008-10-22T18:08:45.76967?x=bLkpfSRKsZ3mno7//////w&y=E+yki+JaQ7xTew&z=0JuzGhmh1ImPptz//////w&ow=0.659601&ox=-0.046373&oy=-0.748424&oz=0.051354&select=Wolf 359:test&fov=28.866140&ts=1.000000&ltd=0&p=0&rf=3986711&lm=2048&ver=2


cartrite

Re: Radius problem with .cms files

Posted: 23.10.2008, 00:05
by chris
Reiko and cartrite:

You've found a bug. Here's a patched version of the file meshmanager.cpp which should fix the problem:

http://www.celestiaproject.net/~claurel/celest ... /cmsscale/

When I implemented MeshScale, I didn't make a necessary adjustment to .cms file loading. cms meshes were not getting scaled by the radius, thus the Wolf 359 example was only rendered as a 1km object.

--Chris

Re: Radius problem with .cms files

Posted: 23.10.2008, 00:42
by Reiko
How do i use the patch? Where is meshmanager.cpp located?

Re: Radius problem with .cms files

Posted: 23.10.2008, 01:23
by cartrite
Reiko wrote:How do i use the patch? Where is meshmanager.cpp located?
The patch is used to build the program. If you don't build, the patch is not useful to you.
I did build revision 4522 with the patch and this seems to fix the problem. It is available at my web sites. I suggest that you use the web site icon or go here because my new site has been very slow lately. You should not have to change any of your ssc files. Everything should work now.
cartrite

Re: Radius problem with .cms files

Posted: 23.10.2008, 01:30
by Reiko
Hooray! Thanks guys! :D

Re: Radius problem with .cms files

Posted: 23.10.2008, 01:31
by cartrite
chris wrote:Reiko and cartrite:

You've found a bug. Here's a patched version of the file meshmanager.cpp which should fix the problem:

http://www.celestiaproject.net/~claurel/celest ... /cmsscale/

When I implemented MeshScale, I didn't make a necessary adjustment to .cms file loading. cms meshes were not getting scaled by the radius, thus the Wolf 359 example was only rendered as a 1km object.

--Chris
Chris,
The patch seems to work fine. Thank You
cartrite

Re: Radius problem with .cms files

Posted: 23.10.2008, 06:37
by BobHegwood
cartrite wrote:I suggest that you use the web site icon or go here because my new site has been very slow lately. You should not have to change any of your ssc files. Everything should work now.

Steve,

Went to your site and downloaded latest SVN version, but I thought I'd let you know about a
potential problem...

I have recently added the WOT add-on to my Firefox installation, and this add-on informs me that
your site is listed as "Extremely Dangerous." I don't know if you are familiar with this add-on or not,
but it is supposed to keep you from visiting sites which are listed as being potentially problematic
in terms of privacy violations or security problems.

Since I have long used your site for the Celestia SVN updates, I went ahead and downloaded as I
usually do, and with no problems that I am aware of. Just thought I'd let you know about the rating
in case others might run into the same problem.

As always, thanks for this service. Is invaluable regardless of the WOT rating.
Take care, Brain-Dead

Re: Radius problem with .cms files

Posted: 23.10.2008, 14:37
by cartrite
This is probably because my web address is such. xxx.cedhost.com or xxx.sitesled.com. Sites with subdomains are flagged as dangerous. I was thinking of getting a domain name but haven't done so yet. This would cure that problem. My sites are probably :?: :?: safer than 99.9 % of the sites out there though. This is because I don't have all the bells and whistles that most sites have today ie redirection, activex, flash film windows, advertising, etc.
Getting put into the dangerous category is one of the downfalls of running a low budget site(free).
cartrite

Re: Radius problem with .cms files

Posted: 23.10.2008, 15:01
by cartrite
I checked out this WOT addon for Firefox and it seems that since I have a subdomain name for the website, My site inherits the sitesled reputation. Since there a lot of other users that also have subdomains from that site, all the sites are being rated as one. Who knows what other people from sitesled have on their sites. The cedhost site that is my newer one is not yet rated. I guess I'm being thrown in with all the other characters that have sites on these web hosts and being rated as such. I think this would probably change if I got my own domain name. I was looking at GoDaddy to purchase one. But I don't need the extra headaches right now.
cartrite

Re: Radius problem with .cms files

Posted: 23.10.2008, 15:04
by t00fri
cartrite wrote:This is probably because my web address is such. xxx.cedhost.com or xxx.sitesled.com. Sites with subdomains are flagged as dangerous. I was thinking of getting a domain name but haven't done so yet. This would cure that problem. My sites are probably :?: :?: safer than 99.9 % of the sites out there though. This is because I don't have all the bells and whistles that most sites have today ie redirection, activex, flash film windows, advertising, etc.
Getting put into the dangerous category is one of the downfalls of running a low budget site(free).
cartrite

Steve,

but why don't you use your CelestialMatters pages@ibiblio server for such purposes. Ibiblio is highly respectable, non-commercial and you have no bandwidth or storage problems...

Fridger

Re: Radius problem with .cms files

Posted: 23.10.2008, 15:24
by cartrite
I'll have to look into this. I would have to redesign the pages to "fit in" with the formats at CM. Right now my pages are simple html with a lot of images. My biggest question would be, Can I update the pages by myself on a regular basis as I do now at my websites. "changing svn versions"? In the past I was not able to do this. If so, I'll look into designing a page just for svn updates.
********************************************************************************************************************************
Oh, by the way, the WOT Firefox addon reports both Shatters and Celestial Matters forums to be excellent. :D
********************************************************************************************************************************
cartrite

Re: Radius problem with .cms files

Posted: 23.10.2008, 22:09
by Fenerit
chris wrote:Reiko and cartrite:

You've found a bug. Here's a patched version of the file meshmanager.cpp which should fix the problem:

http://www.celestiaproject.net/~claurel/celest ... /cmsscale/

When I implemented MeshScale, I didn't make a necessary adjustment to .cms file loading. cms meshes were not getting scaled by the radius, thus the Wolf 359 example was only rendered as a 1km object.

--Chris

Just FYI, I've found this bug for .CMS in the SS, i.e for Hydra and Nix when they are mapped with DDS texture, while with jpg they worked fine. Strange. :roll: