Heterogeneous participating media tests

General questions about Indigo, the scene format, rendering etc...
User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Re: Heterogeneous participating media tests

Post by OnoSendai » Sun Nov 08, 2009 5:44 pm

neo0. wrote:Will this only be available to people who know ISL?
Hi Neo,
At some point I plan to do some stuff to make ISL easier to use, as in make a Gui interface to controlling the parameters. So underneath it will still be ISL, but it should be usable by non-programmers.

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

Re: Heterogeneous participating media tests

Post by OnoSendai » Sun Nov 08, 2009 9:37 pm

psor wrote: More to read as why wouldn't you wanna allow that. Is there a side effect you want to avoid?
Well, it's just that allowing curved paths would make things a lot more complicated, although I guess you would decompose said paths into a piecewise linear approximation.

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

Re: Heterogeneous participating media tests

Post by OnoSendai » Sun Nov 08, 2009 9:40 pm

Test with a shader modifying the scattering coefficient.
The medium is enclosed in a cube in this scene - it's the shader that defines the spherical region in which the scattering coefficient is greater than zero:

Code: Select all

def eval(vec3 pos) vec3 :
	vec3(
                if(
                  dist(pos, vec3(0.0, 1.5, 1.5)) < 0.6,
                  2.0,
                  0.0
                 )
	  )
Attachments
ball.JPG
ball.JPG (84.53 KiB) Viewed 8243 times

User avatar
BBjam
Indigo 100
Posts: 54
Joined: Sun Jan 28, 2007 1:51 pm
Contact:

Re: Heterogeneous participating media tests

Post by BBjam » Mon Nov 09, 2009 5:09 am

Is there any chance you could add support for 3D textures, or some kind of volumetric data sets?
I'm thinking of what one would need to get a fluid blending sim, say from Real Flow, into indigo.

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

Re: Heterogeneous participating media tests

Post by CTZn » Mon Nov 09, 2009 7:57 am

Exciting, Ono ! Would that eventually collapse into a star (ie will volumetric emission happen) ?

Just found:

http://www.custard.org/~andrew/visualization/datasets]
http://www9.informatik.uni-erlangen.de/External/vollib/

http://www.vizworld.com/tag/volume/ (for its first article/OT)
obsolete asset

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

Re: Heterogeneous participating media tests

Post by OnoSendai » Mon Nov 09, 2009 10:05 am

Volumetric emission may indeed happen at some point. :)

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

Re: Heterogeneous participating media tests

Post by OnoSendai » Mon Nov 09, 2009 10:09 am

BBjam wrote:Is there any chance you could add support for 3D textures, or some kind of volumetric data sets?
I'm thinking of what one would need to get a fluid blending sim, say from Real Flow, into indigo.
Yup, support for 3d volume data sets would be cool. The main issue I have with volume datasets is that there doesn't seem to be a standard file format for them, so it's a bit hard to know which format to support.

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

Re: Heterogeneous participating media tests

Post by CTZn » Tue Nov 10, 2009 3:45 am

Indeed. Maya uses an own binary voxel cache, period. But parameters are accessible per voxel ;)

Would be cool if Indigo had a pipeline for voxels later, because fluids/liquids are based on a finite voxel container in most apps supporting them (ie 10x25x25. blender, Maya and I suppose 3dxMax and C4D).

Nice voxels interpolation (Hermite?) would be Indigo...

Just speculating :D

Meanwhile those volumetric parameters and upcoming improved ISL accessibility are great great news Ono !
obsolete asset

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

Re: Heterogeneous participating media tests

Post by OnoSendai » Thu Jan 07, 2010 1:28 pm

A new test:
The clouds are done with a scattering medium, where a FBM ISL shader controls the cloud density.
Attachments
clouds.jpg
clouds.jpg (59.71 KiB) Viewed 7876 times

Musorgki
Posts: 17
Joined: Mon Oct 15, 2007 3:01 pm

Re: Heterogeneous participating media tests

Post by Musorgki » Fri Jan 08, 2010 8:39 am

Thats cool!

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

Re: Heterogeneous participating media tests

Post by OnoSendai » Fri Jan 08, 2010 10:09 am

In this image, a volumetric shader is controlling the absorption of the glass medium.
It's basically a continous blend between three different absorption colours.
The medium looks like this:

Code: Select all

<medium>
        <name>MedIndigo Material_mid0</name>
        <precedence>10</precedence>
        <basic>
            <ior>1.600000</ior>
            <cauchy_b_coeff>0.000000</cauchy_b_coeff>
            <absorption_coefficient>

              <shader>
                <wavelength_dependent>true</wavelength_dependent>
                <shader>
                  <![CDATA[
                  
                    def col(real t) vec3 :
                    
                      if(
                        t < 0.5,
                        lerp(
                          vec3(100.0, 100.0, 1.0), # blue
                          vec3(1.0, 100.0, 100.0), # red
                          smoothstep(0.25, 0.35, t)
                         ),
                         lerp(
                          vec3(1.0, 100.0, 100.0), # red
                          vec3(1.0, 1.0, 100.0), # yellow
                          smoothstep(0.65, 0.75, t)
                         )
                        )
                      
                     def eval(vec3 pos) vec3:
                         col(e2(pos) * 6.0)
                         
                         # + fbm(pos * 100.0, 6) * 0.5
                  ]]>
                </shader>
              </shader>
            </absorption_coefficient>
        </basic>
    </medium>
Attachments
glass.jpg
glass.jpg (68.73 KiB) Viewed 7725 times

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

Re: Heterogeneous participating media tests

Post by Zom-B » Fri Jan 08, 2010 10:13 am

now please a sponge bob render with this technique :)
A feature for the 2.2 branch or above?
polygonmanufaktur.de

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

Re: Heterogeneous participating media tests

Post by OnoSendai » Fri Jan 08, 2010 10:18 am

This stuff is for the 2.4.x series (next series after 2.2.x)

neo0.
Posts: 1784
Joined: Thu Feb 28, 2008 7:11 am
Location: the US of A

Re: Heterogeneous participating media tests

Post by neo0. » Fri Jan 08, 2010 10:43 am

^
This is really cool. Maybe we could get access to some basic shader presets through the UI.. I have always really wanted to see a shader for creating bumpy water (without the need for bump maps.)

As for the clouds.. really neat stuff! Any possibility of getting a full blown atmospheric system with things like atmospheric scattering.

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Re: Heterogeneous participating media tests

Post by suvakas » Fri Jan 08, 2010 11:47 am

That glass render looks awesome !! :)

Post Reply
41 posts

Who is online

Users browsing this forum: No registered users and 101 guests