Indigo 1.0.4

General News and accouncements regarding the Indigo render engine
Post Reply
160 posts
User avatar
OnoSendai
Developer
Posts: 6215
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Indigo 1.0.4

Post by OnoSendai » Wed Nov 28, 2007 5:08 am

http://www.indigorenderer.com/joomla/in ... &Itemid=62

changelog:
1.0.4
* added some more checks for XML parsing.
* changed texturing code a bit (faster)
* added aperture_diffraction toggle in infile.
* added aperture_shape camera XML element
* added obstacle_map camera XML element
* fixed error handling when parsing camera response functions.


The main new thing in v1.0.4 is new aperture code, and the related aperture diffraction code.

Aperture shape

The camera XML element now takes an element called 'aperture_shape', that defines the shape of the camera aperture.

The first type of aperture shape is the circular (disc) aperture. If the aperture_shape element is missing, this is assumed as the default.

Code: Select all

<aperture_shape>
		  <circular></circular>
</aperture_shape>
The second type of aperture shape specification generates an aperture visibility map using some diaphragm blade drawing code.

Code: Select all

 <aperture_shape>
		  <generated>
			  <num_blades>6</num_blades>
			  <blade_offset>0.4</blade_offset>
			  <blade_curvature_radius>3.0</blade_curvature_radius>
			  <start_angle>0.2</start_angle>
		  </generated>
</aperture_shape>

The third type of aperture shape just reads a .png image from disk to use as the aperture visibility map. White = light can pass thru, black = blocked.
the image must be square, power of 2 width and height, and be at least 512*512.
The path is absolute or relative to scene file dir.

Code: Select all

<aperture_shape>
		  <image>
			<path>indigo_aperture.png</path>
		  </image>
	  </aperture_shape>
EDIT:
The final aperture size is determined by two factors - the shape defined by the aperture_shape element, and the aperture_radius camera parameter.
In effect, the overall aperture size is multiplied by aperture_radius.

Aperture_radius should really be called 'aperture half width', because it affects the overall scale of the square aperture visibility map.

When creating an aperture map, try and make the white area as similar in area to a disc touching the edges as possible. This will mean that the overall image intensity won't change too much when changing aperture shapes. Use the aperture_radius camera parameter as before, to let more or less light in.


Aperture diffraction

When light (or any wave) passes through a small gap, such as a camera aperture, it spreads out or 'diffracts'. The pattern in which it spreads out depends on factors such as the shape of the aperture and the wavelength of the light. This is a fundamental physical effect which gives a limit on the resolution of optical devices that use apertures (cameras, telescopes etc..)
Such diffraction is also responsible for the glare around bright light sources in photos. Depending on the shape and symmetries of the aperture, different patterns of glare will be apparent.

The new glare stuff in Indigo is based on the paper 'Glare Generation Based on Wave Optics' http://nis-lab.is.s.u-tokyo.ac.jp/nis/abs_cgi.html
which points out that such a diffraction pattern can be calculated using the 2d Fourier transform of the aperture map.

Aperture diffraction is simulated by perturbing rays as they pass through the camera aperture, thanks to Robin Davies for articulating this idea.

An alternative implementation of physically-based diffraction glare could convolve the frame buffer with the diffraction filter as a post-process; I have implemented this, but I currently prefer the non-post-process technique, because you don't have to wait for the convolution, and the results are more realistic because full spectral sampling can be used, whereas a post-process has to work on a 3-component image buffer.

To enable aperture diffraction, set
"aperture_diffraction" "true"
in the inifile.
There is something like a 10% performance penalty (depending on scene) for enabling diffraction, as some non-trivial code has to be executed for each light path.

As per the paper 'Glare Generation Based on Wave Optics', you can specify an (optional) obstacle map in the camera XML. The obstacle map will affect the diffraction pattern.
Use like this:

Code: Select all

<obstacle_map>
		  <path>diag_obstacle.png</path>
</obstacle_map>
The image must be square, power of 2 width and height, and be at least 512*512.
The path is absolute or relative to scene file dir.

When Indigo executes, it will save a couple of files to the indigo dir: aperture_preview.png and diffraction_preview.png, which help you to get an idea of the shape of the aperture and of the diffraction pattern.

Attached are a couple of demonstration images.
The airy_disc image demonstrates diffraction from a circular aperture for monochromatic light.
If you do the maths for the pixel radius of the first Airy disc zero, based on the camera geometry, it should come out as 8.47 pixels, which you can confirm in the image.
See airy_disc_test.igs.

The second image demonstates diffraction from a curved hexagonal aperture, with a regular obstacle map.
See diffraction_test.igs.


Phew, think that about sums it up :)
Attachments
aperture.png
aperture.png (22.68 KiB) Viewed 11631 times
glare.png
glare.png (145.07 KiB) Viewed 11686 times
airydisc.png
airydisc.png (126.83 KiB) Viewed 11684 times
Last edited by OnoSendai on Wed Jan 30, 2008 6:09 pm, edited 7 times in total.

User avatar
alexmeyer
Posts: 150
Joined: Tue Jan 16, 2007 7:55 am
Contact:

Post by alexmeyer » Wed Nov 28, 2007 5:10 am

FIRST!!!

Juvenile, I know... whatever.

Thanks ono! :wink:
From uncyclopedia.org, on "Elephant's Dream":

"The choice of the title is highly significant, because while the movie does not feature any elephants nor dreams, no one understands what happens anyway."

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Post by psor » Wed Nov 28, 2007 5:11 am

Wow, awesome! Thanks a lot Sir! ;o))


take care
psor
"The sleeper must awaken"

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Wed Nov 28, 2007 5:19 am

OMG :shock:

another level of realism. Will test later... (and possibly have to restart my fibre optic experiments grrr).

User avatar
cpfresh
Posts: 501
Joined: Thu Jun 14, 2007 12:20 pm
Location: California, USA
Contact:

Post by cpfresh » Wed Nov 28, 2007 5:27 am

Awesome, thank you Ono! :D

User avatar
Kosmokrator
Posts: 1141
Joined: Sat Jul 29, 2006 11:52 am
Location: Greece-Athens

Post by Kosmokrator » Wed Nov 28, 2007 5:39 am

THANX THANX THANX!!!!!

AN OTHER GREAT RELEASE....... :wink:
before some hours a request become true with this release....
u r in our minds!!!
how far can u bring indigo Nick?(retoric question)
1)Core i7 965XE stock CLOCK ,PSU:CHIEFTEC 850W
M/B ASUS P6T DELUXE,WATERCOOLING ZALMAN RESERATOR 2
MEMORY:6GB CORRSAIR @1600,Ati HD 4870x2,
MONITOR:LG 1950SQ,CASE:THERMALTAKE SOPRANO

User avatar
SmartDen
Developer
Posts: 999
Joined: Fri Oct 13, 2006 10:58 pm
Location: Canary Islands
Contact:

Post by SmartDen » Wed Nov 28, 2007 5:44 am

Wow :shock:
Can't await to implement it in blendigo :)
GREAT WORK, NICK!
Last edited by SmartDen on Wed Nov 28, 2007 6:06 am, edited 1 time in total.

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Post by dougal2 » Wed Nov 28, 2007 5:56 am

..and already implemented in MayaToIndigo

Nick, can you give us some sensible limits for the values in <generated> please ?
Attachments
camApTest.xml.png
camApTest.xml.png (20.01 KiB) Viewed 11651 times

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

Post by OnoSendai » Wed Nov 28, 2007 6:13 am

Added a diagram of how generated_aperture works.

User avatar
manitwo
Posts: 1029
Joined: Wed Jul 05, 2006 4:50 am
Location: Tirol - Austria

Post by manitwo » Wed Nov 28, 2007 6:23 am

wohooo :D thanks!

BbB
Posts: 1996
Joined: Fri Feb 09, 2007 8:28 am
Location: Berlin
Contact:

Post by BbB » Wed Nov 28, 2007 6:33 am

Danke schoen!

User avatar
ortega
Posts: 88
Joined: Sat Jun 16, 2007 3:40 am
Location: Bahia - Brasil
Contact:

Post by ortega » Wed Nov 28, 2007 6:36 am

woah!!!!!! Nice effect :D

thx mr Ono!

ps: Where the render? (about bedroon) 8)

User avatar
Camox
2nd Place Winner
Posts: 587
Joined: Sat Aug 05, 2006 5:28 am
Location: Berlin Germany
Contact:

Post by Camox » Wed Nov 28, 2007 7:31 am

Thank you Nick ! :D

User avatar
metapixel
Posts: 81
Joined: Wed Nov 07, 2007 9:43 pm
Location: Italy

Post by metapixel » Wed Nov 28, 2007 8:09 am

:D :D :D
Thank!
:D :D :D

paulo_gomes
Posts: 48
Joined: Wed Sep 27, 2006 10:28 am

Post by paulo_gomes » Wed Nov 28, 2007 8:26 am

Thanks Ono!

Post Reply
160 posts

Who is online

Users browsing this forum: No registered users and 2 guests