Is it possible through scripting to swap out a texture of a planet at a particular point in time in time?
Has anyone done that? If possible can someone point me in right direction on getting started?
Thanks
steve
swap out a texture of a planet at a particular point in time
Re: swap out a texture of a planet at a particular point in time
Steve,
Unfortunately, not yet.
There are two or three different ways to cause several different objects to be visible at different times. [edit]If the objects differ only in their surface textures, it'll appear that their textures are changing.[/edit]
1. specify Beginning and Ending times in the SSC definition
2. use a Lua script to modify the objects' Visible attributes (requires Celestia built from svn, will be in v1.6.0)
3. define ScriptedOrbit functions which cause the objects to be located at the expected positions when desired (requires Celestia v1.5.0 or later)
[edit]
Here's a script which causes the named object to become invisible in Celestia built from svn:
[/edit]
Unfortunately, not yet.
There are two or three different ways to cause several different objects to be visible at different times. [edit]If the objects differ only in their surface textures, it'll appear that their textures are changing.[/edit]
1. specify Beginning and Ending times in the SSC definition
2. use a Lua script to modify the objects' Visible attributes (requires Celestia built from svn, will be in v1.6.0)
3. define ScriptedOrbit functions which cause the objects to be located at the expected positions when desired (requires Celestia v1.5.0 or later)
[edit]
Here's a script which causes the named object to become invisible in Celestia built from svn:
Code: Select all
obj = celestia:find("Sol/named_object")
obj:setvisible(false)
[/edit]
Selden
Re: swap out a texture of a planet at a particular point in time
Steve,
There are a couple of other texture selection methods, although they don't have any time aspect to them.
If you are willing to swap the texture image manually, you can specify the different surface maps using AltSurface declarations. Then you can select among them using the right-mouse-button popup menu.
If you have only three different textures per object, you can select among them by placing them in the folders /textures/hires/, lores and medres. Then type r and R to switch among them.
In principle, one ought to be able to select among AltTextures using a script, but I can't find the appropriate CEL or CELX commands.
There are a couple of other texture selection methods, although they don't have any time aspect to them.
If you are willing to swap the texture image manually, you can specify the different surface maps using AltSurface declarations. Then you can select among them using the right-mouse-button popup menu.
If you have only three different textures per object, you can select among them by placing them in the folders /textures/hires/, lores and medres. Then type r and R to switch among them.
In principle, one ought to be able to select among AltTextures using a script, but I can't find the appropriate CEL or CELX commands.
Selden
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: swap out a texture of a planet at a particular point in time
http://en.wikibooks.org/wiki/Celestia/C ... setsurfaceselden wrote:In principle, one ought to be able to select among AltTextures using a script, but I can't find the appropriate CEL or CELX commands.
Actually, the setsurface celx method should be moved from observer to object.
This would allow user to define a specific AltTexture for each object.
@+
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
Re: swap out a texture of a planet at a particular point in time
Vincent,
My understanding is that it'd require more than just modifying the celx code. Currently, the same AltSurface name applies to all objects simultaneously. Personally, I think that's a good thing, since one can define a family of surface textures that will be seen on all objects by selecting just one AltSurface name.
My understanding is that it'd require more than just modifying the celx code. Currently, the same AltSurface name applies to all objects simultaneously. Personally, I think that's a good thing, since one can define a family of surface textures that will be seen on all objects by selecting just one AltSurface name.
Selden
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: swap out a texture of a planet at a particular point in time
Yes, I was aware of that when I wrote my suggestion.selden wrote:My understanding is that it'd require more than just modifying the celx code.
This is a good point, indeed, which is far more coherent from a scientifical point of view.selden wrote:Currently, the same AltSurface name applies to all objects simultaneously. Personally, I think that's a good thing, since one can define a family of surface textures that will be seen on all objects by selecting just one AltSurface name.
Moving the setsurface method to object would be quite useful from the addons creators point of view.
So I agree on favouring the scientifical use of the setsurface method.
@+
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