Activate only one Constelation
-
Topic authorm3ntol
- Posts: 29
- Joined: 23.02.2008
- With us: 16 years 8 months
- Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster
Activate only one Constelation
Hello,
I'm learning a lot about Celestia script. I think is a wonderful tool for learning.
I wish to create some videos to teach kids where constellations are located. Do you know if it is possible to activate only one constelation wire model?
Thanks in advance
I'm learning a lot about Celestia script. I think is a wonderful tool for learning.
I wish to create some videos to teach kids where constellations are located. Do you know if it is possible to activate only one constelation wire model?
Thanks in advance
Re: Activate only one Constelation
m3ntol wrote:Hello,
I'm learning a lot about Celestia script. I think is a wonderful tool for learning. I wish to create some videos to teach kids where constellations are located. Do you know if it is possible to activate only one constelation wire model?
Thanks in advance
M3ntol, if I understand correctly, I think you can edit the "asterisms.dat" file that you find in the Celestia "data" folder.
Using Notepad you can eliminate all constellations except the one of interest.
Obviously this means that if you want show another constellation, you should edit once again that file.
This is not a beautiful solution, IMO, but this is the only one I can give you.
Give a try.
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
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
-
Topic authorm3ntol
- Posts: 29
- Joined: 23.02.2008
- With us: 16 years 8 months
- Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster
Thanks a lot!!
It is not an ellegant solution but is enogh for me. I pretend to create educational videos so I can edit once and again the file and record each constelation in a separate scene.
Thanks again Andrea
PS: BTW, I'm C++ programmer so I try to take a look at source code and make some changes, if possible.
It is not an ellegant solution but is enogh for me. I pretend to create educational videos so I can edit once and again the file and record each constelation in a separate scene.
Thanks again Andrea
PS: BTW, I'm C++ programmer so I try to take a look at source code and make some changes, if possible.
Last edited by m3ntol on 25.02.2008, 11:29, edited 1 time in total.
m3ntol wrote:Thanks a lot!! It is not an ellegant solution but is enogh for me. I pretend to create educational videos so I can edit once and again the file and record each constelation in a separate scene.
Thanks again Andrea
Well, I'm very happy to have been useful, this time.
You are welcome!
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
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
-
Topic authorm3ntol
- Posts: 29
- Joined: 23.02.2008
- With us: 16 years 8 months
- Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster
Uhmm
nice code for Celestia. I have downloaded all source and looks like make changes for select only some consellations to activate is easy.
The main part is in render.cpp file, line 2362 where celestia is iteratin through all asterism.
I'm going to create anoter render flag when, if set, you can put a list of constellations to activate. May be I can get some next days.
I'll keep you informed
nice code for Celestia. I have downloaded all source and looks like make changes for select only some consellations to activate is easy.
The main part is in render.cpp file, line 2362 where celestia is iteratin through all asterism.
I'm going to create anoter render flag when, if set, you can put a list of constellations to activate. May be I can get some next days.
I'll keep you informed
m3ntol wrote:Uhmm, nice code for Celestia. I have downloaded all source and looks like make changes for select only some consellations to activate is easy. The main part is in render.cpp file, line 2362 where celestia is iteratin through all asterism.
I'm going to create anoter render flag when, if set, you can put a list of constellations to activate. May be I can get some next days.
I'll keep you informed
I'm very interested on this, because I would like to show, possibly using a cel script, the constellations one at a time, speaking of the main features of each of them, e.g. mythology, main stars, most important objects, visibility. etc.
If I understand correctly you think this could be achieved with your code changes, correct?
If yes, I sign myself as beta tester!
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
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
I agree that the ability to show one constellation at a time would be a good feature, and also the ability to select a constellation by its name in the bottom entry field.
Here's my suggestion : you start with constellations OFF. Type <return>Orion<return> to select the Orion constellation, and you then have it automatically selected with its name and lines drawn. You turn the lines (and the label) OFF again by pressing the constellations keyboard shortcut (/ or =), (or maybe it should turn ON all the constellations ?). If you type the keyboard shortcut again (/ or =), you turn ON/OFF all the constellations, as usual.
If you start with the constellations lines already drawn (all constellations are showing), then using the bottom selection <return>Orion<return> should turn OFF all the constellations, except the one you selected (hmmm, I'm not sure of this. Maybe it should only select the constellation, without turning OFF all the others. Maybe it's better to turn OFF all the constellations, BEFORE selecting the one you want to show ?).
Of course, there may be a problem with the name selection process, if there's already an SSC object with the same name. Maybe the bottom entry field could be modified to accept a command line ? Something like "/const Orion", as in some modern games (which do have a console, like Quake3). The command symbol "/" used here (or another one) shouldn't be recognised as an SSC name, but should be interpreted as a command line in the entry field. I'm not sure of the best way to select the constellation. Someone has a better idea ?
Maybe a script (with text entry capabilities) is a better way to do it ?
Here's my suggestion : you start with constellations OFF. Type <return>Orion<return> to select the Orion constellation, and you then have it automatically selected with its name and lines drawn. You turn the lines (and the label) OFF again by pressing the constellations keyboard shortcut (/ or =), (or maybe it should turn ON all the constellations ?). If you type the keyboard shortcut again (/ or =), you turn ON/OFF all the constellations, as usual.
If you start with the constellations lines already drawn (all constellations are showing), then using the bottom selection <return>Orion<return> should turn OFF all the constellations, except the one you selected (hmmm, I'm not sure of this. Maybe it should only select the constellation, without turning OFF all the others. Maybe it's better to turn OFF all the constellations, BEFORE selecting the one you want to show ?).
Of course, there may be a problem with the name selection process, if there's already an SSC object with the same name. Maybe the bottom entry field could be modified to accept a command line ? Something like "/const Orion", as in some modern games (which do have a console, like Quake3). The command symbol "/" used here (or another one) shouldn't be recognised as an SSC name, but should be interpreted as a command line in the entry field. I'm not sure of the best way to select the constellation. Someone has a better idea ?
Maybe a script (with text entry capabilities) is a better way to do it ?
"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!"
Cham wrote:...Here's my suggestion : you start with constellations OFF. Type <return>Orion<return> to select the Orion constellation, and you then have it automatically selected with its name and lines drawn. You turn the lines (and the label) OFF again by pressing the constellations keyboard shortcut (/ or =), (or maybe it should turn ON all the constellations ?). If you type the keyboard shortcut again (/ or =), you turn ON/OFF all the constellations, as usual.
I agree on this approach, Cham, it looks quite logical.
Perhaps, but probably it's a bit too early to hope for this, Vincent could add the code in his LUA Edu Tools, inserting a "Set Constellations Options" button, that will open a window with constellations ON/OFF button and the contellation boxes to check the wished ones.
These could be divided in blocks, e.g. Northern, Zodiacal and Southern, and so on.
Moreover it should be possible to show or not, for every constellation, its mytological drawing.
IMHO it could be very interesting for Celestia shows.
Just a thought, and a hope too, sorry.
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
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
Cham wrote:Andrea, don't forget there is a total of 88 constellations. So a list of check boxes for all of them would be pretty long !
Yes, but their names start with only 19 capital letters, so only 19 check boxes could open all the contellations (BTW, the letter C starts a lot of constellations, 22, so this would be the maximum number of check boxes needed to mark the wished ones).
Actually the "Set Render Options" button opens a window with a lot of check buttons, 39, and no one ever told they are too many.
It's not a problem, IMHO, but only a matter of deciding if this could be useful or not.
I vote for yes, but I'm obviously interested for my purposes, that probably aren't shared by every other guy interested on this subject.
So I'm only discussing in search of a satisfactory solution for every body, if any, or at least the best available one.
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
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
-
Topic authorm3ntol
- Posts: 29
- Joined: 23.02.2008
- With us: 16 years 8 months
- Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster
WOOOAHHH!!
WOOAHHH!!!!
IT WORKS!!! IT WORKS!!!
That is what you can do now :D:D
I've created a new script command named 'constelations'. The sintax is similar to command 'labels'.
That is, you can set or clear a number of constelations, also can set or clear 'all'.
And how it works? It take the constelations to render when the renderflags { set "constellations" } will be set. Take a llok at the example:
Here you can download the new executable and an example.
http://www.astrohenares.org/upd/data/Celestia.rar
Two IMPORTANT questions.
1 Notice my mistake... I put constelations (with only one l instead of 2).
2 Constelations with spaces should be written with an undescore, for example 'Ursa_Major' or 'Ursa_Minor'.
ah! it is case insensitive
WOAHHH!!! I feel happy!!!!!
PS: Tomorrow I'll fix the word mistake and change to 'constellations' with two ll
And also extend the new feature not only to constellations render but also to constellations labels
WOAHHH!!! WOAHHH!!! WOAHHH!!!
uhmm... erh... my first contribution to any open source
WOOAHHH!!!!
IT WORKS!!! IT WORKS!!!
That is what you can do now :D:D
I've created a new script command named 'constelations'. The sintax is similar to command 'labels'.
That is, you can set or clear a number of constelations, also can set or clear 'all'.
And how it works? It take the constelations to render when the renderflags { set "constellations" } will be set. Take a llok at the example:
Code: Select all
constelations { clear "all" }
constelations { set "Orion|Andromeda|Cassiopeia|Cygnus|Hercules|Ursa_Major" }
renderflags { set "constellations" }
Here you can download the new executable and an example.
http://www.astrohenares.org/upd/data/Celestia.rar
Two IMPORTANT questions.
1 Notice my mistake... I put constelations (with only one l instead of 2).
2 Constelations with spaces should be written with an undescore, for example 'Ursa_Major' or 'Ursa_Minor'.
ah! it is case insensitive
WOAHHH!!! I feel happy!!!!!
PS: Tomorrow I'll fix the word mistake and change to 'constellations' with two ll
And also extend the new feature not only to constellations render but also to constellations labels
WOAHHH!!! WOAHHH!!! WOAHHH!!!
uhmm... erh... my first contribution to any open source
Last edited by m3ntol on 25.02.2008, 22:14, edited 2 times in total.
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Cham wrote:I guess this may be interesting, even at the script level. Especialy if we can change the constellation lines color. Chris ?
I haven't had a chance to look at the patch yet, but it seems like a useful feature. It should also be made to work in celx scripts. I don't know that it needs to be accessible to isable individual contesllations via the UI, however: this seems primarily a feature for educational scripts.
--Chris
I think that the feature should be great at the script level. No need to toggle ON/OFF each constellation individually, at the UI level. Since this is for educational activities, working with a simple script located in the scripts menu should be perfect. And the ability to toggle ON/OFF groups of constellations at once (the Zodiac, for example) should be great.
"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!"
Just tested under 1.5.0 plus Vincent's LUA Edu Tools.
It works flawlessly, no sign of problems with Lua Edu Tools or whatever else.
I'm very pleased with it, very well done, m3ntol.
I agree with Cham that at least the possibility to put ON the zodiacal constellations all together could be very useful.
Bye and thank you very much, appreciated.
Chris, please, could the option to change the constellations color be improved?
Thank you.
Andrea
It works flawlessly, no sign of problems with Lua Edu Tools or whatever else.
I'm very pleased with it, very well done, m3ntol.
I agree with Cham that at least the possibility to put ON the zodiacal constellations all together could be very useful.
Bye and thank you very much, appreciated.
Chris, please, could the option to change the constellations color be improved?
Thank you.
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
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
-
Topic authorm3ntol
- Posts: 29
- Joined: 23.02.2008
- With us: 16 years 8 months
- Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster
Ok,
as promised I've made all changes. Now the new script command is 'constellations' with two 'l' And also, only selected constellations labels are painted.
Definitive changes in same url as previous:
http://www.astrohenares.org/upd/data/Celestia.rar
Souce code with only modified files:
http://www.astrohenares.org/upd/data/sources.rar
There is an not very important limitation, new command class CommandConstellations only accept up to 99 differents asterism in the script command.
For example, if you define 300 asterism, all will be affected by new command. But if you put more than 99 asterism in the script command, all above 99 will be ignored.
For example, if you write:
constellations { set "Orion|Andromeda|Cassiopeia|Cygnus|Hercules|Ursa_Major| ... ... .. . more than 99 constellations!!" }
then all obove 99 will be ignored.
It shouldn't be a problem cause there are only 88 constellations. But in case you modify the asterism.dat file and add more contellations you have to take this limitation in consideration.
as promised I've made all changes. Now the new script command is 'constellations' with two 'l' And also, only selected constellations labels are painted.
Definitive changes in same url as previous:
http://www.astrohenares.org/upd/data/Celestia.rar
Souce code with only modified files:
http://www.astrohenares.org/upd/data/sources.rar
There is an not very important limitation, new command class CommandConstellations only accept up to 99 differents asterism in the script command.
For example, if you define 300 asterism, all will be affected by new command. But if you put more than 99 asterism in the script command, all above 99 will be ignored.
For example, if you write:
constellations { set "Orion|Andromeda|Cassiopeia|Cygnus|Hercules|Ursa_Major| ... ... .. . more than 99 constellations!!" }
then all obove 99 will be ignored.
It shouldn't be a problem cause there are only 88 constellations. But in case you modify the asterism.dat file and add more contellations you have to take this limitation in consideration.
-
Topic authorm3ntol
- Posts: 29
- Joined: 23.02.2008
- With us: 16 years 8 months
- Location: Madrid, Spain, Earth, Solar System, Milky Way, Virgo Cluster
ANDREA,
special edition for you
I make some changes and add another script command to change constellations color.
The new command is constellationcolor and accept two parameters, the first is a color vector [r g b] and the second a list separated by | of constellations to apply the color. Also accept set/clear and all.
For example:
to set all constellations to yellow use
To leave all colors unset (that is, leave default color) use:
Need beta testers can download new exe with a sample cel from:
http://www.astrohenares.org/upd/data/CelestiaColor.rar
And new sources are in:
http://www.astrohenares.org/upd/data/srcColor.rar
Both, exe and sources works with the two new commands.
special edition for you
I make some changes and add another script command to change constellations color.
The new command is constellationcolor and accept two parameters, the first is a color vector [r g b] and the second a list separated by | of constellations to apply the color. Also accept set/clear and all.
For example:
Code: Select all
constellationcolor { color [1 0 0] set "Orion|Andromeda|Cassiopeia" }
constellationcolor { color [0 1 0] set "Ursa_Major" }
to set all constellations to yellow use
Code: Select all
constellationcolor { color [0.5 0.5 0] set "all" }
To leave all colors unset (that is, leave default color) use:
Code: Select all
constellationcolor { color [0.5 0.5 0] clear "all"}
Need beta testers can download new exe with a sample cel from:
http://www.astrohenares.org/upd/data/CelestiaColor.rar
And new sources are in:
http://www.astrohenares.org/upd/data/srcColor.rar
Both, exe and sources works with the two new commands.
m3ntol wrote:ANDREA, special edition for you
I make some changes and add another script command to change constellations color. The new command is constellationcolor and accept two parameters, the first is a color vector [r g b] and the second a list separated by | of constellations to apply the color. Also accept set/clear and all.
Need beta testers can download new exe with a sample cel from:
http://www.astrohenares.org/upd/data/CelestiaColor.rar.
Both, exe and sources works with the two new commands.
Here is your beta tester, m3ntol, and my test went OK, all works as should do from your detailed information.
Just an example, with following command lines:
Code: Select all
constellationcolor { color [1 0 0] set "Andromeda" }
constellationcolor { color [0 1 0] set "Ursa_Major" }
constellationcolor { color [0 0 1] set "Cygnus" }
constellationcolor { color [0 0.5 0.5] set "Hercules" }
constellationcolor { color [0.5 0.5 0] set "Cassiopeia" }
I think I'll change colors in constellations groups, e.g. the zodiacal , the northern and the southern ones with three different colors.
Thanks a lot, m3ntol, you have been very kind, appreciated.
And moreover you did this in a very short time, congratulations!
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
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