ISL shader nodes

Announcements, requests and support regarding the Cinema 4D exporter
User avatar
OnoSendai
Developer
Posts: 6083
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: ISL shader nodes

Post by OnoSendai » Sat Nov 28, 2009 6:48 pm

Sweet, now it just needs some vegetation and snow shaders :)

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

Re: ISL shader nodes

Post by fused » Sat Nov 28, 2009 7:37 pm

hehe, theres a blend shader for that!

circular gradient + fbm again :)

the snow is actually a little more displaced than the rocks :P
snow mountain.jpg
snow mountain.jpg (179.55 KiB) Viewed 2968 times
8)

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

Re: ISL shader nodes

Post by fused » Sat Nov 28, 2009 7:39 pm

oh and of course the shader generated by cindigo:

Code: Select all

    <material>
        <name>rock_mid0_b_l_e_n_d_A</name>
        <oren_nayar>
            <sigma>
                <constant>0.200000</constant>
            </sigma>
            <albedo>
                <texture>
                    <texture_index>0</texture_index>
                </texture>
            </albedo>
            <texture>
                <uv_set>default</uv_set>
                <path>..\..\..\..\..\Desktop\rock_03.jpg</path>
                <exponent>2.200000</exponent>
                <a>0.000000</a>
                <b>1.000000</b>
                <c>0.000000</c>
            </texture>
            <displacement>
                <shader>
                    <shader>
                        <![CDATA[def Vec3ToReal(vec3 v) real : ((doti(v) + dotj(v) + dotk(v)) / 3.0)
					   def noise01(vec3 v) real : ((noise(v) + 1.0) * 0.5)
					   def noise01(vec2 v) real : ((noise(v) + 1.0) * 0.5)
					   def noise01(real r) real : ((noise(r) + 1.0) * 0.5)
					   def fbm01(vec3 v, int oc) real : ((fbm(v,oc) + 1.0) * 0.5)
					   def fbm01(vec2 v, int oc) real : ((fbm(v,oc) + 1.0) * 0.5)
					   def fbm01(real r, int oc) real : ((fbm(r,oc) + 1.0) * 0.5)
					   def mulCompVec2(vec2 a, vec2 b) vec2 : vec2(doti(a) * doti(b), dotj(a) * dotj(b))
					   def mulCompVec3(vec3 a, vec3 b) vec3 : vec3(doti(a) * doti(b), dotj(a) * dotj(b), dotk(a) * dotk(b))
def eval() real: ((Vec3ToReal(lerp(vec3(1.00000, 1.00000, 1.00000), vec3(0.00000, 0.00000, 0.00000), length(vec2(0.5,0.5) - getTexCoords(0)) * 2.0 )) * 1.00000 + 0.35000 * fbm01(mulCompVec2(getTexCoords(0) * 10.0, vec2(1.00000, 1.00000)),8)) * 1.50000 + 1.00000 * noise(mulCompVec2(getTexCoords(0) * 10.0, vec2(0.25000, 0.25000)))) * 6.00000]]>
</shader>
                </shader>
            </displacement>
        </oren_nayar>
    </material>
    <material>
        <name>snow_mid1</name>
        <phong>
            <ior>1.500000</ior>
            <diffuse_albedo>
                <constant>
                    <rgb>
                        <rgb>0.900000 0.900000 0.900000</rgb>
                        <gamma>2.200000</gamma>
                    </rgb>
                </constant>
            </diffuse_albedo>
            <exponent>
                <constant>250.000000</constant>
            </exponent>
            <displacement>
                <shader>
                    <shader>
                        <![CDATA[def Vec3ToReal(vec3 v) real : ((doti(v) + dotj(v) + dotk(v)) / 3.0)
					   def noise01(vec3 v) real : ((noise(v) + 1.0) * 0.5)
					   def noise01(vec2 v) real : ((noise(v) + 1.0) * 0.5)
					   def noise01(real r) real : ((noise(r) + 1.0) * 0.5)
					   def fbm01(vec3 v, int oc) real : ((fbm(v,oc) + 1.0) * 0.5)
					   def fbm01(vec2 v, int oc) real : ((fbm(v,oc) + 1.0) * 0.5)
					   def fbm01(real r, int oc) real : ((fbm(r,oc) + 1.0) * 0.5)
					   def mulCompVec2(vec2 a, vec2 b) vec2 : vec2(doti(a) * doti(b), dotj(a) * dotj(b))
					   def mulCompVec3(vec3 a, vec3 b) vec3 : vec3(doti(a) * doti(b), dotj(a) * dotj(b), dotk(a) * dotk(b))
def eval() real: ((Vec3ToReal(lerp(vec3(1.00000, 1.00000, 1.00000), vec3(0.00000, 0.00000, 0.00000), length(vec2(0.5,0.5) - getTexCoords(0)) * 2.0 )) * 1.00000 + 0.35000 * fbm01(mulCompVec2(getTexCoords(0) * 10.0, vec2(1.00000, 1.00000)),8)) * 1.50000 + 1.00000 * noise(mulCompVec2(getTexCoords(0) * 10.0, vec2(0.25000, 0.25000)))) * 6.10000]]>
</shader>
                </shader>
            </displacement>
        </phong>
    </material>
    <material>
        <name>rock_mid0</name>
        <blend>
            <a_name>rock_mid0_b_l_e_n_d_A</a_name>
            <b_name>snow_mid1</b_name>
            <step_blend>false</step_blend>
            <blend>
                <shader>
                    <shader>
                        <![CDATA[def Vec3ToReal(vec3 v) real : ((doti(v) + dotj(v) + dotk(v)) / 3.0)
					   def noise01(vec3 v) real : ((noise(v) + 1.0) * 0.5)
					   def noise01(vec2 v) real : ((noise(v) + 1.0) * 0.5)
					   def noise01(real r) real : ((noise(r) + 1.0) * 0.5)
					   def fbm01(vec3 v, int oc) real : ((fbm(v,oc) + 1.0) * 0.5)
					   def fbm01(vec2 v, int oc) real : ((fbm(v,oc) + 1.0) * 0.5)
					   def fbm01(real r, int oc) real : ((fbm(r,oc) + 1.0) * 0.5)
					   def mulCompVec2(vec2 a, vec2 b) vec2 : vec2(doti(a) * doti(b), dotj(a) * dotj(b))
					   def mulCompVec3(vec3 a, vec3 b) vec3 : vec3(doti(a) * doti(b), dotj(a) * dotj(b), dotk(a) * dotk(b))
def eval() real: (Vec3ToReal(lerp(vec3(1.00000, 1.00000, 1.00000), vec3(0.00000, 0.00000, 0.00000), length(vec2(0.5,0.5) - getTexCoords(0)) * 2.0 )) * 1.00000 + 1.00000 * fbm(mulCompVec2(getTexCoords(0) * 10.0, vec2(0.60000, 0.60000)),8)) * 2.00000]]>
</shader>
                </shader>
            </blend>
        </blend>
    </material>

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

Re: ISL shader nodes

Post by fused » Sat Nov 28, 2009 11:10 pm

I just got the perlin and fbm shader code indigo uses from nik, so expect the shader previews and c4d internal renderings to be quite accurate :)

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

Re: ISL shader nodes

Post by fused » Sun Nov 29, 2009 9:15 pm

trying to add some turbulence to gradient shaders (because c4ds gradient shaders can do that).
doesnt quite look as in c4d but its a start :)

left 50% turbulence, right 25%
diffuse_transmitter_test.jpg
diffuse_transmitter_test.jpg (206.02 KiB) Viewed 2895 times
oh, and the shader:

Code: Select all

	<material>
		<name>diff_tran</name>
		
		<diffuse>
				
			<albedo>
<shader>
                    <shader>
                        <![CDATA[
def fbm01(vec2 v, int oc) real: (fbm(v,oc) + 1.0) * 0.5
def noise01(vec2 v) real: (noise(v) + 1.0) * 0.5
def eval(vec3 pos) vec3: lerp(vec3(0.75,0.0,0.0),vec3(0.0,0.75,0.0),doti(getTexCoords(0)) + (fbm(getTexCoords(0) * 5.0,8) * 0.5))

]]>
</shader>
                </shader>
			</albedo>
		</diffuse>
	</material>

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

Re: ISL shader nodes

Post by Zom-B » Mon Nov 30, 2009 3:28 am

Awesome work m8!!!!
polygonmanufaktur.de

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

Re: ISL shader nodes

Post by fused » Mon Nov 30, 2009 4:47 pm

shader previews are fairly accurate, c4d internal and indigo renderer:
c4d.jpg
c4d
c4d.jpg (43.48 KiB) Viewed 2833 times
indigo.jpg
indigo
indigo.jpg (163.17 KiB) Viewed 2831 times

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

Re: ISL shader nodes

Post by CTZn » Sun Nov 07, 2010 3:00 pm

Great stuff fused ! One more year and I'll be there I hope 8)

*cough* that was some dust by the way, I was just lurking for sumthin around and found this !
obsolete asset

Ilay
Posts: 43
Joined: Fri Mar 16, 2012 1:25 am
Location: Russia

Re: ISL shader nodes

Post by Ilay » Sun Mar 18, 2012 2:04 am

hello
i start to dive into tech.reference of isl.
But i look in section "Built-in functions – miscellaneous functions", at function posOS()
I have question if dynamic object hit surf, then initiate noise reproduction(like frost or cracks).
Is it possible in isl? Vector of intersection will be return by xpresso or python.
I will to try, it's only concept.

Ilay
Posts: 43
Joined: Fri Mar 16, 2012 1:25 am
Location: Russia

Re: ISL shader nodes

Post by Ilay » Thu Sep 13, 2012 4:27 am

Hello and me again.
Yves you posted new cindigo version with isl-fixes and new sdk.
Can we wrap it(ISL) into such shader structure http://code.vonc.fr/?a=13 or http://code.vonc.fr/c4d/python/examples ... y-Fresnel/ ?
Warp isl symbols in brackets(with inherited options) and unwrap when render-data init().
this experiment don't me let up

(sorry for my English)

Post Reply
25 posts

Who is online

Users browsing this forum: No registered users and 1 guest