Page 1 of 1

[ISL Help] Concentric circles

Posted: Thu Jan 19, 2017 4:04 am
by OriginalplanĀ®
Hey guys & girls.
What is the simplest *easiest way to create concentric circles via ISL on mat surface...dozens of them??

Thank you!
:oops: :oops:

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 2:14 am
by lycium
I was getting a little rusty in ISL, so it was good to brush up again :) Even found a crashbug in the shader editor along the way!

Without further ado, your material, sir: http://www.indigorenderer.com/materials/materials/1656

Image

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 2:26 am
by OriginalplanĀ®
@lycium THANK YOU!

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 2:30 am
by lycium
No problem, and thanks Yves/fused for helping me out :)

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 2:34 am
by pixie
Do you want anisotropy? Because that's how'll get anisotropy! :P

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 2:38 am
by lycium
Yeah it works off the UV map, so I guess it won't be circles unless the UV map is perfect / undistorted. It's possible to modify it to use the worldspace position or angles or something like that to get around this, but then your object also has to be perfectly aligned.

In any case, let me know if you need any changes.

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 2:49 am
by pixie
lycium wrote:Yeah it works off the UV map, so I guess it won't be circles unless the UV map is perfect / undistorted. It's possible to modify it to use the worldspace position or angles or something like that to get around this, but then your object also has to be perfectly aligned.

In any case, let me know if you need any changes.
I cannot get the shader to work on the bump channel, it goes haywire!

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 3:13 am
by lycium
Hmm, I'm not sure exactly what effect you're looking for now. As it is the shader is not really suited to bump mapping, because of that instantaneous change in colour / height; furthermore, the bump map shader expects a single value (real / scalar) and not a colour / vec3.

Try messing with this code in the bump shader:

Code: Select all

def eval() real :
	let
		c = getTexCoords(0)
	in
		#1 - pow(sin(length(c) * 64) * 0.5 + 0.5, 117)
		1 - pow(sin(length(c) * 14), 117)
You can tune the numbers as before in the shader editor, and you can try the other commented line to see if it's maybe more like what you want (put the # before the 2nd line and remove it in the first line after the "in").

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 3:36 am
by pixie
lycium wrote:Hmm, I'm not sure exactly what effect you're looking for now. As it is the shader is not really suited to bump mapping, because of that instantaneous change in colour / height; furthermore, the bump map shader expects a single value (real / scalar) and not a colour / vec3.

Try messing with this code in the bump shader:

Code: Select all

def eval() real :
	let
		c = getTexCoords(0)
	in
		#1 - pow(sin(length(c) * 64) * 0.5 + 0.5, 117)
		1 - pow(sin(length(c) * 14), 117)
You can tune the numbers as before in the shader editor, and you can try the other commented line to see if it's maybe more like what you want (put the # before the 2nd line and remove it in the first line after the "in").
:D Sadly it doesn't work on GPU

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 4:09 am
by lycium
Yeah I noticed that the bump shaders aren't working on GPU at the moment. Pending investigation :)

Re: [ISL Help] Concentric circles

Posted: Fri Jan 20, 2017 4:25 am
by OriginalplanĀ®
lycium wrote:No problem, and thanks Yves/fused for helping me out :)
8) !
lycium wrote:Pending investigation :)
: ))))))

Re: [ISL Help] Concentric circles

Posted: Sun Mar 17, 2019 1:04 am
by pixie
It is working now on GPU :)