Bump map size

General discussion about Indigo Materials - material requests, material developement, feedback, etc..
Post Reply
9 posts • Page 1 of 1
User avatar
aleksandera
Posts: 380
Joined: Fri Sep 15, 2006 10:49 pm
Location: Slovenia

Bump map size

Post by aleksandera » Wed Jan 18, 2012 11:18 pm

I like this material, but the size of the scratches is a litle too big
on my objects:
http://www.indigorenderer.com/materials/materials/340

How do i edit this??

Thank you in advance for any answers.

User avatar
zeitmeister
2nd Place 100
Posts: 2010
Joined: Tue Apr 22, 2008 4:11 am
Location: Limburg/Lahn, Germany
Contact:

Bump map size

Post by zeitmeister » Wed Jan 18, 2012 11:51 pm

You could change the mapping/tiling options in your host 3D application or relplace it with a new bumpmap.
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

User avatar
aleksandera
Posts: 380
Joined: Fri Sep 15, 2006 10:49 pm
Location: Slovenia

Re: Bump map size

Post by aleksandera » Thu Jan 19, 2012 12:08 am

Can't It's a procedural map. :(

User avatar
zeitmeister
2nd Place 100
Posts: 2010
Joined: Tue Apr 22, 2008 4:11 am
Location: Limburg/Lahn, Germany
Contact:

Re: Bump map size

Post by zeitmeister » Thu Jan 19, 2012 2:51 am

Sorry, didn't read it to the end.

I changed the vec.2 multiplier ("7") in the very second line:

Code: Select all

def scratchcoords( vec2 pos ) vec2 :
	vec2(  7. * ( doti ( pos  )  + noise(pos*0.1)) , 200. * ( dotj ( pos  ) + noise( pos*0.2) ) )
to f.e.:

Code: Select all

def scratchcoords( vec2 pos ) vec2 :
	vec2(  30. * ( doti ( pos  )  + noise(pos*0.1)) , 200. * ( dotj ( pos  ) + noise( pos*0.2) ) )
scratched-metal_smaller_scratches.jpg
If you set higher values here, the scratches gonna be smaller.
Hope it helps!
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

User avatar
aleksandera
Posts: 380
Joined: Fri Sep 15, 2006 10:49 pm
Location: Slovenia

Re: Bump map size

Post by aleksandera » Thu Jan 19, 2012 3:40 am

Thank you! :D

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

Re: Bump map size

Post by CTZn » Thu Jan 19, 2012 5:03 am

By doing so you are changing one dimension of the scratches, it's not an homogeneous change zeitmeister :)

That said scaling the UVs from within the host application should work too, being procedural this shader does use actual UVs. In this regard it is best to multiply them at their source in the shader, wich is getTexCoords(0). The multiplier can be greater or smaller than 1.0 but it must be a float (dot something), integers will cause an error.

Once you have multiplied the input UVs like so, the depth must be changed proportionally. Divide the depth by the new multiplier and you should be done.

Code: Select all

(0.0005 / mult) * etc
where mult is the float you choosed as multiplier for getTexCoords(0).

This way the shader will effectively be scaled proportionally.
obsolete asset

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

Re: Bump map size

Post by galinette » Thu Jan 19, 2012 6:26 am

Hello all,

In fact both approaches are correct... But produce different results

CTZn approach, UV scaling, will change the overall scaling of the texture over the material, in a classical way. Do not forget to change the overall bump (height) factor : shrinking UV at constant bump height will make the scratches profiles too steep.

Zeitmaster's is proposing a more subtle change. The scratch centers are not changed, but they are shortened. Changing the "200" would have changed the scratch width.

I will try to convert this to a parametric shader as soon as I have time, since it is possible now

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
zeitmeister
2nd Place 100
Posts: 2010
Joined: Tue Apr 22, 2008 4:11 am
Location: Limburg/Lahn, Germany
Contact:

Bump map size

Post by zeitmeister » Thu Jan 19, 2012 10:23 am

Thank you all for pointing this out!!!
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

User avatar
Headroom
Indigo 100
Posts: 1058
Joined: Wed Aug 08, 2007 1:07 pm
Location: Spartanburg, SC, USA
Contact:

Re: Bump map size

Post by Headroom » Thu Jan 19, 2012 2:52 pm

Some helpful comments in the shader code would help a lot along the way.
Specifically for those that are not living Indigo on a daily basis or have the time to get intimate with ISL.

I am assuming that that is supported ;-)

Post Reply
9 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 20 guests