Download Trial Buy now

Search  | Login  | Register

Post new topic Reply to topic  [ 9 posts ] 
Offline
User avatar
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.


 Profile  
 
Offline
User avatar
2nd Place 100
You could change the mapping/tiling options in your host 3D application or relplace it with a new bumpmap.

_________________
Cheers, David



ZENTAPHER // 3D.PORTFOLIO
·
Indigo 3.8.6 | Indigo for C4D 3.8.6 | C4D R14.042 | Mac OS X 10.9 | Windows 7 Professional x64


 Profile  
 
Offline
User avatar
Can't It's a procedural map. :(


 Profile  
 
Offline
User avatar
2nd Place 100
Sorry, didn't read it to the end.

I changed the vec.2 multiplier ("7") in the very second line:
Code:
def scratchcoords( vec2 pos ) vec2 :
   vec2(  7. * ( doti ( pos  )  + noise(pos*0.1)) , 200. * ( dotj ( pos  ) + noise( pos*0.2) ) )

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


Attachment:
scratched-metal_smaller_scratches.jpg
scratched-metal_smaller_scratches.jpg [ 48.02 KiB | Viewed 1181 times ]


If you set higher values here, the scratches gonna be smaller.
Hope it helps!

_________________
Cheers, David



ZENTAPHER // 3D.PORTFOLIO
·
Indigo 3.8.6 | Indigo for C4D 3.8.6 | C4D R14.042 | Mac OS X 10.9 | Windows 7 Professional x64


 Profile  
 
Offline
User avatar
Thank you! :D


 Profile  
 
Offline
User avatar
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:
(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.

_________________
back home. still no ISP.


 Profile  
 
Offline
User avatar
1st Place Winner
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


 Profile  
 
Offline
User avatar
2nd Place 100
Thank you all for pointing this out!!!

_________________
Cheers, David



ZENTAPHER // 3D.PORTFOLIO
·
Indigo 3.8.6 | Indigo for C4D 3.8.6 | C4D R14.042 | Mac OS X 10.9 | Windows 7 Professional x64


 Profile  
 
Offline
User avatar
Indigo 100
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 ;-)


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group