Page 1 of 1
ISL Questions
Posted: Sun Jul 03, 2011 6:05 am
by CTZn
How do I use pos for bump mapping ?
Can't do eval(vec3 pos) real.
Re: ISL Questions
Posted: Sun Jul 03, 2011 8:49 pm
by OnoSendai
Hi CTZn,
I'll add a posWS() function soon that will return the world space position when available.
Re: ISL Questions
Posted: Mon Jul 04, 2011 2:20 am
by CTZn
You seem to imply that I could use posOS() already, wich makes sense for wooden objects. I'll have to try this, thanks !
Re: ISL Questions
Posted: Mon Jul 04, 2011 12:42 pm
by CTZn
CTZn wrote:You seem to imply [...]
Ah no you didn't

Re: ISL Questions
Posted: Fri Jul 08, 2011 6:30 am
by CTZn
Is it possible to compute the maximum range returned by a fbm ? At iteration 1 it is ~ [-0.83 : 0.83], at it8 absolute is above 1.1. It's not easy to get everything into the 0:1 range since min and max are variant, depending (mostly) on the iterations. I guess I need to know a (simplified) ratio that adds to intensity with iterations.
Could I also have a working example for the print statement ? I thought I would print the fbm values as they go evaluated but couldn't figure it out. Thanks.
Re: ISL Questions
Posted: Fri Jul 08, 2011 7:22 am
by CTZn
Practically I'd need a fbm within the 0:1 range to apply curves on it.
Re: ISL Questions
Posted: Fri Jul 08, 2011 11:14 am
by OnoSendai
Hi CTZn,
Base Perlin noise returns values in the range [-1, 1].
FBM with one octave is just perlin noise.
FBM with infinite octaves should lie in the range [-2, 2], but most values will be near the zero than near the extreme values I guess.
Printing should work, the only problem is that it prints to stdout. Try running the console indigo

Re: ISL Questions
Posted: Fri Jul 08, 2011 2:06 pm
by CTZn
The problem with extreme values is when they produce clipping, my concern is vertical
I'll play more with the normalise functions eventually, maybe that's just what I want.
Thank you for the tip Sir !
Re: ISL Questions
Posted: Thu Jul 28, 2011 2:53 pm
by Borgleader
If I may add a question to this thread, is it possible to emulate normal map functionnality through ISL?
Re: ISL Questions
Posted: Thu Jul 28, 2011 3:18 pm
by CTZn
Perhaps someone like galinette could make use of a normal map data while dealing with bump mapping, but otherwise I think emulation would require the writing of certain parameters that are not exposed in Indigo despite a request (would allow NPR shading).
I am not sure on that topic though, I may be mixing facts... for the matter I am bumping your question

Re: ISL Questions
Posted: Thu Jul 28, 2011 10:15 pm
by galinette
It is mathematically possible do derivate the normal map from a height map, by calculating the gradient vector of the height map. That's actually what renderers do.
However, it's not possible to compute a height map from a normal map
in general : arbitrary normal map has a non-zero rotational vector, which means it cannot be derivated from a height map by a gradient.
If the normal map has a uniform zero rotational vector, it's theoretically possible to compute a height map, but this require numerical integration which would be a non-local calculation... not possible in a simple shading language, and always computationally intensive.
If your normal map is a texture (not a shader), there are maybe tools that could compute a height map from it (provided the fact that they will need to remove the rotational component of it if non-zero, thus modifying the appearance of the material)
Try this :
http://www.crazybump.com/
Etienne
Re: ISL Questions
Posted: Thu Jul 28, 2011 11:10 pm
by Borgleader
Thanks I'll try that
