Page 1 of 1
Modify declaration doesn't completely replace Mie atmosphere
Posted: 12.05.2012, 00:01
by PlutonianEmpire
Ok, I was experiencing weird behaviors with some of my addons, so I did a little test.
Apparently, when modifying a pre-existing object, using the Modify declaration, that already has a Mie atmosphere, using new atmosphere values, instead of replacing the previous atmosphere, Celestia combines the atmosphere values of BOTH the original AND the new atmosphere.
I decided to add my Mie atmosphere code for Venus to the solarsys.ssc file in the main data folder, and activated the Terraformed Venus addon by rthorvald, in the extras directory, and got this:
bug1.jpg
Here's the Mie atmosphere I created for Venus in solarsys.ssc in the data folder:
Code: Select all
Mie 0.002
MieAsymmetry -0.33
Rayleigh [ 0.014921875 0.012734375 0.002625 ]
Absorption [ 0.00 0.018609375 0.03953125 ]
MieScaleHeight 20.0
And the Mie atmosphere for the terraformed venus addon in the extras folder:
Code: Select all
Mie 0.001
MieAsymmetry -0.25
Rayleigh [ 0.001 0.0025 0.006 ]
MieScaleHeight 12
Thoughts?
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 16.05.2012, 03:16
by Cambapo
Well, from my experience, and as far as I remember doing Mie atmospheres for the four giants, you did it wrong. The absorption values go the contrary as the Mie values, so that if in the Mie values say 0.3 the absorption value is the contrary so you can get the same colour, it would be 0.7 and what I think is that the atmosphere is red cuz' the absorption value for red is 0.00. Correct me if i'm wrong.
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 16.05.2012, 03:59
by PlutonianEmpire
Cambapo wrote:Well, from my experience, and as far as I remember doing Mie atmospheres for the four giants, you did it wrong. The absorption values go the contrary as the Mie values, so that if in the Mie values say 0.3 the absorption value is the contrary so you can get the same colour, it would be 0.7 and what I think is that the atmosphere is red cuz' the absorption value for red is 0.00. Correct me if i'm wrong.
Actually, I already know how absorption works.
My mistake was not showing the "before" picture from BEFORE using the modify declaration.
Again, the first code set was put in the default solarsys.ssc file in the data directory, while the second code was put into a separate .ssc file in the extras directory.
Here's the "before" picture, with JUST the first code being used:
venus1.jpg
No clouds.
venus2.jpg
With clouds.
The "after" pic is in the OP, with the modify application being used in the extras directory, featuring the second code (the one with Earth's atmosphere settings).
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 22.05.2012, 03:58
by Cambapo
Well, that's kinda weird. I did the same, I made a file to modify Venus' atmosphere and everything was perfect, or well, I dunno if I did directly in the solarsys file, but it just took time to find the correct values, not any issue like this. I would send the file, but I think i have it in another machine. Still, I would paste the values I made in the solarsys file for you, but it's not finished and the atmosphere appears blue. I was trying to recreate what I did with the last file. I'll try to finish it and put the values here maybe in a little while.
Thought I modified the original code that brings Celestia, with the "real" atmosphere of Venus, but it's the same thing. Still I'm gonna make the same experiment with your values.
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 22.05.2012, 05:08
by Cambapo
I tested the file, and the problem is taht the file of the add-on doesn't have the command for Mie, so it doesn't modifies anything. Organized, the file is:
[list=]Modify "Venus" "Sol"
{
Texture "th_bluevenus.*"
BumpMap "th_bluevenusbump.*"
BumpHeight 2.9
NightTexture "th_bluevenusnight.*"
SpecularTexture "th_bluevenusspec.*"
Color [ 0.85 0.85 1.0 ]
SpecularColor [ 0.5 0.5 0.55 ]
SpecularPower 15.0
HazeColor [ 1 1 1 ]
HazeDensity 0.3
Radius 6052
Atmosphere {
Height 60
Lower [ 0.43 0.52 0.65 ]
Upper [ 0.26 0.47 0.84 ]
Sky [ 0.40 0.6 1.0 ]
Sunset [ 1.0 0.6 0.2 ]
CloudMap "th_bluevenusclouds.*"
CloudHeight 10
CloudSpeed 90
}
CustomOrbit "vsop87-venus"
EllipticalOrbit {
Period 0.6152
SemiMajorAxis 0.7233
Eccentricity 0.0068
Inclination 3.3947
AscendingNode 76.681
LongOfPericenter 131.533
MeanLongitude 181.979
}
RotationPeriod 5832.479839
Obliquity 178.78
EquatorAscendingNode 300.22
RotationOffset 137.45
Albedo 0.81
}[/list]
There isn't any Mie in the file that can replace the Mie in the solarsys file.
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 22.05.2012, 05:22
by PlutonianEmpire
Cambapo wrote:I tested the file, and the problem is taht the file of the add-on doesn't have the command for Mie, so it doesn't modifies anything. Organized, the file is:
[list=]Modify "Venus" "Sol"
{
Texture "th_bluevenus.*"
BumpMap "th_bluevenusbump.*"
BumpHeight 2.9
NightTexture "th_bluevenusnight.*"
SpecularTexture "th_bluevenusspec.*"
Color [ 0.85 0.85 1.0 ]
SpecularColor [ 0.5 0.5 0.55 ]
SpecularPower 15.0
HazeColor [ 1 1 1 ]
HazeDensity 0.3
Radius 6052
Atmosphere {
Height 60
Lower [ 0.43 0.52 0.65 ]
Upper [ 0.26 0.47 0.84 ]
Sky [ 0.40 0.6 1.0 ]
Sunset [ 1.0 0.6 0.2 ]
CloudMap "th_bluevenusclouds.*"
CloudHeight 10
CloudSpeed 90
}
CustomOrbit "vsop87-venus"
EllipticalOrbit {
Period 0.6152
SemiMajorAxis 0.7233
Eccentricity 0.0068
Inclination 3.3947
AscendingNode 76.681
LongOfPericenter 131.533
MeanLongitude 181.979
}
RotationPeriod 5832.479839
Obliquity 178.78
EquatorAscendingNode 300.22
RotationOffset 137.45
Albedo 0.81
}[/list]
There isn't any Mie in the file that can replace the Mie in the solarsys file.
Try adding the earth's mie parameters to the addon file yourself (without deleting the venus mie in solarsys.ssc), and then see if you get the bug?
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 22.05.2012, 05:24
by Cambapo
I made Celestia ignore the Mie parametres in the solarsys file and the add-on worked. Then I introduced this:
Mie 0.001
MieAsymmetry -0.25
Rayleigh [ 0.001 0.0025 0.006 ]
MieScaleHeight 12
in the .ssc file of the add-on and the atmosphere looked wonderful.
Venus blue.jpg
Venus blue 2.jpg
Venus Mie.jpg
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 22.05.2012, 05:28
by Cambapo
By the way, the parametres I introduced in the add-on file, are the same you posted before.
Venus Mie no clouds.jpg
And also, the file modified, organized and working:
Modify "Venus" "Sol"
{
Texture "th_bluevenus.*"
BumpMap "th_bluevenusbump.*"
BumpHeight 2.9
NightTexture "th_bluevenusnight.*"
SpecularTexture "th_bluevenusspec.*"
Color [ 0.85 0.85 1.0 ]
SpecularColor [ 0.5 0.5 0.55 ]
SpecularPower 15.0
HazeColor [ 1 1 1 ]
HazeDensity 0.3
Radius 6052
Atmosphere {
Height 60
Lower [ 0.43 0.52 0.65 ]
Upper [ 0.26 0.47 0.84 ]
Sky [ 0.40 0.6 1.0 ]
Sunset [ 1.0 0.6 0.2 ]
CloudMap "th_bluevenusclouds.*"
CloudHeight 10
CloudSpeed 90
Mie 0.001
MieAsymmetry -0.25
Rayleigh [ 0.001 0.0025 0.006 ]
MieScaleHeight 12
}
CustomOrbit "vsop87-venus"
EllipticalOrbit {
Period 0.6152
SemiMajorAxis 0.7233
Eccentricity 0.0068
Inclination 3.3947
AscendingNode 76.681
LongOfPericenter 131.533
MeanLongitude 181.979
}
RotationPeriod 5832.479839
Obliquity 178.78
EquatorAscendingNode 300.22
RotationOffset 137.45
Albedo 0.81
}
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 22.05.2012, 05:31
by PlutonianEmpire
Did you try it with BOTH mie parameters in BOTH solarsys.ssc AND the addon file ACTIVE?
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 22.05.2012, 05:34
by PlutonianEmpire
Cambapo wrote:I made Celestia ignore the Mie parametres in the solarsys file
The whole point of this bug report is for that to be active at the same time as the addon's mie is active.
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 22.05.2012, 23:46
by John Van Vliet
--- edit ---
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 23.05.2012, 03:40
by Cambapo
Sorry for lasting so long to answer, but yes, both parametres are working. I didn't made Celestia ignore them in the solarsys file, either in teh add-on file, though I introduced the Mie parametres in the add-on file, so it can replace them in the solarsys by the "Modify" command. It's working at least for me with both parametres activated, just that the one in the add-on modifies the one in the solarsys as you do with the "Modify" command. Both are active.
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 23.05.2012, 03:58
by PlutonianEmpire
Cambapo wrote:Sorry for lasting so long to answer, but yes, both parametres are working. I didn't made Celestia ignore them in the solarsys file, either in teh add-on file, though I introduced the Mie parametres in the add-on file, so it can replace them in the solarsys by the "Modify" command. It's working at least for me with both parametres activated, just that the one in the add-on modifies the one in the solarsys as you do with the "Modify" command. Both are active.
So the mie in solarsys is
Code: Select all
Mie 0.002
MieAsymmetry -0.33
Rayleigh [ 0.014921875 0.012734375 0.002625 ]
Absorption [ 0.00 0.018609375 0.03953125 ]
MieScaleHeight 20.0
and the mie in the addon is
Code: Select all
Mie 0.001
MieAsymmetry -0.25
Rayleigh [ 0.001 0.0025 0.006 ]
MieScaleHeight 12
???
If that is indeed the case, then it might be simply my computer making it look weird.
Specs are: HP HDX16-1375DX Notebook PC, Intel Core2 Duo CPU P7550 @ 2.26 / 2.27 GH, 4 gb DDR2 RAM, 64 bit Win 7 Pro, NVIDIA GeForce GT 130M Graphics w/1024 Shared video memory
(In case anyone needed it)
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 23.05.2012, 04:01
by Cambapo
Yes, just like that. The only thing you have to do is to add the Mie parametres lines in the add-on file so it can replace the Mie in the solarsys file, and that's it, you get a terraformed atmosphere
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 23.05.2012, 04:14
by PlutonianEmpire
Cambapo wrote:Yes, just like that. The only thing you have to do is to add the Mie parametres lines in the add-on file so it can replace the Mie in the solarsys file, and that's it, you get a terraformed atmosphere
Ah, so it's definitely something on my side.
Thanks.
Re: Modify declaration doesn't completely replace Mie atmosp
Posted: 23.05.2012, 04:30
by Cambapo
You're welcome