Experiments..

General questions about Indigo, the scene format, rendering etc...
User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Experiments..

Post by CTZn » Sat Dec 28, 2013 6:57 pm

OnoSendai wrote:
Oscar J wrote:Nice. Now Borrow lyciums earth (http://www.indigorenderer.com/images/at ... simulation) and make me a wallpaper. :D
It's the same simulation - Indigo :)

What I'm going for here is efficient rendering of clouds with the atmosphere model, which is quite tricky.
Good luck with this !
obsolete asset

fbrunell
Posts: 78
Joined: Wed Jan 06, 2010 3:05 pm
Location: Quebec, Canada

Re: Experiments..

Post by fbrunell » Tue Dec 31, 2013 8:37 am

WOAH! quite impressive. Can't wait to put my hand on the beta... In the mean time I've been simulating with Specular and SSS but I'm really not getting what I was hoping for...

Thanks again Ono!

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Wed Jan 01, 2014 4:24 am

Test of a cloud shader.
Attachments
cloudies_lod_fbm.jpg

User avatar
lycium
Posts: 1216
Joined: Wed Sep 12, 2007 7:46 am
Location: Leipzig, Germany
Contact:

Re: Experiments..

Post by lycium » Wed Jan 01, 2014 4:32 am

awesome! good to see that shader you and bea were talking about :D

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Wed Jan 01, 2014 4:51 am

There are some mistakes in the shader, will post more info on it soon :)

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Thu Jan 02, 2014 4:16 am

Another cloud experiment:

Code for scattering coeff looks like this:

Code: Select all

def z_envelope(real z) real : 
                let
                  cloud_half_h = 100.0
                  cloud_h = cloud_half_h * 2.0
                  base_z = 1100.0 - cloud_half_h
                in
                  smoothPulse(base_z, base_z + cloud_h * 0.3, base_z + cloud_h * 0.5, base_z + cloud_h, z)
                  
              def lowFreqBaseShape(vec3 pos) real :
                let 
                  warped_pos = vec3(x(pos) * 0.6, y(pos), z(pos))
                in
                  (fbm(warped_pos*0.004, 8) * 0.5 + 0.5) * z_envelope(z(pos))
              
              def eval(vec3 pos) vec3:
                let 
                  cam_pos = vec3(2077.0, -1447.410, 700.588)
                  A = 0.00001
                  octaves = max(1, floorToInt(-log(A * dist(cam_pos, pos))))
                  
                  turb_offset = fbm3Valued(pos * 0.03, octaves)
                  
                  c = lowFreqBaseShape(pos + turb_offset * 30.0)
                  max_sigma_s = 0.025
                in
                  vec3(step(0.6, c) * max_sigma_s)
The general principle is to use a low frequency FBM to define the general cloud shape. (lowFreqBaseShape())

I then use the 'turbulence' technique to add high frequency detail. This can be thought of as perturbing the domain of the function with a fractal vector field.

The final result is then 'windowed' with a envelope based on the height (I use smoothPulse for this), and then passed into a step function, which gives hard edges to the clouds.

One pretty cool technique I'm using here is level-of-detail (LOD) based FBM detail - the further away a cloud point is, the fewer octaves of noise are used. I'll write more about this in another forum post.
Attachments
cloudies_lod_fbm 30 m perturbation fixed LOD higher freq pert.jpg

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Experiments..

Post by CTZn » Thu Jan 02, 2014 4:25 am

excellent, I'd bet that you have been using the triple valued fbm again. I'm totally seconding fbrunell !

Also, happy new year and best wishes to the four of you that I have come to met with. And by extension, the others I've met and every single user of Indigo !

edit following that last post: excellent shader indeed, no wonders it looks smart ;) Yay. Nature gotta love floating octaves !
obsolete asset

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Thu Jan 02, 2014 5:03 am

Happy new year to you too CTZn!

FBM LOD => http://www.indigorenderer.com/forum/vie ... =7&t=12775

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Fri Jan 03, 2014 2:44 am

Added in a phase function for cumulus cloud.
The only problem is it's very slow to converge, due to being highly forward scattering.
Attachments
cumulus.png

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Sun Jan 05, 2014 3:32 am

Added ozone absorption to the sky model.
It gives a nice blue colour to the sky especially with the sun is low in the sky, or when it is below the horizon.
Attachments
sun zenith 85 with ozone.png
sun zenith 85 no ozone.png
sun zenith 92 with ozone tonemapping 0.1 linear.png
sun zenith 92 no ozone tonemapping 0.1 linear.png

StompinTom
Indigo 100
Posts: 1828
Joined: Mon Sep 04, 2006 3:33 pm

Re: Experiments..

Post by StompinTom » Sun Jan 05, 2014 3:35 am

That's looking good. Is this in the 'Original' sky model or the simulation model?

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Sun Jan 05, 2014 3:39 am

Hi Tom,
The ozone absorption has been added to the atmosphere medium. At some point I'll regenerate the captured simulation data so that the new sky model (captured simulation) will have the same effect.

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Sun Jan 05, 2014 3:52 am

In these renders the sun is directly behind the camera, 1 degree below the horizon.
Attachments
sun zenith 91 azimuth 270 with ozone tonemapping 0.2 linear.png
sun zenith 91 azimuth 270 no ozone tonemapping 0.2 linear.png

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Experiments..

Post by Zom-B » Sun Jan 05, 2014 4:08 am

The slightly more blue tint looks better to me then the previous ozone-free version.
A subtle enhancement, but still very welcome ;)
OnoSendai wrote:At some point I'll regenerate the captured simulation data so that the new sky model (captured simulation) will have the same effect.
While you are on that you mayba have a chance to fix the artifact the simulated sky has on the northpole (I used some more extreme camera tonemapping to show of the issue...)
sky_issue.jpg
Attachments
sky_issue.pigs
(1.81 KiB) Downloaded 253 times
polygonmanufaktur.de

User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Experiments..

Post by OnoSendai » Sun Jan 05, 2014 4:18 am

That artifact is just noise combined with a spherical coord mapping. Just needs more render time generating the sky data :)

Post Reply
250 posts

Who is online

Users browsing this forum: No registered users and 4 guests