Planetside Software Forums

General => Terragen Discussion => Topic started by: icarus51 on December 13, 2010, 06:10:19 AM

Title: Atmospheric and optical effects in TG2.
Post by: icarus51 on December 13, 2010, 06:10:19 AM
Hello,
Some questions about Terragen 2: is it possible in next builds to have atmospheric effects like these: parhelion - sun dog/moon dog - corona, rainbow, iridescence, sun pillar, halo, circumpolar/zenithal arc, green ray in the sun and defomations of the sun at horizon? In addition also effects like lightning bolts, meteors trails and funnel clouds and virga clouds? These effects would be optional in the rendering box and atmosphere/clouds box or sunlighting box. Perhaps also like additional plug-in.
Thanks in advance. 

Greetings and Merry Christmas to all.
Title: Re: Atmospheric and optical effects in TG2.
Post by: PeterParker on December 13, 2010, 06:54:27 AM
Dont mix up Terragen with a full 3D Programm. Its a LANDSCAPE Creator.
If you have the skills to use 3D Max, Cinema 4D or Maya then you should do it with these programms
and combine them in Photoshop.

Regards

Peter
Title: Re: Atmospheric and optical effects in TG2.
Post by: Henry Blewer on December 13, 2010, 08:22:57 AM
Actually I think many of these can be done. I have seen lightning effects, coronas, and rainbows. Some of the terms I am not familiar with. The sun deformation would need to be a backdrop atmosphere with post work for the deformation, I think.

The program is incredibly versatal. It's a matter of learning how. I think using functions you could do just about anything.
Title: Re: Atmospheric and optical effects in TG2.
Post by: Njen on December 13, 2010, 08:25:27 AM
Most of the effects you have listed are caused by chromatic dispersion, that is to say when light is  dispersed into it's different visible wavelengths when passing through air and moisture. If I am not mistaken, Terragen's unbiased renderer does something like this already when calculating the light that passes through the atmosphere already, right?
Title: Re: Atmospheric and optical effects in TG2.
Post by: reck on December 13, 2010, 08:33:15 AM
Quote from: PeterParker on December 13, 2010, 06:54:27 AM
Dont mix up Terragen with a full 3D Programm. Its a LANDSCAPE Creator.
Regards

Peter

I think he's asking a fair question. Terragen is excellent at Landscapes but is also one of the best applications for creating atmospheres as well. So in that regard Terragens atmosphere rendering is probably better suited than using 3D modelling software.
Title: Re: Atmospheric and optical effects in TG2.
Post by: Henry Blewer on December 13, 2010, 08:35:22 AM
I believe it does. I think that the optical light effects are possible using functions and perhaps imported objects, and/or modified cloud types.
Title: Re: Atmospheric and optical effects in TG2.
Post by: domdib on December 13, 2010, 09:00:36 AM
Virga (trailing rain from cloud base) has already been demonstrated by more than one person - it requires careful manipulation of clouds.
Title: Re: Atmospheric and optical effects in TG2.
Post by: PeterParker on December 13, 2010, 09:25:12 AM
Quote from: reck on December 13, 2010, 08:33:15 AM
Quote from: PeterParker on December 13, 2010, 06:54:27 AM
Dont mix up Terragen with a full 3D Programm. Its a LANDSCAPE Creator.
Regards

Peter

I think he's asking a fair question. Terragen is excellent at Landscapes but is also one of the best applications for creating atmospheres as well. So in that regard Terragens atmosphere rendering is probably better suited than using 3D modelling software.

Sure he´s asking a fair qestion, but meteortrails and lightning cant made with terragen 2.2
This should be done with a 3D Programm or am i wrong?
Title: Re: Atmospheric and optical effects in TG2.
Post by: freelancah on December 13, 2010, 09:30:19 AM
Quote

Sure he´s asking a fair qestion, but meteortrails and lightning cant made with terragen 2.2
This should be done with a 3D Programm or am i wrong?

I believe both of those have already been done.
Title: Re: Atmospheric and optical effects in TG2.
Post by: icarus51 on December 13, 2010, 09:45:25 AM
Thanks for replies, but i ask this for Terragen not for Maya or other rendering programs. I would like this issue was replied by Terragen staff. Currently i don't see any way to do these effects with Terragen 2, from this matter my questions.
Title: Re: Atmospheric and optical effects in TG2.
Post by: cyphyr on December 13, 2010, 09:53:24 AM
I think there may be two issues here. Firstly the modelling of atmospheric phenomena and secondly the light modifications caused by such phenomena. The modelling is a challenge but not too hard especially as there as so many good clip files now available. How these phenomena change lighting is a MUCH harder challenge and to be honest its not really the sort of thing Terragen would excel at. All atmospheric effects are effectively EXTREME partial effects, the result of billions upon billions of partials of dust, ice, water vapour etc. For example something like a rainbow has been effectively made by a few artists on this forum but they have achieved their result by blatant "cheats". A real rainbow is made up of billions of water particles each refracting light at a slightly differing angle (dependant on the relative position of the viewer) and I don't know of any software that can do this without "cheating" in some way (take a look at Maxwell Renderer however), but the point is that "cheating" is not a bad thing, There's no reason not to use an image of a rainbow (for example) projected into your scene if the final result is what you looking for.
Terragen was never designed to be used in isolation, it is most effectively used as part of a work flow.
:)
Richard
ps not terragen staff but long time user
pps Lightening can easily be made with a model of a lightening bolt, make your own or there are several in the file sharing section (search "bolt") just make the bolts luminosity massive (scene dependant but I'd say in the 100,000's)
Title: Re: Atmospheric and optical effects in TG2.
Post by: Tangled-Universe on December 13, 2010, 10:16:45 AM
Richard is hitting the nail here for me, so I agree.

Trails and rainbows have been made with functions by Goms/Mogn (trails) and BigBen (rainbow).
For things like meteors I'd use an image map projected on the background sphere.

You can do a lot of things with functions, but don't ask how.

I would never expect from TG2 or any other render to effectively simulate these phenomena.
TG2 simulates nothing basically, because everything is based on approximations by formulas.
To be clear, by simulations I mean that TG2 would calculate light behaviour in the atmosphere as if it would really pass through trillions of molecules in the atmosphere.
No, TG2 only approximates these effects by simplifications (haze exponential height/red sky decay/glow/etc. etc.).

So can TG2 do these from perspective of the renderers nature? No.
Can you create it by using tricks/cheats, like Richard said. Yes.

Martin
Title: Re: Atmospheric and optical effects in TG2.
Post by: Njen on December 13, 2010, 10:20:17 AM
Quote from: cyphyr on December 13, 2010, 09:53:24 AM
I don't know of any software that can do this without "cheating" in some way (take a look at Maxwell Renderer however)

Actually a lot of modern renderers can simulate this effect already: Vray, yafray, Octane Render and Kerkythea to name a few.

Plus I am pretty sure that Terragen does some kind of simulation of the dispersion of light through the atmosphere already. This is evident by simply lowering the elevation of the sunlight and experiencing a colour change based on how much of the atmosphere light must pass through.
Title: Re: Atmospheric and optical effects in TG2.
Post by: Tangled-Universe on December 13, 2010, 10:27:19 AM
It's not simulation if I apply my way of thinking :)
It's all approximation by heavy simplification, otherwise it would be way too slow I think.

Quote from: njen on December 13, 2010, 10:20:17 AM
Actually a lot of modern renderers can simulate this effect already: Vray, yafray and Kerkythea to name a few.

Yes, but only on a scale of "a wine glass on a table" :)
I don't think it would be able to do this on a planetary atmosphere scale with the same algorithms.
Title: Re: Atmospheric and optical effects in TG2.
Post by: cyphyr on December 13, 2010, 10:27:51 AM
Quote from: njen on December 13, 2010, 10:20:17 AM
...
Plus I am pretty sure that Terragen does some kind of simulation of the dispersion of light through the atmosphere already. This is evident by simply lowering the elevation of the sunlight and experiencing a colour change based on how much of the atmosphere light must pass through.

Indeed but it dose not change the shape of the sun for example ...
:)
Richard
Title: Re: Atmospheric and optical effects in TG2.
Post by: Njen on December 13, 2010, 10:30:49 AM
Quote from: Tangled-Universe on December 13, 2010, 10:27:19 AM
It's not simulation if I apply my way of thinking :)
It's all approximation by heavy simplification, otherwise it would be way too slow I think.

It's all a simulation.

Quote from: Tangled-Universe on December 13, 2010, 10:27:19 AM
Yes, but only on a scale of "a wine glass on a table" :)
I don't think it would be able to do this on a planetary atmosphere scale with the same algorithms.

Chromatic dispersion is chromatic dispersion, the scale of it is irrelevant.
Title: Re: Atmospheric and optical effects in TG2.
Post by: Tangled-Universe on December 13, 2010, 01:24:59 PM
Why do you think that is irrelevant?

For instance, in TG2 a cloud's bottom cannot be lit with GI by another cloud below it.
It's the limitation of these simplifications which allow certain things to be possible or not.
That's also a matter of scale/complexity.

Simply putting chromatic dispersion = chromatic dispersion isn't really an argument.
In that way my example wouldn't be any problem.
Title: Re: Atmospheric and optical effects in TG2.
Post by: Njen on December 13, 2010, 01:37:53 PM
Your wine glass comment was in relation to my comment that other renderers can perform chromatic dispersion (not Terragen). I know for a fact that scale is irrelevant when simulating chromatic dispersion in those renderers because I have experimented with it myself, one simply just turns it on.
Title: Re: Atmospheric and optical effects in TG2.
Post by: Tangled-Universe on December 13, 2010, 02:33:01 PM
I imagine that an algorithm, regardless what kind of, is optimized for a specific way of using which is likely scale relevant.
I can't imagine that one algorithm can simulate its effect for any given scale, because the approximation is limiting it's accuracy to a certain scale.
The simplification "holds up" to certain limits.

I know a bit of your background, but saying "A = A" and secondly that something is true because you worked with it, still doesn't sound like valid arguments to me.

Given your professional background as a lighter I'm likely to believe you though, also I don't want to let this grow into a silly argument :)

Cheers,
Martin
Title: Re: Atmospheric and optical effects in TG2.
Post by: Oshyan on December 13, 2010, 05:10:48 PM
Indeed, the scale absolutely does matter. This is why, although many renderers are capable of good displacement for example, doing so on a planetary scale and with the level of detail that TG2 does is either impossible, very difficult, or very slow for many other renderers.

For optical effects like dispersion, depending on how they're achieved, the scale can matter quite a lot. Yes, some renderers can probably achieve a "natural" rainbow effect, at least on a local if not large scale, but the larger you scale it, the noisier it will be for a given render time because it's having to calculate more and more rays over larger and larger distances, with potentially greater and greater dispersing elements. So a real-world rainbow may be possible with existing render systems that simulate light dispersion, but to reach a high quality result would take ages, even for otherwise fast renderers.

In any case, as others have said some of these phenomenon are currently possible with various methods. Official support for more weather phenomenon is something we're considering for the future, but will not be in the next update. For now I suggest learning the many workarounds that others have created to add these types of effects to their scenes. They can actually be quite effect.

- Oshyan
Title: Re: Atmospheric and optical effects in TG2.
Post by: Njen on December 13, 2010, 08:10:16 PM
Quote from: Oshyan on December 13, 2010, 05:10:48 PM
Indeed, the scale absolutely does matter.

I understand what you are saying Oshyan, I was merely stating that when it comes to the algorithm used for dispersion, scale is irrelevant. Those renderers do not use a different algorithm for dispersion when used on an object of small scale versus an object of large scale.

Through to be sure, what does matter, which is what Tangled-Universe mentioned before, is complexity. That combined with relative screen space (which is what I think you are actually talking about), is what determines the speed of a render in regards to dispersion. A camera 1 unit away from a sphere 1 unit in diameter will take the same time to render as a camera 1000 units away from a sphere 1000 units in diameter. This is because the relative screen space will be the same. Rendering an entire atmosphere takes longer, not because of scale, but because of how much relative screen space it occupies.

Edit:
Quote from: Tangled-Universe on December 13, 2010, 02:33:01 PM
also I don't want to let this grow into a silly argument :)

Gah, you are right, I have been having a few grumbling days because I am doing boring things at work like writing documentation for a 3D pipeline I built for a VFX company. I hate writing documentation!
Title: Re: Atmospheric and optical effects in TG2.
Post by: Oshyan on December 14, 2010, 11:31:50 PM
Quote from: njen on December 13, 2010, 08:10:16 PM
Quote from: Oshyan on December 13, 2010, 05:10:48 PM
Indeed, the scale absolutely does matter.

I understand what you are saying Oshyan, I was merely stating that when it comes to the algorithm used for dispersion, scale is irrelevant. Those renderers do not use a different algorithm for dispersion when used on an object of small scale versus an object of large scale.

The algorithms may not be fundamentally different, but they may be tuned or optimized differently depending on scale, if they want it to finish it a reasonable amount of time with acceptable quality.

I'm not just talking about screen space here either. A good example is the difficulty of making a realistic "moon glow" effect using just the GI calculations in TG2. Let's say you've setup the angles for sun and moon positioning correctly to have a "full moon" in your scene, and let's say you've figured out the right exposure values to be theoretically accurate. Even so you'll need such a high GI accuracy, resulting in such long render time, in order to achieve the effect that it's not really worth it and you might as well "cheat it" with a fill light. The reason is that the GI solution needs to calculate light reflecting off an object hundreds of thousands of "units" away in the scene, and each calculated ray has only a small chance of actually getting to the planet you're on to illuminate it, so you need to shoot a lot more rays to arrive at an accurate and noise-free solution, resulting in longer render time. The further away a GI contributing object is from the surface it's affecting, the lower the chance any given ray will reach the surface in question, and the higher the need for more rays for quality results.

- Oshyan
Title: Re: Atmospheric and optical effects in TG2.
Post by: Matt on December 15, 2010, 03:25:07 AM
Quote from: Tangled-Universe on December 13, 2010, 01:24:59 PM
For instance, in TG2 a cloud's bottom cannot be lit with GI by another cloud below it.

Of course it can :)
Title: Re: Atmospheric and optical effects in TG2.
Post by: Matt on December 15, 2010, 03:33:40 AM
Quote from: Oshyan on December 13, 2010, 05:10:48 PM
For optical effects like dispersion, depending on how they're achieved, the scale can matter quite a lot. Yes, some renderers can probably achieve a "natural" rainbow effect, at least on a local if not large scale, but the larger you scale it, the noisier it will be for a given render time because it's having to calculate more and more rays over larger and larger distances, with potentially greater and greater dispersing elements. So a real-world rainbow may be possible with existing render systems that simulate light dispersion, but to reach a high quality result would take ages, even for otherwise fast renderers.

No, sometimes scale doesn't matter at all. If I were to simulate the light scattering through a cloud of 1 billion particles spanning 1 metre, I might use exactly the same maths as if I were rendering 1 billion particles spanning the width of the galaxy.
Title: Re: Atmospheric and optical effects in TG2.
Post by: Matt on December 15, 2010, 03:34:19 AM
Of course, Terragen doesn't really simulate every single molecule in the atmosphere. It simulates the cumulative effect of a large number of molecules, where the actual number of molecules doesn't matter.

Generally speaking, a simulation is usually a heavy approximation to something. I don't think you can say that "simulation" and "approximation" are mutually exclusive.
Title: Re: Atmospheric and optical effects in TG2.
Post by: Matt on December 15, 2010, 03:39:52 AM
Quote from: Oshyan on December 14, 2010, 11:31:50 PM
I'm not just talking about screen space here either. A good example is the difficulty of making a realistic "moon glow" effect using just the GI calculations in TG2. Let's say you've setup the angles for sun and moon positioning correctly to have a "full moon" in your scene, and let's say you've figured out the right exposure values to be theoretically accurate. Even so you'll need such a high GI accuracy, resulting in such long render time, in order to achieve the effect that it's not really worth it and you might as well "cheat it" with a fill light. The reason is that the GI solution needs to calculate light reflecting off an object hundreds of thousands of "units" away in the scene, and each calculated ray has only a small chance of actually getting to the planet you're on to illuminate it, so you need to shoot a lot more rays to arrive at an accurate and noise-free solution, resulting in longer render time. The further away a GI contributing object is from the surface it's affecting, the lower the chance any given ray will reach the surface in question, and the higher the need for more rays for quality results.

Right, but the problem would be exactly the same if you were rendering a model of that setup at a fraction of the size. Absolute size is irrelevant, only the angles are important.
Title: Re: Atmospheric and optical effects in TG2.
Post by: icarus51 on December 16, 2010, 07:30:14 AM
Hi,
Excuse if my questions  bother you but i try to understand the matter. Just in time with this issue  i read an answer by Oshyan about the Moon Glow, another difficult matter. I have noticed that if i render a half moon or full moon this satellite don't manage to scatter his light on the atmosphere and the landscape remain dark. If i increase Enviro Light  the sky turn to light but not like i want (light from Moon to surface and atmosphere).  Mumble mumble i gave birth to an idea and tried to render...

Oshyan wrote:

I'm not just talking about screen space here either. A good example is the difficulty of making a realistic "moon glow" effect using just the GI calculations in TG2. Let's say you've setup the angles for sun and moon positioning correctly to have a "full moon" in your scene, and let's say you've figured out the right exposure values to be theoretically accurate. Even so you'll need such a high GI accuracy, resulting in such long render time, in order to achieve the effect that it's not really worth it and you might as well "cheat it" with a fill light. The reason is that the GI solution needs to calculate light reflecting off an object hundreds of thousands of "units" away in the scene, and each calculated ray has only a small chance of actually getting to the planet you're on to illuminate it, so you need to shoot a lot more rays to arrive at an accurate and noise-free solution, resulting in longer render time. The further away a GI contributing object is from the surface it's affecting, the lower the chance any given ray will reach the surface in question, and the higher the need for more rays for quality results.

...and now there is my result.

Half Moon and Clouds - Close up

To render the Moon Glow i add a Light Source to the satellite (near the satellite surface) and i managed to have clouds lighted by this Moon Glow approximately to real effect.
What do you think? This is a mere test but enough nice for me.

I attached my TGD file of this work.

Below is the image finished. Total Render time in Quick render: 15' 36"

(http://img130.imageshack.us/img130/1975/halfmooncloudszoomtg2.jpg)

Bye







Title: Re: Atmospheric and optical effects in TG2.
Post by: blackcat on December 16, 2010, 10:11:45 AM
HaloSim is an excellent (and free) program developed by a pair of meteorologists that even allows you to choose the type of ice crystals creating halos (such as methane or ammonia ice, for example). Other customizable parameters include the angle of the sun above the horizon, etc.

http://www.atoptics.co.uk/halo/halfeat.htm

It takes only a minute to create the required effect which is then easily added to a TG rendering (it's how the halo and parhelia were added to the Titan volcano image I posted yesterday). I think doing it this way is simpler and allows much more latitude than if it were the result of a feature built into TG. For instance, sundogs rarely appear perfectly symmetrical in real life. In the Titan illustration I was able to easily make the left-hand one almost invisible (as though there were fewer intervening ice crystals in that part of the sky). I was also able to easily eliminate other halo phenomenon that I didn't want visible. This would have been much harder to do if TG had been generating the effect. Like HaloSim I suspect it would have to create all possible effects visible under the given conditions...something which would be rarely desirable.

Here is the picture I'm talking about...

(http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs1170.snc4/154241_1495445148832_1315183121_1091187_3469573_n.jpg)
Title: Re: Atmospheric and optical effects in TG2.
Post by: icarus51 on December 16, 2010, 11:54:21 AM
I know HaloSim but in which way is it possibile to transfer the results in Terragen? And about distorsion of sun and moon near the horizon? There is some way to make these effects with TG2? or with other render programs?
Thanks for your patience. :)
Title: Re: Atmospheric and optical effects in TG2.
Post by: Oshyan on December 16, 2010, 11:12:21 PM
I stand corrected (partially, at least) by Matt himself! :D

icarus, TG2 does not currently simulate the kind of atmospheric phenomenon you want to create. There *may* be ways of creating similar-looking effects, but they would not be accurate or likely to be easy to adjust. Using something like HaloSim is probably far easier and more controllable.

- Oshyan
Title: Re: Atmospheric and optical effects in TG2.
Post by: Njen on December 17, 2010, 01:24:57 AM
I never knew about HaloSim, that program looks great! I am going to check it out, thanks for the tip.
Title: Re: Atmospheric and optical effects in TG2.
Post by: blackcat on December 17, 2010, 09:46:51 AM
Quote from: icarus51 on December 16, 2010, 11:54:21 AM
I know HaloSim but in which way is it possibile to transfer the results in Terragen? And about distorsion of sun and moon near the horizon? There is some way to make these effects with TG2? or with other render programs?
Thanks for your patience. :)


You set the all the HaloSim background colors (sky, horizon, etc.) to black and disable things such as the horizon line. Then, when the program generates the halo you have it on a black ground. Save the image and place it on the TG2 rendering as a layer in Photoshop. (You will probably need to adjust the size so that the angular diameter of the halo is correct for the visual angle of your picture.) Set the layer for Screen, which will make the black transparent. Depending on how many rays you chose for HaloSim to use, you will probably need to blur the layer very slightly in order to blend the points together.

I don't know of any program that will do the kind of flattening of the sun and moon you want. I myself would probably just create and insert them in Photoshop. That would, I think, be the fastest, simplest and most direct method. In several of my extrasolar planet renderings, I replaced the TG2 sun with a sun I created myself (or a moon as the case might be).

Here is an example of where I did that...

(http://black-cat-studios.com/catalog/xplanets6/imag009.jpg)
Title: Re: Atmospheric and optical effects in TG2.
Post by: blackcat on December 17, 2010, 09:54:42 AM
PS---
The HaloSim people also have a small program for creating coronas (the rainbow-hued glow you will sometimes see surrounding the moon on a frosty night).

Title: Re: Atmospheric and optical effects in TG2.
Post by: warnerbrown on December 25, 2010, 09:18:21 PM
I've used this program for atmospheres, skies and some of the lighting effects you listed over other programs, including Maya (& hdri). It is pretty accurate but like anything takes some experimenting with. it depends what you use it for
Title: Re: Atmospheric and optical effects in TG2.
Post by: icarus51 on January 14, 2011, 10:46:11 AM
Hello,

Thanks for your replies. I would point out that this issue is not my idea.
In fact in TG2 FAQ page i've read this:

> Will TG2 be able to render atmospheric effects such as rainbows and halos?

This is something we're considering.  ;D

and also

> Will TG2 be able to do lens flares?

Some lens flare effects may be added in the future but we do not consider this to be a priority. Certain bloom and glow effects are useful in anti-aliasing very bright edges in images with a very high dynamic range, so they will likely be included in the first TG2 release.

Greetings.
Title: Re: Atmospheric and optical effects in TG2.
Post by: icarus51 on January 14, 2011, 10:59:02 AM
Quote from: blackcat on December 17, 2010, 09:46:51 AM
Quote from: icarus51 on December 16, 2010, 11:54:21 AM
I know HaloSim but in which way is it possibile to transfer the results in Terragen? And about distorsion of sun and moon near the horizon? There is some way to make these effects with TG2? or with other render programs?
Thanks for your patience. :)


You set the all the HaloSim background colors (sky, horizon, etc.) to black and disable things such as the horizon line. Then, when the program generates the halo you have it on a black ground. Save the image and place it on the TG2 rendering as a layer in Photoshop. (You will probably need to adjust the size so that the angular diameter of the halo is correct for the visual angle of your picture.) Set the layer for Screen, which will make the black transparent. Depending on how many rays you chose for HaloSim to use, you will probably need to blur the layer very slightly in order to blend the points together.

I don't know of any program that will do the kind of flattening of the sun and moon you want. I myself would probably just create and insert them in Photoshop. That would, I think, be the fastest, simplest and most direct method. In several of my extrasolar planet renderings, I replaced the TG2 sun with a sun I created myself (or a moon as the case might be).

Here is an example of where I did that...

(http://black-cat-studios.com/catalog/xplanets6/imag009.jpg)


Hi Blackcat,
Excuse me for delay in reply but i've problems (familiar and others) and  i cannot read or write in this forum all the time like i would desire.
Many thanks for your reply, i'll try to manage your way with Halo Sim.  I beg pardon because english is not my mother language and i can write rubbish. :-[
Title: Re: Atmospheric and optical effects in TG2.
Post by: icarus51 on January 14, 2011, 06:12:41 PM
Hi,

This is my simple proof about halos using HaloSim with Photoshop and TG2.
Thanks to Blackcat for hints.

(http://img337.imageshack.us/img337/3616/sundogs.jpg)

Bye