Marking SOL
Marking SOL
If Celestia can already do this, indulge me because I haven't figured out how to do it.
I think it would be nice to be able to put a small brightly-colored crosshair marking Sol's location when you're "traveling," even if Sol itself is invisible. Can this be done? Or should it simply be filed away as an "enhancement suggestion" for future releases of Celestia?
The extrasolar star maps generated over at Extrasolar Skies allow you to do this, and it's great for getting your bearings.
I think it would be nice to be able to put a small brightly-colored crosshair marking Sol's location when you're "traveling," even if Sol itself is invisible. Can this be done? Or should it simply be filed away as an "enhancement suggestion" for future releases of Celestia?
The extrasolar star maps generated over at Extrasolar Skies allow you to do this, and it's great for getting your bearings.
Yes, Celestia can do this. It's a standard procedure, actually. Use Ctrl-P to mark any selected object. If you want it permanent, you could add some command lines in the start.cel file, like this :
# script to mark all messier objects
mark { object "M1" size 20 color [ 0.0 0.5 0.5] symbol "square" }
mark { object "M2" size 20 color [ 0.0 0.5 0.5] symbol "square" }
mark { object "M3" size 20 color [ 0.0 0.5 0.5] symbol "square" }
... and so on ...
You have tons of options, here.
# script to mark all messier objects
mark { object "M1" size 20 color [ 0.0 0.5 0.5] symbol "square" }
mark { object "M2" size 20 color [ 0.0 0.5 0.5] symbol "square" }
mark { object "M3" size 20 color [ 0.0 0.5 0.5] symbol "square" }
... and so on ...
You have tons of options, here.
"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:
In the script, what symbol shapes are available, beside "square"? Also, in the object statement, can it be anything being drawn in an ssc file? How do you point to it?
For example, are these correct statements???
mark { object "Sol" size 20 color [ 0.0 0.5 0.5] symbol "square" }
mark { object "HST" size 20 color [ 0.0 0.5 0.5] symbol "square" }, or would you have to state ...
mark { object "Sol/Earth/HST" size 20 color [ 0.0 0.5 0.5] symbol "square" }
Thanks in advance
Frank
In the script, what symbol shapes are available, beside "square"? Also, in the object statement, can it be anything being drawn in an ssc file? How do you point to it?
For example, are these correct statements???
mark { object "Sol" size 20 color [ 0.0 0.5 0.5] symbol "square" }
mark { object "HST" size 20 color [ 0.0 0.5 0.5] symbol "square" }, or would you have to state ...
mark { object "Sol/Earth/HST" size 20 color [ 0.0 0.5 0.5] symbol "square" }
Thanks in advance
Frank
I didn't tried it on an ssc object. I suspect it should work. Just try it, it should be easy to verify. I used that option to mark fictious solar systems, stars with real exoplanets, nebulae and Messier objects, and barycenters for multiple stars systems. The symbols you can use are these :
- x
- plus
- triangle
- diamond
- square
- probably simple symbols like "minus", "dot", or some others but I never tried.
- x
- plus
- triangle
- diamond
- square
- probably simple symbols like "minus", "dot", or some others but I never tried.
"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!"
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Frank, Cham,
Only these 5 symbols are available at the moment :
- x
- plus
- triangle
- diamond
- square
I've added the possibility to mark an object with an arrow in my own version. That was not an easy task because the size of the arrow must vary according to the size of the marked object... I got some quite satisfaying results. Here are some screenshots, with antialising disabled :
Only these 5 symbols are available at the moment :
- x
- plus
- triangle
- diamond
- square
I've added the possibility to mark an object with an arrow in my own version. That was not an easy task because the size of the arrow must vary according to the size of the marked object... I got some quite satisfaying results. Here are some screenshots, with antialising disabled :
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
this looks cool.
could you make a patch available?
could you make a patch available?
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Cham,
Sorry, I was not clear in my last post. The size of the arrow is of course independant from the marked object, and you can set it in the script :
The point is that the arrow needed to be moved back on the left, with a distance that is relative to its own size (and so, that also depends on the object's size). So the gap is hardcoded : the arrow is drawn with an offset that is relative to its own size.
Another option would be to use an argument in the "mark" script function to set the gap (insted of having it hardcoded) :
phoenix,
Building a patch would be difficult since this feature belongs to one of my experimental versions of Celestia that includes a lot of changes... However, I'll be able to post the changes here quite soon...
Sorry, I was not clear in my last post. The size of the arrow is of course independant from the marked object, and you can set it in the script :
Code: Select all
# Mark Earth with a size 20 red arrow...
mark { object "Sol/Earth" size 20 color [1 0 0] symbol "arrow" }
The point is that the arrow needed to be moved back on the left, with a distance that is relative to its own size (and so, that also depends on the object's size). So the gap is hardcoded : the arrow is drawn with an offset that is relative to its own size.
Another option would be to use an argument in the "mark" script function to set the gap (insted of having it hardcoded) :
Code: Select all
# Mark Earth with a size 20 red arrow, with a 40 pixels offset...
mark { object "Sol/Earth" size 20 color [1 0 0] symbol "arrow" offset 40}
phoenix,
Building a patch would be difficult since this feature belongs to one of my experimental versions of Celestia that includes a lot of changes... However, I'll be able to post the changes here quite soon...
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent wrote: So the gap is hardcoded : the arrow is drawn with an offset that is relative to its own size.
yes, that's the part i'm really interested in.
phoenix,
Building a patch would be difficult since this feature belongs to one of my experimental versions of Celestia that includes a lot of changes... However, I'll be able to post the changes here quite soon...
thanks! I'm looking forward to see your changes
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Here are the changes :
.../src/celengine/marker.cpp (~ line 140 )
.../src/celengine/marker.h (~ line 44 )
.../src/celengine/cmdparser.cpp (~ line 594 )
.../src/celestia/celx.cpp (~ line 926 )
Well, I'm an "idea handyman" more than a coder ... So I'm sure Chris could do this in a nicer way... Maybe later, because we all know he is working hard on other improvements, along with the other devs... Anyway, if the dev team is interested in it, they can of course use the idea and/or the piece of code for the official version.
.../src/celengine/marker.cpp (~ line 140 )
Code: Select all
case Triangle:
glBegin(GL_LINE_LOOP);
glVertex3f(0.0f, s, 0.0f);
glVertex3f( s, -s, 0.0f);
glVertex3f( -s, -s, 0.0f);
glEnd();
break;
// Add Arrow Marker - start - Vincent
case Arrow:
glBegin(GL_POLYGON);
glVertex3f(-2*s-s, float(s/3), 0.0f);
glVertex3f(-2*s-s, float(-s/3), 0.0f);
glVertex3f(-s-s, float(-s/4), 0.0f);
glVertex3f(-s-s, float(s/4), 0.0f);
glEnd();
glBegin(GL_POLYGON);
glVertex3f(-s-s, float(2*s/3), 0.0f);
glVertex3f(-s-s, float(-2*s/3), 0.0f);
glVertex3f(-s, 0.0f, 0.0f);
glEnd();
break;
// Add Arrow Marker - end - Vincent
}
}
.../src/celengine/marker.h (~ line 44 )
Code: Select all
enum Symbol
{
Diamond = 0,
Triangle = 1,
Square = 2,
Plus = 3,
X = 4,
// Add Arrow Marker - start - Vincent
Arrow = 5
// Add Arrow Marker - end - Vincent
};
Symbol getSymbol() const;
void setSymbol(Symbol);
.../src/celengine/cmdparser.cpp (~ line 594 )
Code: Select all
else if (compareIgnoringCase(symbolString, "x") == 0)
symbol = Marker::X;
// Add Arrow Marker - start - Vincent
else if (compareIgnoringCase(symbolString, "arrow") == 0)
symbol = Marker::Arrow;
// Add Arrow Marker - end - Vincent
}
cmd = new CommandMark(object, color, (float) size, symbol);
.../src/celestia/celx.cpp (~ line 926 )
Code: Select all
else if (compareIgnoringCase(name, "x") == 0)
return Marker::X;
// Add Arrow Marker - start - Vincent
else if (compareIgnoringCase(name, "arrow") == 0)
return Marker::Arrow;
// Add Arrow Marker - end - Vincent
else
return Marker::Diamond;
Cham wrote:This is interesting. You should submit this to Chris, as I think we should have a little more markers options.
Well, I'm an "idea handyman" more than a coder ... So I'm sure Chris could do this in a nicer way... Maybe later, because we all know he is working hard on other improvements, along with the other devs... Anyway, if the dev team is interested in it, they can of course use the idea and/or the piece of code for the official version.
Last edited by Vincent on 31.08.2006, 08:24, edited 1 time in total.
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Vincent wrote:Well, I'm an "idea handyman" more than a coder ... So I'm sure Chris could do this in a nicer way... Maybe later, because we all know he is working hard on other improvements, along with the other devs... Anyway, if the dev team is interested in it, they can of course use the idea and/or the piece of code for the official version.
I think that this is worth adding. It might be nice to have arrows in several different directions: rightarrow, uparrow, etc.
Vincent, do you have a SourceForge account?
--Chris
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Chris,Chris wrote:Vincent, do you have a SourceForge account?
I use an anonymous account to update Celestia from the CVS, so I can't comit my changes for now.
I think I can work on it. I can also add the "offset" argument to the mark function if you prefer the "gap" to be set in the script, rather than keeping it hardcoded...Chris wrote:It might be nice to have arrows in several different directions: rightarrow, uparrow, etc.
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Chris (and all other interested users...)
I've added the 4 types of arrows : leftarrow, uparrow, rightarrow and downarrow.
You can download a zip file including :
- a patch file built from the latest CVS version (updated 5 mn ago)
- a .exe file built from the latest CVS version modified with the patch
- a .cel script file to test the arrow markers feature
> http://vincent.gian.club.fr/celestia/ce ... arkers.zip
Here are some screenshots :
I've added the 4 types of arrows : leftarrow, uparrow, rightarrow and downarrow.
You can download a zip file including :
- a patch file built from the latest CVS version (updated 5 mn ago)
- a .exe file built from the latest CVS version modified with the patch
- a .cel script file to test the arrow markers feature
> http://vincent.gian.club.fr/celestia/ce ... arkers.zip
Here are some screenshots :
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
You're welcome Chris.
Just one last thought... These arrows may diserve a bit of transparency. So what about adding an new alpha argument (0 = totally transparent , 1 = totally opaque) to the mark function ?
I had a look at the code, and I noticed that this would be applied to all types of markers. So, setting the alpha argument to the default value 1 would avoid breaking previous scripts/addons.
/EDIT/
The alpha value could also be declared as the 4th number of the color argument :
Just one last thought... These arrows may diserve a bit of transparency. So what about adding an new alpha argument (0 = totally transparent , 1 = totally opaque) to the mark function ?
Code: Select all
mark { object "Sol/Earth"
size 15
color [0 1 0]
alpha 0.7
symbol "rightarrow" }
I had a look at the code, and I noticed that this would be applied to all types of markers. So, setting the alpha argument to the default value 1 would avoid breaking previous scripts/addons.
/EDIT/
The alpha value could also be declared as the 4th number of the color argument :
Code: Select all
mark { object "Sol/Earth"
size 15
color [0 1 0 0.7] # Red=0; Green=1; Blue=0; Alpha=0.7
symbol "rightarrow" }
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Hi,
I have added a new alpha argument to the mark function to set the transparency of the markers.
This argument can be used with all types of markers.
The alpha argument can have values from 0 (-> marker totally transparent) to 1 (-> marker totally opaque).
This works both in cel and celx scripts.
Here are some shots for alpha=0.9 (which is the value of transparency in the current CVS version ), alpha=0.7 and alpha=0.5.
*****************************************************
IMHO, the arrow-marker looks better integrated into the background scene in the last 2 shots thanks to the transparency effect...
I can provide a new patch (from the last CVS) if you're interesting in this feature.
*****************************************************
I have added a new alpha argument to the mark function to set the transparency of the markers.
This argument can be used with all types of markers.
The alpha argument can have values from 0 (-> marker totally transparent) to 1 (-> marker totally opaque).
This works both in cel and celx scripts.
Here are some shots for alpha=0.9 (which is the value of transparency in the current CVS version ), alpha=0.7 and alpha=0.5.
*****************************************************
IMHO, the arrow-marker looks better integrated into the background scene in the last 2 shots thanks to the transparency effect...
I can provide a new patch (from the last CVS) if you're interesting in this feature.
*****************************************************
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Cham wrote:Is this code integrated in CVS right now ?
I don't think so.
But as chris said he was going to add this.
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)