It is currently Fri, 20-07-18, 14:24 GMT

All times are UTC




Post new topic Reply to topic  [ 68 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sat, 22-09-07, 19:29 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
On request from Runar, I'll describe a new *never seen before* visual effects I developped during the last weeks for Celestia 1.5.0 (it wont work under Celestia 1.4.2). Unfortunately, I can't post any pictures or QT sequences of the effects, so I'll ask Runar to publish here the QT movie he made about the solar convection cells I designed recently, or any other QT sequences for the other addons I've created (red dwarfs convection, smoke on a volcanic planet, etc). Pictures aren't enough to show the effect, since it's dynamical (animated) in nature.

So, suppose you want to see some convection cells on the sun, in Celestia (spicules, moving grains, etc, as seen on the TRACE web site. See the topics I've created on shatters's forum). The basic trick is simple : define 6 rotating spheres around the Sun, using 2 simple spherical models (in 3ds or CMOD format). 3 spheres are rotating around the perpendicular axis ("x", "y" and "z"). In the following, I'll call them the +spheres. The other three spheres are rotating in the reverse sense with exactly the same RotationPeriod value. I'll call them the -spheres. Notice that 2*3 = 6 spheres is the minimal number necessary to create the effect, without noticing any net rotation effect in Celestia. On the three +spheres, apply a grainy transparent PNG texture. On the -spheres, apply the reversed PNG texture (flipped vertically in Photoshop). The reversed texture is important, or else you'll notice some annoying "moire" effect while the spheres are rotating. The spheres must all have a radius slightly larger than the Sun, or else they wont be visible, or they'll be too much visible around the Sun. Some experimentations are needed here to find the proper value.

The only difficult part, to create a nice and realistic effect, is the PNG textures to be used. Lots of experimentations are necessary to find the proper transparent textures, contrasts, colors, etc. Notice that there is NO polar pinch effect with this technique. It could even be used to remove some of the polar pinch of the base texture applied to your star. This is an almost automatic feature of the technique described here. 8)

Take note that an atmosphere definition must be applied to one of the rotating spheres, to add the glare effect (atmosphere) around the sun, and to remove the spheres "hard edges" (a picture could explain that very simply). Here's an example of the SSC code I'm using for my Sun :


Code:
"Chromosphere" "Sol"
{
   Mesh      "fluid1.3ds"
   Radius      700000
   Emissive   true

   EllipticalOrbit {
      Period      9E12
      SemiMajorAxis   0
   }

   Atmosphere {
      Height 140000
      Lower [ 0.9 0.86 0.6 ]
      Upper [ 0.4 0.38 0.27 ]
   }

   Orientation [90 1 0 0]
   RotationPeriod   0.03  # This value is too high to be realistic.  It can be changed easily however.
}

"Chromosphere" "Sol"
{
   Mesh      "fluid1.3ds"
   Radius      700000
   Emissive   true

   EllipticalOrbit {
      Period      9E12
      SemiMajorAxis   0
   }

   Orientation [90 1 0 0]
   RotationPeriod   0.03
   Obliquity   90
}

"Chromosphere" "Sol"
{
   Mesh      "fluid1.3ds"
   Radius      700000
   Emissive   true

   EllipticalOrbit {
      Period      9E12
      SemiMajorAxis   0
   }

   Orientation [90 1 0 0]
   RotationPeriod   0.03
   Obliquity 90
   EquatorAscendingNode 90
}

# Reversed rotation.  Mesh is using a flipped texture

"Chromosphere" "Sol"
{
   Mesh      "fluid2.3ds"
   Radius      700000
   Emissive   true

   EllipticalOrbit {
      Period      9E12
      SemiMajorAxis   0
   }

   Orientation [90 1 0 0]
   RotationPeriod   -0.03
}

"Chromosphere" "Sol"
{
   Mesh      "fluid2.3ds"
   Radius      700000
   Emissive   true

   EllipticalOrbit {
      Period      9E12
      SemiMajorAxis   0
   }

   Orientation [90 1 0 0]
   RotationPeriod   -0.03
   Obliquity   90
}

"Chromosphere" "Sol"
{
   Mesh      "fluid2.3ds"
   Radius      700000
   Emissive   true

   EllipticalOrbit {
      Period      9E12
      SemiMajorAxis   0
   }

   Orientation [90 1 0 0]
   RotationPeriod   -0.03
   Obliquity 90
   EquatorAscendingNode 90
}


That way, you'll have some very nice convection cells moving in a very complex way on the Sun's surface, without noticing any repetition. They are really looking like a real fluid moving in a cahotic way, like what is shown on the TRACE web site.

Using the same technique, you could add some very convincing fluid motion on red dwarfs, brown dwarfs, etc (any star, actually). You can even add some "vapor and smoke" to a volcanic planet, with a real sensation of "heat", or fluidlike clouds motion on a gaz giant (sorry, I can't show you any QT sequence here).

The effects are so convincing and fun to watch, that I started to add some to many of my personal addons in Celestia. In comparison, all the other stars and volcanic planets are now *EXTREMELLY* dull to watch, worst than ever ! :x :?

On the realism side, there are at least two crittics we can make :

1- the fluid motion is too fast.
Well, of course, this can be adjusted with a proper RotationPeriod value. I prefer to show some "fast" motion, without having to accelerate time by a 100 or 1000 factor.

2- using 6 spheres with a transparent textures, the luminosity is decreased. Also, a real star can't be looking like that (with grains and convection cells) in the visible spectrum, with the "naked eye", without using some filters (H-filter, for example). However, the star's rendering can be considered "realistic" in the infra-red or X-rays spectrums (see the TRACE web sites), or using some special hydrogen filter.

_________________
"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!"


Top
 Profile  
 
 Post subject:
PostPosted: Sat, 22-09-07, 19:43 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4571
Location: Hamburg, Germany
Thanks Martin,

that looks pretty interesting!

It may seem that this techniquie could be applied to a number of other applications? You mentioned vulcanism and other "flows".

Perhaps we could collect a possible list here and try things out?

Pulsars? ;-)

Cheers,
Fridger

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat, 22-09-07, 19:53 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
t00fri wrote:
It may seem that this techniquie could be applied to a number of other applications? You mentioned vulcanism and other "flows".

Pulsars? ;-)


For the moment, the technique can be applied to these :

- stars (especially red dwarfs, but it's also great on blue giants)
- brown dwarfs
- volcanic planets ("heat" effect, smoke, vapor, etc)
- gaz giants (cloud motion, with some limitations on realism however)

In the case of the giants, it may be very interesting to use the technique for the "hot jupiters".

In the case of pulsars, I don't think it's pertinent, since they are rotating very fast. You don't have time to see any effects at all in their case. However, I used a small part of this technique in my pulsars addon already published on shatters's forum (an updated complete database of ATNF pulsars) :

http://www.shatters.net/forum/viewtopic.php?t=11372

In this case, the technique was used only to add an "atmosphere" (or glow effect) on the pulsars.

_________________
"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!"


Top
 Profile  
 
PostPosted: Sat, 22-09-07, 19:55 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
Cham wrote:
...The basic trick is simple : define 6 rotating spheres around the Sun, using 2 simple spherical models (in 3ds or CMOD format). 3 spheres are rotating around the perpendicular axis ("x", "y" and "z"). In the following, I'll call them the +spheres. The other three spheres are rotating in the reverse sense with exactly the same RotationPeriod value. I'll call them the -spheres. Notice that 2*3 = 6 spheres is the minimal number necessary to create the effect, without noticing any net rotation effect in Celestia. On the three +spheres, apply a grainy transparent PNG texture. On the -spheres, apply the reversed PNG texture (flipped vertically in Photoshop). The reversed texture is important, or else you'll notice some annoying "moire" effect while the spheres are rotating. The spheres must all have a radius slightly larger than the Sun, or else they wont be visible, or they'll be too much visible around the Sun. Some experimentations are needed here to find the proper value...


Tx for the trick, Cham!

If I'm not wrong, 3 spheres with a texture, 3 spheres with the same flipped texture. So you will use 2 textures in memory when it's the same flipped... No way to avoid that flipping the 3 last spheres? This way you would load only 1 texture, no?


Top
 Profile  
 
PostPosted: Sat, 22-09-07, 20:06 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
ElChristou wrote:
If I'm not wrong, 3 spheres with a texture, 3 spheres with the same flipped texture. So you will use 2 textures in memory when it's the same flipped... No way to avoid that flipping the 3 last spheres? This way you would load only 1 texture, no?


I already tried to use only one texture, at first. Apparently, it's not possible (or else, you'll have some weird periodic "moire" effects). I didn't found another way. So yes, you need one model with a texture for all three +spheres, and another model with a reversed texture for the -spheres. The reason is because you need the -spheres to rotate in the reverse way, to remove any net rotation feel on the global rendering. 3 spheres aren't enough (you need six), for a clear mathematical reason : you want a NIL total angular momentum.

_________________
"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!"


Top
 Profile  
 
PostPosted: Sat, 22-09-07, 20:15 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
Cham wrote:
ElChristou wrote:
If I'm not wrong, 3 spheres with a texture, 3 spheres with the same flipped texture. So you will use 2 textures in memory when it's the same flipped... No way to avoid that flipping the 3 last spheres? This way you would load only 1 texture, no?


I already tried to use only one texture, at first. Apparently, it's not possible (or else, you'll have some weird periodic "moire" effects). I didn't found another way. So yes, you need one model with a texture for all three +spheres, and another model with a reversed texture for the -spheres. The reason is because you need the -spheres to rotate in the reverse way, to remove any net rotation feel on the global rendering. 3 spheres aren't enough (you need six), for a clear mathematical reason : you want a NIL total angular momentum.


The trick of the 6 spheres is essential; what I was wondering is if reversing the poles of the 3 -spheres you could not do the same... (in this case one also must reverse the rotations, no?)

Now if you confirm you have already tested all possibilities (including the flipped spheres), then ok, no need to dig this aspect... :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Sat, 22-09-07, 21:15 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
Unfortunately, AFAIK, there isn't a "revert" texture operation in my modeler (a "rotation" isn't the same. And a "revert normals" can't do it, in this case, since we need to see the sphere from the outside). There was a similar problem when I've done my old black holes addons : At first, I used two textures on two planes, one texture was a +spiral, on the "up" plane, while there was a -spiral (reversed texture from Photoshop) on the "bottom" plane. Now I know I could do the same by reverting the normals of the first plane without reverting the texture, so I could use a single texture file instead (at the time I made my black holes, I didn't knew well enough my 3D modeler and its revert normals operation). This trick doesn't work in the case of spheres.

Now, flipping the +spheres in the SSC code (with a reverse rotation), to define the -spheres, will lead to some annoying periodic "moire" effects. That's what I did at first, when I discovered those "moire" effects. There are some weird patterns occuring in this case, like a "brief moment of rotation stop", or a puzzling "pulsation" effect.

Really, this isn't obvious. I did some drawings (on paper) to understand what is actually happening. And I'm still not sure yet to know why it works (no "moire" effects) if I use a second -reversed- texture. Apparently, it's related to the fact that there are two sets of three spheres rotating at the same velocity, not just two spheres rotating in the reverse way. So the illusion is actually pretty complex.

The texture used is also very important to achieve the global effect (there are TONS of variations possible, especially in combination with the base texture used on the main static sphere). Recently, I've created a trully spectacular effect for an old SF addon (remember the glowing ball rotating inside a Zet space station ?). I was able to achieve a kind of color pulsation, while the fluid is moving. This is really an amazing effect, but not a "realist" one (just good for SF).

ElChristou, I suggest that you try the rotating spheres by yourself, to see all the possible variations, especially with your talent in textures manipulations.

_________________
"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!"


Top
 Profile  
 
 Post subject:
PostPosted: Sat, 22-09-07, 21:44 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
Cham wrote:
...Apparently, it's related to the fact that there are two sets of three spheres rotating at the same velocity, not just two spheres rotating in the reverse way. So the illusion is actually pretty complex...


Seems this is the point; at a certain time the 6 textures must create a pattern... Now perhaps if the speed of one is slightly different, the moire effect could be break... but in this case the nill momentum is also broken... Definitively we need some extended test... I'll do some try when I get the time.


Top
 Profile  
 
PostPosted: Sat, 22-09-07, 22:34 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
Cham wrote:
...2- using 6 spheres with a transparent textures, the luminosity is decreased. Also, a real star can't be looking like that (with grains and convection cells) in the visible spectrum, with the "naked eye", without using some filters (H-filter, for example). However, the star's rendering can be considered "realistic" in the infra-red or X-rays spectrums (see the TRACE web sites), or using some special hydrogen filter...


This is not a problem, on the contrary. Celestia do need Wavelength filters, so I'm wondering if Vincent would be able to switch some textures via Lua... (this interesting case could be a preliminary test for more serious code...)


Top
 Profile  
 
 Post subject:
PostPosted: Sat, 22-09-07, 23:15 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 23:16 GMT
Posts: 126
Location: Upstate NY, USA
Of course, this effect depends on the fact that Celestia's spheres aren't really spherical. They are made of many flat triangles, so the corners and edges of the triangles protrude slightly above the flat surfaces of the triangles.

In other words, it's a geometrical effect. You see the various surface textures in the regions where they are close to the vertices (corners) and edges. The central (lower) regions of the triangles of one sphere are hidden in a changing pattern by the higher corners and edges of the other spheres. The size and density of the "cells" would change if one were to use spherical models which have a different number of "layers" and "slices" or if one were to use models which used a geodesic pattern of vertices instead of latitude and longitude.

_________________
Selden


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 23-09-07, 0:31 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
Selden,

about that geometrical effect, I already made several tests before, since it's the first bad behavior I noticed some weeks ago. The geometrical "moire" effect you're describing can be made to completely vanish with a proper radius relative to Celestia's sphere. Once you have found a proper radius, the geometrical "moire" effect is completely gone, whatever the sphere resolution (number of triangles). The "moire" effect I was refering to is related to the PNG textures themselves and the sense of rotation, and it's a subtle one. It has nothing to do with overlapping polygonal spheres.

Runar told me he would publish some QT movies to show the fluidlike motion, later this weekend. He's currently extremely busy with his job, so he need more time before showing the movies. Personally, I'm experiencing some framerate problems, while trying to do the movies myself (and I can't show them anyway).

_________________
"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!"


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 23-09-07, 15:59 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 20:59 GMT
Posts: 1605
Location: Norway
Here is a video. I upped it to Youtube, but the quality and framerate
they convert it to is absolutely horrible.

To watch a much better version, download the quicktime
file below instead!

[youtube]http://www.youtube.com/watch?v=R-mMcATagxM[/youtube]

Download quicktime version (2.9 mb)

- rthorvald

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 23-09-07, 17:29 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
This stuff seems to be excellent for stars, now for others effect I have some doubts (whatever texture you use, the effect will cover 100% of the surface so I have some problems to imagine smoke or vapor using this trick... :?)

Cham, what about making a test addon available? (would be better than a video)


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 23-09-07, 17:37 GMT 
Offline
User avatar

Joined: Sun, 02-09-07, 20:19 GMT
Posts: 196
Location: Montreal
ElChristou wrote:
This stuff seems to be excellent for stars, now for others effect I have some doubts (whatever texture you use, the effect will cover 100% of the surface so I have some problems to imagine smoke or vapor using this trick... :?)

Cham, what about making a test addon available? (would be better than a video)


On the contrary, using a proper texture, I was able to achieve some awesome smoke and vapor on a volcanic planet. The effect is actually better than for the stars !

An addon available ? I can't access the server anymore. :roll:

_________________
"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!"


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 23-09-07, 17:46 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4571
Location: Hamburg, Germany
Cham wrote:

An addon available ? I can't access the server anymore. :roll:


which server?

F.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group