ISL questions...
- zeitmeister
- Posts: 2010
- Joined: Tue Apr 22, 2008 4:11 am
- Location: Limburg/Lahn, Germany
- Contact:
ISL questions...
Hi, I wondered how I implement a simple 3d noise shader without UV coordinates plus parameter sliders for scale? Which works in the bump or normal channel?
I can't find anything or any simple example.
Thank you in advance!
I can't find anything or any simple example.
Thank you in advance!
Cheers, David
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
Re: ISL questions...
Use posOS() in place of tex() for 3D placement. pos can be used if the definition has that vec3 declared (NOT bump for instance).
So,
1. create a new (float) param Name
2. add a noise (bump example below):
In ISL, a slider is identified by appending the prefix param and the suffix () to its name.
So,
1. create a new (float) param Name
2. add a noise (bump example below):
Code: Select all
fbm(posOS() * paramName(), 8) * 0.01
obsolete asset
Re: ISL questions...
A good practice for bump shaders is to divide the bump depth by the frequency (Name here) in order to maintain the same proportional height relatively to details frequencies.
When present in the definition signature - def eval(vec3 pos) real: - pos will provide the world space position of the point being sampled. PosOS() in turn will use the object space, so shaders will orient with the objects.
Sometimes however 3D shaders may look bad near the center of the space (kind of a fractal visual doppler effect). When using posOS() (object space) there is the option to move the geometries pivot point away in order to elude that centric artefact. Otherwise, 3d coordinates can be decomposed to shift the center by code:
(valid though untested exponent code)
Here I hacked pos into a shifted coordinates system (base unit is meter of course). Hope this gets you started zeitmeister, ask for more if needed.
edit: Note that I'm not creating the variable pos, I'm copying its data; it was granted from scratch with the definition (def eval etc).
tip: you can not divide coordinates outright; you can however multiply them by the reciprocal of the value:
pos2 = pos * recip(12345.6789)
this is how you divide coordinates using Winter(?) as of now.
Code: Select all
fbm(posOS() * paramName(), 8) * 0.01 / paramName()
Sometimes however 3D shaders may look bad near the center of the space (kind of a fractal visual doppler effect). When using posOS() (object space) there is the option to move the geometries pivot point away in order to elude that centric artefact. Otherwise, 3d coordinates can be decomposed to shift the center by code:
(valid though untested exponent code)
Code: Select all
def eval(vec3 pos) real:
let
pos = vec3(
pos.x + 10.0,
pos.y + 20.0,
pos.z + 5.0
)
in
fbm(pos, 8) * 60.0 + 3.0
edit: Note that I'm not creating the variable pos, I'm copying its data; it was granted from scratch with the definition (def eval etc).
tip: you can not divide coordinates outright; you can however multiply them by the reciprocal of the value:
pos2 = pos * recip(12345.6789)
this is how you divide coordinates using Winter(?) as of now.
Last edited by CTZn on Tue Dec 08, 2015 1:41 am, edited 2 times in total.
obsolete asset
- zeitmeister
- Posts: 2010
- Joined: Tue Apr 22, 2008 4:11 am
- Location: Limburg/Lahn, Germany
- Contact:
Re: ISL questions...
Thank you! But how can I get another noise type, like simple NOISE, voroni or perlin?
If I simple replace "fbm" by "noise", I get an error. I don't get it.
If I simple replace "fbm" by "noise", I get an error. I don't get it.
Last edited by zeitmeister on Tue Dec 08, 2015 1:51 am, edited 1 time in total.
Cheers, David
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
Re: ISL questions...
Noise don't have octaves, remove the coma and integer when switching the code from fbm. Noise is equivalent to a fbm with an octave of 1.
Seek ISL_stdlib text file in indigo application folder (windows), make a backup (you don't want to modify it or your materials may work locally only. At best.). Down the file you can learn about some more noise functions.
Seek ISL_stdlib text file in indigo application folder (windows), make a backup (you don't want to modify it or your materials may work locally only. At best.). Down the file you can learn about some more noise functions.
obsolete asset
Re: ISL questions...
Then there's the infamous multifractal(1, pos, 0.0, 2.0, 2.0, 0.0) (off the top of my head) with the integer coming first defining the noise type, ranging 0-2. It's pretty advanced, tricky to tame really.
Noise type 2 is a 3d projection of a 2d voronoi...
I'm done for now, will check in back later tonight.
Noise type 2 is a 3d projection of a 2d voronoi...
I'm done for now, will check in back later tonight.
obsolete asset
Re: ISL questions...
Here you go zeitmeister: http://www.indigorenderer.com/materials/materials/1422
- zeitmeister
- Posts: 2010
- Joined: Tue Apr 22, 2008 4:11 am
- Location: Limburg/Lahn, Germany
- Contact:
Re: ISL questions...
Came a bit further, but I don't manage to transfer it to a voroni in the normal channel.
Sorry, but I really don't get it...
Sorry, but I really don't get it...
Cheers, David
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
Re: ISL questions...
Ok will write a normal map shader.
Re: ISL questions...
Voronoi in normal map channel is tricky. Can't you just use it in bump channel?
Actually I noticed that voronoi basis is only using 2d voronoi noise in fbm(), it should be using 3d voronoi noise. Will fix.
Actually I noticed that voronoi basis is only using 2d voronoi noise in fbm(), it should be using 3d voronoi noise. Will fix.
- zeitmeister
- Posts: 2010
- Joined: Tue Apr 22, 2008 4:11 am
- Location: Limburg/Lahn, Germany
- Contact:
Re: ISL questions...
Actually I want to try to do a carpaint flake shader, based on a non-UV noise.
I had a look at the speckled carpaint shader, and I am not very satisfied with the look of the flake layer.
I think this example is a slightly more sophisticated approach to a realistic look of the flakes.
I think it's definately possible with ISL; plus giving each "flake" a "rotation" with some kind of unique 3-color-gradient.
What dou you think?
Some examples of flakes:
http://www.fish-junkie.com/images/color ... Circle.jpg
http://distinctivdetailing.com/wp-conte ... -after.jpg
http://3.bp.blogspot.com/-WjyyHsw_oeE/V ... auty14.png
I had a look at the speckled carpaint shader, and I am not very satisfied with the look of the flake layer.
I think this example is a slightly more sophisticated approach to a realistic look of the flakes.
I think it's definately possible with ISL; plus giving each "flake" a "rotation" with some kind of unique 3-color-gradient.
What dou you think?
Some examples of flakes:
http://www.fish-junkie.com/images/color ... Circle.jpg
http://distinctivdetailing.com/wp-conte ... -after.jpg
http://3.bp.blogspot.com/-WjyyHsw_oeE/V ... auty14.png
Cheers, David
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
- zeitmeister
- Posts: 2010
- Joined: Tue Apr 22, 2008 4:11 am
- Location: Limburg/Lahn, Germany
- Contact:
Re: ISL questions...
... and this is the carpaint material from Autodesk VRED:
Indigo can do that better!!!
Very easy to setup and nice flakes. Voroni-based.Indigo can do that better!!!
Cheers, David
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
DAVIDGUDELIUS // 3D.PORTFOLIO
·
Indigo 4.4.15 | Indigo for C4D 4.4.13.1 | C4D R23 | Mac OS X 10.13.6 | Windows 10 Professional x64
Re: ISL questions...
The car paint I made ( http://www.indigorenderer.com/materials/materials/1322 ) uses randomly oriented facets in a grid pattern, I guess voronoi would be better.
Who is online
Users browsing this forum: No registered users and 26 guests