Page 1 of 1
simple gradient shader
Posted: Fri Jun 17, 2016 2:19 pm
by arc en ciel
here is my first ISL code : simple gradient shader

some images and a pigs file for play with it
yellow to white on bootle, bottom to top
horizontal and vertical gradient (change x for y or z in x(posOS()) for gradient orientation)
à bientôt !
happy renderings
Re: simple gradient shader
Posted: Sat Jun 18, 2016 5:47 am
by contegufo
Hi
And 'noticeable when a user writes the lines of code in a shader. Unfortunately the reference to C4D and Photoshop for multiple shades is embarrassing.
Re: simple gradient shader
Posted: Sat Jun 18, 2016 7:23 am
by Oscar J
Not sure your sentence makes a lot of sense contegufo. A user can choose whether he/she wants to use ISL or not. There's nothing embarrassing with ISL - quite the opposite, Indigo's ISL is a powerful tool that can do things many other renderers can't.
Re: simple gradient shader
Posted: Sun Jun 19, 2016 1:40 pm
by arc en ciel
yo,
@contegufo :

what do you mean by reference to multiple shades is embarassing ? are you talking about precision of colors ? precision of position on the mesh ?
have a look to old threads about ISL, that's really interesting, and some materials are incredible, some guys right there are crazy's heavy's math's codemonkey, and ISL is dealing directly with Indigo's heart so it's really powerful.
smoothPulse + smoothPulse = tablecloth
Code: Select all
lerp(
paramcol1(),
paramcol2(),
smoothPulse(paramlissage_1()/paramFormat(),
paramlissage_2()/paramFormat(),
paramlissage_1()/paramlissage_2(),
paramlissage_1()/paramlissage_2(),
(sin(x(posOS())/paramFormat()))*paramlongueur())
+
smoothPulse(paramlissage_1()/paramFormat(),
paramlissage_2()/paramFormat(),
paramlissage_1()/paramlissage_2(),
paramlissage_1()/paramlissage_2(),
(sin(y(posOS())/paramFormat()))*paramlongueur())
+
smoothPulse(paramlissage_1()/paramFormat(),
paramlissage_2()/paramFormat(),
paramlissage_1()/paramlissage_2(),
paramlissage_1()/paramlissage_2(),
(sin(z(posOS())/paramFormat()))*paramlongueur())
)
2 opaques bottles have only one smoothPulse on Z
is it possible in ISL to have something like case function ?
thx