Activate only one Constelation

All about writing scripts for Celestia in Lua and the .cel system
Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #61by Cham » 02.03.2008, 21:46

Thanks Andrea.

Do you know the other commands ? How to change back the colors to the default ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #62by ANDREA » 02.03.2008, 21:57

Cham wrote:Thanks Andrea.
Do you know the other commands ? How to change back the colors to the default ?

You are welcome, Cham.
regarding the default setting, I think that actually the only way is to put a"#" in front of every command line.
Not so nice, I agree.
Perhaps m3ntol....
BTW, Cham, could you please check if you have the same problem I submitted a few messages ago, i.e.

Code: Select all

setlabelcolor { item "galaxies" color [0.24 0.63 0.05] }

gives this error, crashing Celestia:
"Bad Parameter Error"

Thanks a lot.
Bye

Andrea
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #63by Cham » 02.03.2008, 22:01

Andrea,
with your code (is it really a CEL, or a CELX ?) :


Code: Select all

{
setlabelcolor { item "galaxies" color [0.84 0.63 0.05] }
}


nothing happens with this code, defined as a CEL script.

And what about alpha effects for the constellation labels and lines ?

How to set a different color to the constellation label, and a separate color for its lines ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #64by ANDREA » 02.03.2008, 22:19

Cham wrote:Andrea,
with your code (is it realy a CEL, or a CELX ?) :

Code: Select all

{
setlabelcolor { item "galaxies" color [0.84 0.63 0.05] }
}

nothing happens with this code.
Cham, it's a cel script that I applied to the m3ntol's addon: add_2.zip as given in his message posted: Fri Feb 29, 2008 10:31 am
http://celestiaproject.net/forum/viewtopic.php ... c&start=30

Cham wrote:And what about alpha effects for the constellation labels and lines ?
Cham, what do you mean with alpha effects on labels and lines?
Their transparency?
If it?€™s so, don?€™t know how to obtain this, sorry, I think it?€™s not available, yet.

Cham wrote:How to set a different color to the constellation label, and a separate color for its lines ?

In the above given link there is too this possibility.
Bye

Andrea
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #65by Cham » 02.03.2008, 22:36

ANDREA wrote:
Cham wrote:How to set a different color to the constellation label, and a separate color for its lines ?
In the above given link there is too this possibility.


Sorry, I don't find it.

What I mean is to define a different color for Orion's label (say), and another one for its lines, without changing the others.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #66by ANDREA » 02.03.2008, 22:47

Cham wrote:
ANDREA wrote:
Cham wrote:How to set a different color to the constellation label, and a separate color for its lines ?
In the above given link there is too this possibility.
Sorry, I don't find it.
What I mean is to define a different color for Orion's label (say), and another one for its lines, without changing the others.

Cham, this
http://celestiaproject.net/forum/viewtopic.php ... c&start=15
makes only half of what you want, I think, because it changes the same way BOTH label AND lines color of the chosen constellation, sorry. :cry:
Give a look at my image.
I think you should need cel commands like these:

constellationlinecolor { color [0 1 0] set "Ursa_Major" }
constellationlabelcolor { color [0 0 1] set "Cygnus" }

Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #67by Cham » 02.03.2008, 22:53

Ahaa !

Code: Select all

{
constellationcolor { clear "all" }
}


sets back all constellations to the default rendering. Good ! :D
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #68by ANDREA » 02.03.2008, 23:07

Cham wrote:Ahaa !

Code: Select all

{
constellationcolor { clear "all" }
}


sets back all constellations to the default rendering. Good ! :D

You are right, Cham, I missed it. :oops:
This makes me think that we should need some update to cel script manual. :wink:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #69by Cham » 02.03.2008, 23:14

ANDREA wrote:This makes me think that we should need some update to cel script manual.


I'm afraid that many new commands (CEL, CELX, SSC, STC, etc) are't known enough and that they'll become forgotten, after a while. The Wiki books could help, but it isn't enough, since the Wiki tends to be very technical and may terrorise the "typical" users.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #70by ANDREA » 02.03.2008, 23:19

Cham wrote:
ANDREA wrote:This makes me think that we should need some update to cel script manual.

I'm afraid that many new commands (CEL, CELX, SSC, STC, etc) are't known enough and that they'll become forgotten, after a while. The Wiki books could help, but it isn't enough, since the Wiki tends to be very technical and may terrorise the "typical" users.

I agree, but we need an English speaking guy for updating Don Goyette's Cel_Script_Guide_v1-0g.doc, IMO. :oops:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #71by Cham » 02.03.2008, 23:41

Okay, for reference, here are three simple CEL scripts I made permanent in my installation. They should be very usefull in the classroom ! :)

1. This CEL script changes the colors of the Zodiac and few "important" constellations :

Code: Select all

# Title: Show the Zodiac and few other constellations with a different color

{

constellationcolor { color [ 0.2 0.5 0.6 ] set "Aries|Virgo|Scorpius|Capricornus|Cancer|Leo|Libra|Sagittarius|Pisces|Gemini|Taurus|Aquarius" }

constellationcolor { color [ 0.54 0.24 0.12 ] set "Orion|Cassiopeia" }

constellationcolor { color [ 0.42 0.36 0.24 ] set "Ursa_Major|Ursa_Minor" }
 
}


2. This CEL script erases all the constellations, except the Zodiac and few others :

Code: Select all

# Title: Show the Zodiac only, plus few others ...

{
constellations { clear "all" }

constellations { set "Aries|Virgo|Scorpius|Capricornus|Cancer|Leo|Libra|Sagittarius|Pisces|Gemini|Taurus|Aquarius" }

constellations { set "Orion|Cassiopeia" }
constellationcolor { color [ 0.54 0.24 0.12 ] set "Orion|Cassiopeia" }

constellations { set "Ursa_Major|Ursa_Minor" }
constellationcolor { color [ 0.42 0.36 0.24 ] set "Ursa_Major|Ursa_Minor" }

}


3. This CEL script reset everything to the default rendering :

Code: Select all

# Title: Reset the constellations to the default rendering

{
constellationcolor { clear "all" }
constellations { set "all" }
}


I think this new capability of Celestia will be VERY usefull ! :D
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
m3ntol
Posts: 29
Joined: 23.02.2008
With us: 16 years 9 months
Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster

Post #72by m3ntol » 03.03.2008, 08:19

ANDREA wrote:
m3ntol wrote:Well, changes done! Sintaxt is as Chris described:
setlinecolor { item "equatorialgrid" color [0 0 1] }
And that's all folks :)
Hello m3ntol, sorry but I didn't try the setlabelcolor for galaxies before, and now I see that

Code: Select all

setlabelcolor { item "galaxies" color [0.24 0.63 0.05] }


gives this error, crashing Celestia:
"Bad Parameter Error"
I checked and I'm sure that the error is due to that command line.
I supposed that in the addon perhaps the galaxies name could be wrongly written, so I tried galaxes and galaxyes, but without results. :oops:
Any idea?
Bye and thank you.

Andrea :D

Hello,
I was on vacation this weekend, but now I'm back :D

I've try the command and works fine for me. No idea why fails on your system. Please, try this script:

Code: Select all

{

  cancel{}
  renderflags { clear "boundaries|grid|orbits|planets"}
   labels { clear "asteroids|comets|constellations|galaxies|moons|planets|spacecraft|stars"}
   unmarkall {}
   set {name "ambientlightlevel" value 0.0}
   setfaintestautomag45deg {magnitude 9.0}
   set {name "fov" value 80}
   set {name "stardistancelimit" value 1000000}
   
   timerate { rate 1.0 }

 setlabelcolor { item "galaxies" color [0.24 0.63 0.05] }
 
  renderflags { set "boundaries|grid|orbits|planets|galaxies"}
  labels { set "boundaries|grid|orbits|planets|galaxies"}
   
 }


I can see SMC, LMC, Sagittarius and other galaxy labels in green. Please, ANDREA, try it without adding anything, may be the error is in other part of your script file.

WOW! lot of new post... i'm going to read it...

Topic author
m3ntol
Posts: 29
Joined: 23.02.2008
With us: 16 years 9 months
Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster

Post #73by m3ntol » 03.03.2008, 08:25

Vincent wrote:m3ntol,

I've added quite a lot of new Celx methods to Celestia 1.5.0, but I only added the corresponding Cel commands for a minority of them. Would you be interested in adding the remaining Cel commands? You'll find a list of the new Celx methods added to Celestia 1.5.0 here:
http://celestiaproject.net/forum/viewtopic.php?t=10936


Ok,
let me take a look. As I see I only need to add new commands and change the parser to read it.

Topic author
m3ntol
Posts: 29
Joined: 23.02.2008
With us: 16 years 9 months
Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster

Post #74by m3ntol » 03.03.2008, 08:32

Cham wrote:And what about alpha effects for the constellation labels and lines ?

How to set a different color to the constellation label, and a separate color for its lines ?


Alpha is not supported yet.

About setting different colors for lines and labels, you can usa a combination of constellations commands and this two new ones:

setlinecolor { item "constellations" color [0 0 1] }
setlabelcolor { item "constellations" color [1 0 0] }

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #75by Cham » 03.03.2008, 10:56

m3ntol wrote:About setting different colors for lines and labels, you can usa a combination of constellations commands and this two new ones:

setlinecolor { item "constellations" color [0 0 1] }
setlabelcolor { item "constellations" color [1 0 0] }


I don't see how it should work. Can you give a specific example, for "Orion", say ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
m3ntol
Posts: 29
Joined: 23.02.2008
With us: 16 years 9 months
Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster

Post #76by m3ntol » 03.03.2008, 11:18

Try this cel script:

Code: Select all

{

  cancel{}
  renderflags { clear "boundaries|grid|orbits|planets"}
   labels { clear "asteroids|comets|constellations|galaxies|moons|planets|spacecraft|stars"}
   unmarkall {}
   set {name "ambientlightlevel" value 0.0}
   setfaintestautomag45deg {magnitude 9.0}
   set {name "fov" value 80}
   set {name "stardistancelimit" value 1000000}
   
   timerate { rate 1.0 }

setlinecolor { item "constellations" color [0 0 1] }
setlabelcolor { item "constellations" color [1 0 0] }
constellations { clear "all" }
constellations { set "Orion" }

renderflags { set "constellations|boundaries|grid|orbits|planets|galaxies"}
  labels { set "constellations|boundaries|grid|orbits|planets|galaxies"}
   
 }

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #77by Cham » 03.03.2008, 11:20

m3ntol,

what I mean is to set different colors for several constellations. For example, all constellations are drawn with the default colors, while "Orion" is set with different colors (with lines and labels having different colors too).
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Topic author
m3ntol
Posts: 29
Joined: 23.02.2008
With us: 16 years 9 months
Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster

Post #78by m3ntol » 03.03.2008, 11:36

Not supported yet ;)

You can set differents colors for each constellations, but labels would diplay same color than its constellation. Or you can set a color for all constellations and a different one for all labels, but not two things at time.

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #79by Cham » 03.03.2008, 11:58

Ok, that's what I presumed. Thanks.

Personaly, I don't need the transparency (alpha effect). Just to set a different color to the labels, for each constellation. Thanks a lot for your efforts, it's really appreciated. :wink:
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 6 months
Location: Rome, ITALY

Post #80by ANDREA » 03.03.2008, 14:06

m3ntol wrote:
ANDREA wrote:Hello m3ntol, ?€¦

Code: Select all

setlabelcolor { item "galaxies" color [0.24 0.63 0.05] }

gives this error, "Bad Parameter Error"
I'm sure that the error is due to that command line. Andrea :D
Hello, ... I've try the command and works fine for me. No idea why fails on your system. Please, try this script?€¦Please, ANDREA, try it without adding anything, may be the error is in other part of your script file.

Hello m3ntol, my fault, or better, it?€™s a fault of my poor sight. :evil:
I didn?€™t find the mistake until I printed with large characters my script?€™s command line, that I found to be this:
setlabelcolor { item "galaxies" color [0.71 0.23 0.23] )
As you can see the last parenthesis is a round bracket instead of a curly one.
In the example posted here I copied your command line, that obviously was correct, while the one I used in my script was wrong.
A stupid error, sorry for your time lost uselessly, beg your pardon. :oops:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO


Return to “Scripting”