Download Trial Buy now
Log in or Sign up for the chat.

Search  | Login  | Register

Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Offline
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?


 Profile  
 
Offline
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.


 Profile  
 
Offline
User avatar
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 ;)

_________________
Back from Lagrange 5


 Profile  
 
Offline
User avatar
Something around those lines:

Code:
<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.

 Profile  
 
Offline
User avatar
can't wait to see this material render ...


 Profile  
 
Offline
User avatar
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 3265 times ]

_________________
Back from Lagrange 5


Last edited by CTZn on Wed Mar 18, 2009 12:03 pm, edited 3 times in total.
 Profile  
 
Offline
User avatar
pretty nice test :D


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

Update:

Code:
<?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:
File comment: actual material
dichroic.jpg
dichroic.jpg [ 58.5 KiB | Viewed 3261 times ]
File comment: Interesting one for optical coating, settings were lost amongst multiple tests ;(
dichroic2.jpg
dichroic2.jpg [ 56.57 KiB | Viewed 3258 times ]

_________________
Back from Lagrange 5
 Profile  
 
Offline
User avatar
Indigo 100
Simply Great :)


 Profile  
 
Offline
User avatar
CTZn
very very cool! :D


 Profile  
 
Offline
User avatar
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 ?

_________________
Back from Lagrange 5


 Profile  
 
Offline
User avatar
Some investigations:

from http://www.lasercommunity.com/lc_view_p ... php?aid=17 about lasers:

Quote:
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.

 Profile  
 
Offline
User avatar
Final, or close; I'm not sure about absorbtion:

Code:
<?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:
File comment: soft dichroic glass
dichroic_glass_A.jpg
dichroic_glass_A.jpg [ 42.42 KiB | Viewed 3213 times ]
File comment: ior changed to 1.72, panes are about 8mm of thickness
dichroic_building.jpg
dichroic_building.jpg [ 56.83 KiB | Viewed 3208 times ]


Last edited by CTZn on Thu Mar 19, 2009 2:00 pm, edited 5 times in total.
 Profile  
 
Offline
User avatar
UT voice from somewhere: TRI-TRI-TRIPPLE POST!

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


 Profile  
 
Offline
User avatar
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:
<?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:
<?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 3108 times ]
File comment: closer to usual dichroic arch glass I guess
dichroic_glass_B.jpg
dichroic_glass_B.jpg [ 42.74 KiB | Viewed 3108 times ]
File comment: cool strange things happening
dichroic_glass_D_building.jpg
dichroic_glass_D_building.jpg [ 58.82 KiB | Viewed 3170 times ]
File comment: A characterized one
dichroic_glass_D.jpg
dichroic_glass_D.jpg [ 44.65 KiB | Viewed 3169 times ]

_________________
Back from Lagrange 5


Last edited by CTZn on Sat Mar 21, 2009 8:30 am, edited 5 times in total.
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group