ISL Questions

General discussion about Indigo Materials - material requests, material developement, feedback, etc..
Post Reply
12 posts • Page 1 of 1
User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

ISL Questions

Post by CTZn » Sun Jul 03, 2011 6:05 am

How do I use pos for bump mapping ?

Can't do eval(vec3 pos) real.
obsolete asset

User avatar
OnoSendai
Developer
Posts: 6180
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: ISL Questions

Post by OnoSendai » Sun Jul 03, 2011 8:49 pm

Hi CTZn,
I'll add a posWS() function soon that will return the world space position when available.

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

Re: ISL Questions

Post by CTZn » Mon Jul 04, 2011 2:20 am

You seem to imply that I could use posOS() already, wich makes sense for wooden objects. I'll have to try this, thanks !
obsolete asset

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

Re: ISL Questions

Post by CTZn » Mon Jul 04, 2011 12:42 pm

CTZn wrote:You seem to imply [...]
Ah no you didn't :)
obsolete asset

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

Re: ISL Questions

Post by CTZn » Fri Jul 08, 2011 6:30 am

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.
obsolete asset

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

Re: ISL Questions

Post by CTZn » Fri Jul 08, 2011 7:22 am

Practically I'd need a fbm within the 0:1 range to apply curves on it.
obsolete asset

User avatar
OnoSendai
Developer
Posts: 6180
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: ISL Questions

Post by OnoSendai » Fri Jul 08, 2011 11:14 am

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 :)

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

Re: ISL Questions

Post by CTZn » Fri Jul 08, 2011 2:06 pm

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 !
obsolete asset

User avatar
Borgleader
Posts: 2149
Joined: Mon Jun 16, 2008 10:48 am

Re: ISL Questions

Post by Borgleader » Thu Jul 28, 2011 2:53 pm

If I may add a question to this thread, is it possible to emulate normal map functionnality through ISL?
benn hired a mercenary to kill my sig...

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

Re: ISL Questions

Post by CTZn » Thu Jul 28, 2011 3:18 pm

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 :D
obsolete asset

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: ISL Questions

Post by galinette » Thu Jul 28, 2011 10:15 pm

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
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
Borgleader
Posts: 2149
Joined: Mon Jun 16, 2008 10:48 am

Re: ISL Questions

Post by Borgleader » Thu Jul 28, 2011 11:10 pm

Thanks I'll try that :)
benn hired a mercenary to kill my sig...

Post Reply
12 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest