Mist material

Come here for help & support.
StompinTom
Indigo 100
Posts: 1828
Joined: Mon Sep 04, 2006 3:33 pm

Re: Mist material

Post by StompinTom » Wed Jun 30, 2010 7:32 am

fused wrote:nevermind guys... its soooooooooooo slow without LLVM (im on x64), it wont even start rendering.
Rendering OK here... except I see no progression from the bottom to the top. Tried playing around with the multipliers but nothing... Scale thing?

EDIT: Win7, 64-bit, Indigo 2.4.4 on an i7 930.

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: Mist material

Post by fused » Wed Jun 30, 2010 7:42 am

StompinTom wrote:
fused wrote:nevermind guys... its soooooooooooo slow without LLVM (im on x64), it wont even start rendering.
Rendering OK here... except I see no progression from the bottom to the top. Tried playing around with the multipliers but nothing... Scale thing?

EDIT: Win7, 64-bit, Indigo 2.4.4 on an i7 930.
no, that shader was just not final :)

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: Mist material

Post by fused » Wed Jun 30, 2010 7:45 am

try that:

Code: Select all

    <medium>
        <name>MedIndigo Material_mid1</name>
        <precedence>10</precedence>
        <basic>
            <ior>1.000000</ior>
            <cauchy_b_coeff>0.000000</cauchy_b_coeff>
          <absorption_coefficient>
            <shader>
              <shader>
                <![CDATA[   
                def eval(vec3 pos) vec3 :
                   vec3(fbm(pos, 3) * 5.0 * pow(dotk(pos) * 1.0, -1.0))
                   #vec3(0.0)
                ]]>
              </shader>
              <wavelength_dependent>false</wavelength_dependent>
            </shader>
          </absorption_coefficient>
          <subsurface_scattering>
            <scattering_coefficient>
              <shader>
                <shader>
                  <![CDATA[   
                def eval(vec3 pos) vec3 :
                   vec3(fbm(pos, 3) * 10.0 * pow(dotk(pos) * 1.0, -1.0))
                   #vec3(0.0)
                ]]>
                </shader>
                <wavelength_dependent>false</wavelength_dependent>
              </shader>
            </scattering_coefficient>
            <phase_function>
              <uniform />
            </phase_function>
          </subsurface_scattering>
        </basic>
    </medium>
edit: you may want to play with the multipliers, namely the "* 5.0 *", which changes the strenght of the whole shader and the "* 1.0", which changes the fallof. < 1.0 should slower falloff, >1.0 faster.

Post Reply
18 posts

Who is online

Users browsing this forum: No registered users and 51 guests