Folks,
Newbie question: is it possible to [dynamically] change the transparency/opacity of an ssc/dsc model so that it might fade in or out of a scene?
Thanks.
Fading a model
Hi,
#1: SSC/DSC files are NOT models. Models files are most times CMOD files.
#2: You are able to edit the opacity of CMOD models with a CMOD model editor program called "cmodview". It can be found here: ./viewtopic.php?f=25&t=17655
Just open the model file in cmodview, click the model, then use the side panel on the right side of the screen to edit the opacity value.
Hope this helps,
CM1215
#1: SSC/DSC files are NOT models. Models files are most times CMOD files.
#2: You are able to edit the opacity of CMOD models with a CMOD model editor program called "cmodview". It can be found here: ./viewtopic.php?f=25&t=17655
Just open the model file in cmodview, click the model, then use the side panel on the right side of the screen to edit the opacity value.
Hope this helps,
CM1215
CM1215: Celestial master in learning.
The position (ScriptedOrbit), orientation (ScriptedRotation) and size (Radius) of an object, along with whether or not it's drawn at all (Visibility), can be changed dynamically at runtime. Unfortunately, changing its visual characteristics (e.g. by changing its surface texture image, including transparency) can't be. One workaround is to use "page flipping". I.e. you can pre-define multiple objects which differ appropriately and change each object's Visibility at runtime. Also, Celestia has bugs in how it depth-sorts transparent objects, which can cause strange visual effects in some cases.
Selden
I had considered transitioning between different models of varying opacity -- as you say, "page flipping" -- but was concerned that the number of models needed to support a seemingly continuous transition (@ 20+ Hz or so) would be prohibitively large. Varying the radius at runtime is an option I hadn't considered: much easier to do and it may provide a similar effect that might do just as well ... if not better.
Thanks again, guys. 'Much appreciated!
Thanks again, guys. 'Much appreciated!
I recall a model could be made translucent by assigning a PNG with transparent canvas upon the CMOD model set with opacity 1. But I don't recall whether assigning a PNG with transparent canvas upon the CMOD set with opacity 0 could made the model translucent in converse way: let say, the model is opaque where the PNG is transparent and transparent where the PNG is opaque. In this way the model's fading could be achieved by changing the mapping texture through cycling several steps of texture's opacity: i.e texture1 0.1, texture2 0.2, texture3 0.3 and so on. (Selden?).
Added after 54 minutes 33 seconds:
Ok, this:
The sphere has opacity 0, and the texture starts fading transparency from the middle. About how to cycle between textures, once there was a script somewhere. Major concern possibly will be the "depth sort bug".
zip here:
Extract in ..\"extras", load Celestia->enter->tap "fading_sphere" without quotes
Added after 54 minutes 33 seconds:
Ok, this:
The sphere has opacity 0, and the texture starts fading transparency from the middle. About how to cycle between textures, once there was a script somewhere. Major concern possibly will be the "depth sort bug".
zip here:
Extract in ..\"extras", load Celestia->enter->tap "fading_sphere" without quotes
Never at rest.
Massimo
Massimo