Page 1 of 1

[ISL] I board failed to do polka dots

Posted: Tue Jun 14, 2016 11:26 am
by Jay-ko
Hello there,

I really would like to do something more "ISL-ist" with this material.
http://www.indigorenderer.com/materials/materials/1513

But this way of "think" at the contrary of that I know, and my poor knowledge in the ISL basics cause me a lot of waste of time and frustrations.

Because I understand that is simple example, and I feel like an idiot when I don't succed to re-do this simple exemple like I want, and this so easy to do that in bitmap with Substance or Photoshop...

Could you please help my to place me on the way to understand this example:
http://www.indigorenderer.com/materials/materials/154

Code: Select all

<shader>
                        <![CDATA[def dist(vec2 a, vec2 b) real : length(b - a)
def dist(vec3 a, vec3 b) real : length(b - a)

def eval() real :
  if(
    dist(
      vec2(
        fract(doti(getTexCoords(0)) * 10.0),
        fract(dotj(getTexCoords(0)) * 10.0)
      ),
      vec2(0.5, 0.5)
    ) > 0.25,
    0.0,
    1.0
  )]]>
</shader>
First at all, I wish try step by steps.
I can copy this blend map shader
and then copy/paste it in the bump with a larger size of the dots to obtain a fake "thickness effect".

How can I change the size of the dots?

Re: [ISL] I board failed to do polka dots

Posted: Tue Jun 14, 2016 2:12 pm
by CTZn
In the

Code: Select all

     dist(
      vec2(a),
      vec2(b)
    ) > 0.25
bit, it's the 0.25 that you want to tweak. It's the limit of the dot, from the distance from the center vec2(b) to the actual coordinates being sampled in UV space vec2(a).

Re: [ISL] I board failed to do polka dots

Posted: Fri Jun 17, 2016 10:40 am
by Jay-ko
OK thank you!

Next step, understand why I cannot use this piece of code directly in the bump channel, or why the "b" value seems have no effect.

Re: [ISL] I board failed to do polka dots

Posted: Fri Jun 17, 2016 5:44 pm
by Zom-B
Jay-ko wrote:Next step, understand why I cannot use this piece of code directly in the bump channel, or why the "b" value seems have no effect.
Your shader actually "overides" this b value, you need tweak the strength inside the shader, but I have no idea where -.-'
(I only know this from using ISL noise in bump etc.)

Re: [ISL] I board failed to do polka dots

Posted: Fri Jun 17, 2016 6:48 pm
by galinette
Also, in order for bump to work, you need a smooth transition between "high" values and "values". A brutal, vertical transition does not work well with bump, because bump is actually based on slope, not height.

Re: [ISL] I board failed to do polka dots

Posted: Sat Jun 18, 2016 6:10 am
by CTZn
Galinette is of course plain correct; this specificity of bump mapping has raised countless, pointless arguments on the effectiveness of bump mapping based on texture resolution.

Bump mapping is like a radar scan from above; a perfect cliff will be invisible, the terrain seemingly flat.