dichroic glass

General discussion about Indigo Materials - material requests, material developement, feedback, etc..
hva
Posts: 3
Joined: Thu Jan 25, 2007 11:55 am

dichroic glass

Post by hva » Tue Mar 17, 2009 5:28 am

I'm modeling a new building we are designing. Modeling in Blender and going to da final render with Indigo.
It's supposed to have a glass skin treated with a dichroic thin film or coating.
I though maybe indigo would be able to render this kind of material somehow, but I don't really know how. could someone help me pointing me in the right direction?

hva
Posts: 3
Joined: Thu Jan 25, 2007 11:55 am

Post by hva » Tue Mar 17, 2009 8:53 pm

I forgot to mention that I used to fake the effect of a dichroic glass in blender rather easily through the use of a magic procedural texture. Of course this can't be the way in Indigo for qhat i can see.

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

Post by CTZn » Tue Mar 17, 2009 9:43 pm

What was the magic of the procedural texture hva ? Based on light or camera angles, or world orientation ? These informations are not accessible via isl (apart maybe the later), they must be taken ("baked" ?) from the host app/exporter to be aknowledged by the Indigo Shading Language; this is an advanced topic, exporter-specific until isl allow such accesses.

Questions regarding your scene:

Do you expect transparency from your dichroic glass ? If yes, how close/accurate ? Or reflections would be enough ?

The most accurate approximation I can imagine right now is a glass with different colors for absorbtion and sub-surface scattering. Scatter should be of a tight spread angle... Either what you might be able to bake the procedural texture and use it on a blended phong, as specular_reflectivity...

all theorical ;)
obsolete asset

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

Post by CTZn » Wed Mar 18, 2009 2:34 am

Something around those lines:

Code: Select all

<medium>
	<name>dichrolike_medium</name>
	<precedence>6</precedence>
	<basic>
		<ior>1.393849969</ior>
		<cauchy_b_coeff>0</cauchy_b_coeff>
		<absorption_coefficient_spectrum>
				<rgb>
					<rgb>0.0420953331 0.010 0.03045000076</rgb>
					<gamma>2.200000048</gamma>
				</rgb>
		</absorption_coefficient_spectrum>
		<subsurface_scattering>
			<scattering_coefficient_spectrum>
				<rgb>
					<rgb>3.195000076 16 4.097499847</rgb>
					<gamma>2.200000048</gamma>
				</rgb>
			</scattering_coefficient_spectrum>
			<phase_function>
				<henyey_greenstein>
					<g_spectrum>
				<rgb>
					<rgb>1 0 1</rgb>
					<gamma>1</gamma>
				</rgb>
					</g_spectrum>
				</henyey_greenstein>
			</phase_function>
		</subsurface_scattering>
	</basic>
</medium>

<material>
	<name>previewmaterial</name>
	<specular>
		<transparent>true</transparent>
		<internal_medium_name>dicrolike_medium</internal_medium_name>
	</specular>
</material>
Don't use that material if it's not for real glassery or jewelry, not that it correspond to an existing material but it will not be efficient for exterior shots I fear.

Again it's an approximation, colours are split not based on their wavelenghts but on their nature, absorbed/scattered. Though, the phase_function parameter will dispatch scattering based on wavelenghts (kind of), you may want to experiment with that one. Also you may want to divide scale-dependent parameters by 10 or 100 in that code. Finally, colors are not balanced.

An image with that material is cooking, will post.
Last edited by CTZn on Thu Mar 19, 2009 2:01 pm, edited 1 time in total.

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

Post by cpfresh » Wed Mar 18, 2009 3:52 am

can't wait to see this material render ...

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

Post by CTZn » Wed Mar 18, 2009 4:10 am

Eat it crude then :lol: (edit: it's better cooked now)

You can see the effect of the phase function: scattering red and blue components are propagating almost straight inside the medium, while green has a razing scattering angle. Of course both emiters are of plain white emission.

Edit: directly inspired by http://www.indigorenderer.com/joomla/co ... temId=6578

PS: Unlike what I formerly stated, since this shader heavily relies on phase function it can be called "polychroic" (can it actually ?), dichroism is effectively reached because R and B components have the same phase param; It's not simply discriminating between (non) absorbed light and scattered light.
Attachments
dichrolike.jpg
dichrolike.jpg (29.4 KiB) Viewed 7385 times
Last edited by CTZn on Wed Mar 18, 2009 12:03 pm, edited 3 times in total.
obsolete asset

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Wed Mar 18, 2009 6:44 am

pretty nice test :D

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

Post by CTZn » Wed Mar 18, 2009 7:55 am

I'm currently tweaking the material, depending on results I may upload it in the matDB.

Update:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<scenedata>
	<medium>
		<name>dichro_medium</name>
		<precedence>6</precedence>
		<basic>
			<ior>1.393849969</ior>
			<cauchy_b_coeff>0</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
					<rgb>
						<rgb>6 3.5 3</rgb>
						<gamma>2.2</gamma>
					</rgb>
			</absorption_coefficient_spectrum>
			<subsurface_scattering>
				<scattering_coefficient_spectrum>
					<rgb>
						<rgb>11 6 14</rgb>
						<gamma>2.200000048</gamma>
					</rgb>
				</scattering_coefficient_spectrum>
				<phase_function>
					<henyey_greenstein>
						<g_spectrum>
							<peak>
								<peak_min>485</peak_min>
								<peak_width>80</peak_width>
								<base_value>-0.065</base_value>
								<peak_value>0.72</peak_value>
							</peak>
						</g_spectrum>
					</henyey_greenstein>
				</phase_function>
			</subsurface_scattering>
		</basic>
	</medium>
	
	<material>
		<name>previewmaterial</name>
		<specular>
			<transparent>true</transparent>
			<internal_medium_name>dichro_medium</internal_medium_name>
		</specular>
	</material>
</scenedata>
Nearly final, you can save it as an igm file.
Attachments
dichroic2.jpg
Interesting one for optical coating, settings were lost amongst multiple tests ;(
dichroic2.jpg (56.57 KiB) Viewed 7378 times
dichroic.jpg
actual material
dichroic.jpg (58.5 KiB) Viewed 7381 times
obsolete asset

User avatar
Jambert
Indigo 100
Posts: 545
Joined: Wed Jul 30, 2008 10:08 pm
Location: France, Lyon

Post by Jambert » Wed Mar 18, 2009 7:07 pm

Simply Great :)

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

Post by cpfresh » Wed Mar 18, 2009 7:08 pm

CTZn
very very cool! :D

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

Post by CTZn » Wed Mar 18, 2009 8:57 pm

Thanks a lot, Jambert and cpfresh !

I'll look for references now and will try to get a final material. hva, such references would have come in handy :) Perhaps I'll explain what's going on with that peak spectrum then.

How helpfull do you see these materials hva ?
obsolete asset

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

Post by CTZn » Wed Mar 18, 2009 10:02 pm

Some investigations:

from http://www.lasercommunity.com/lc_view_p ... php?aid=17 about lasers:
If you really want a beamsplitter, they are available online. Watch out, as some are polarizing (reflect/refract based on the angle of polarization of the laser) while others are dichroic (reflect/refract based on wavelength of light).
wich pointed me to perhaps use tabulated data for phase function, along with another one for ior [edit: scratch the later]...

found this: J-band Dichroic Mirror Transmission Data Table - [link to main page]

Note that the page also contains interesting atmospherical data.
Last edited by CTZn on Fri Mar 20, 2009 1:23 am, edited 1 time in total.

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

Post by CTZn » Thu Mar 19, 2009 5:23 am

Final, or close; I'm not sure about absorbtion:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<scenedata>
	<medium>
		<name>dichroic_glass_A_medium</name>
		<precedence>6</precedence>
		<basic>
			<ior>1.39</ior>
			<cauchy_b_coeff>0.0018</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
					<rgb>
						<rgb>1.27 2.45 1.8</rgb>
						<gamma>2.2</gamma>
					</rgb>
			</absorption_coefficient_spectrum>
			<subsurface_scattering>
				<scattering_coefficient_spectrum>
					<rgb>
						<rgb>4.4 3.2 4.8</rgb>
						<gamma>2.200000048</gamma>
					</rgb>
				</scattering_coefficient_spectrum>
				<phase_function>
					<henyey_greenstein>
						<g_spectrum>
						
							<!--peak>
								<peak_min>480</peak_min>
								<peak_width>70</peak_width>
								<base_value>-0.065</base_value>
								<peak_value>0.72</peak_value>
							</peak-->
							
							<regular_tabulated>
								<start_wavelength>0.4E-06</start_wavelength>
								<end_wavelength>0.7E-06</end_wavelength>
								<num_values>6</num_values>
								<values>
								-0.975 -0.8 -0.6 0.6 0.8 0.975
								</values>
							</regular_tabulated>
							
						</g_spectrum>
					</henyey_greenstein>
				</phase_function>
			</subsurface_scattering>
		</basic>
	</medium>
	
	<material>
		<name>previewmaterial</name>
		<specular>
			<transparent>true</transparent>
			<internal_medium_name>dichroic_glass_A_medium</internal_medium_name>
		</specular>
	</material>
</scenedata>
Some more tweakings and I upload it.
Attachments
dichroic_building.jpg
ior changed to 1.72, panes are about 8mm of thickness
dichroic_building.jpg (56.83 KiB) Viewed 7328 times
dichroic_glass_A.jpg
soft dichroic glass
dichroic_glass_A.jpg (42.42 KiB) Viewed 7333 times
Last edited by CTZn on Thu Mar 19, 2009 2:00 pm, edited 5 times in total.

User avatar
PureSpider
Posts: 1459
Joined: Tue Apr 08, 2008 9:37 am
Location: Karlsruhe, BW, Germany
Contact:

Post by PureSpider » Thu Mar 19, 2009 6:39 am

UT voice from somewhere: TRI-TRI-TRIPPLE POST!

Really like what you created here :)
Keep it on and finish it ;)

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

Post by CTZn » Thu Mar 19, 2009 1:34 pm

If that wasn't with you I would have beaten my own record right now :twisted: Eeew, I'm tweaking, documenting myself, rendering, pruning renders, learning, eventually spreading knowledge...

Basically reporting, no ;) ?

Note: All these materials should greatly benefit from a very subtle bump mapping, smooth wavy style. If you can displace that, that would be even better. Perfect flat surfaces are so boring !

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<scenedata>
	<medium>
		<name>dichroic_glass_B_medium</name>
		<precedence>6</precedence>
		<basic>
			<ior>1.48357</ior>
			<cauchy_b_coeff>0.00072487</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
							<regular_tabulated>
								<start_wavelength>0.4E-06</start_wavelength>			<!-- from the beginning of the visible spectrum -->
								<end_wavelength>0.7E-06</end_wavelength>				<!-- to its end -->
								<num_values>20</num_values>						<!-- get 20 samples -->
								<values>											<!-- 5x4 -->
									0 0.01 0.03 0.003 0.0186127
									0.006 0.008 0.1 0.095 0
									0.8639 0.81 0.07983 0.62 0.541978
									0.94 0.007439 0.24 0.000612 0.00624
								</values>
							</regular_tabulated>
			</absorption_coefficient_spectrum>
			<subsurface_scattering>
				<scattering_coefficient_spectrum>
							<regular_tabulated>
								<start_wavelength>0.4E-06</start_wavelength>
								<end_wavelength>0.7E-06</end_wavelength>
								<num_values>10</num_values>
								<values>
									0.2 0.94 0.81 0.62 0 0.1 0.006 0.003 0.01 0
								</values>
							</regular_tabulated>
				</scattering_coefficient_spectrum>
				<phase_function>
					<henyey_greenstein>
						<g_spectrum>							
							<regular_tabulated>
								<start_wavelength>0.4E-06</start_wavelength>
								<end_wavelength>0.7E-06</end_wavelength>
								<num_values>10</num_values>
								<values>
								0.027 -0.25 -0.975 -0.8 -0.96 0.62 0.81 0.094 0.18 0.05
								</values>
							</regular_tabulated>
						</g_spectrum>
					</henyey_greenstein>
				</phase_function>
			</subsurface_scattering>
		</basic>
	</medium>
	
	<material>
		<name>previewmaterial</name>
		<specular>
			<transparent>true</transparent>
			<internal_medium_name>dichroic_glass_B_medium</internal_medium_name>
		</specular>
	</material>
</scenedata>

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<scenedata>
	<medium>
		<name>dichroic_glass_D_medium</name>
		<precedence>6</precedence>
		<basic>
			<ior>1.72</ior>
			<cauchy_b_coeff>0.0018</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
					<rgb>
						<rgb>1.27 2.45 1.8</rgb>
						<gamma>2.2</gamma>
					</rgb>
			</absorption_coefficient_spectrum>
			<subsurface_scattering>
				<scattering_coefficient_spectrum>
							<regular_tabulated>
								<start_wavelength>0.4E-06</start_wavelength>
								<end_wavelength>0.7E-06</end_wavelength>
								<num_values>10</num_values>
								<values>
									0 -0.25 -0.975 -0.8 -0.6 0.62 0.81 0.94 0.2 0
								</values>
							</regular_tabulated>
				</scattering_coefficient_spectrum>
				<phase_function>
					<henyey_greenstein>
						<g_spectrum>
							<regular_tabulated>
								<start_wavelength>0.4E-06</start_wavelength>
								<end_wavelength>0.7E-06</end_wavelength>
								<num_values>10</num_values>
								<values>
									0 -0.25 -0.975 -0.8 -0.6 0.62 0.81 0.94 0.2 0
								</values>
							</regular_tabulated>
						</g_spectrum>
					</henyey_greenstein>
				</phase_function>
			</subsurface_scattering>
		</basic>
	</medium>
	
	<material>
		<name>previewmaterial</name>
		<specular>
			<transparent>true</transparent>
			<internal_medium_name>dichroic_glass_D_medium</internal_medium_name>
		</specular>
	</material>
</scenedata>
Removed dichroic_glass_E cause it had wrong settings (negative absorbtion).

Would you help render Pure :P ?

edit; more references for dichroic glasses: http://www.worldglassnet.com/pages/appG ... subcat=All

PostS.: I edited previous codes, they weren't matching the matDB naming convention, I think that's better now. Will do a last check before upload.
Attachments
dichroic_glass_B_building.jpg
dichroic_glass_B_building.jpg (60.07 KiB) Viewed 7228 times
dichroic_glass_B.jpg
closer to usual dichroic arch glass I guess
dichroic_glass_B.jpg (42.74 KiB) Viewed 7228 times
dichroic_glass_D_building.jpg
cool strange things happening
dichroic_glass_D_building.jpg (58.82 KiB) Viewed 7290 times
dichroic_glass_D.jpg
A characterized one
dichroic_glass_D.jpg (44.65 KiB) Viewed 7289 times
Last edited by CTZn on Sat Mar 21, 2009 8:30 am, edited 5 times in total.
obsolete asset

Post Reply
18 posts

Who is online

Users browsing this forum: No registered users and 1 guest