Jump to content

help with basic shaders - dirt, terracota etc.


mark

Recommended Posts

Hi all,

just need a bit of advice with shaders... im trying to use procedural textures as much as possible for this project.

ive made a wood which im happy with, but a bit stuck with some others.

dirt: i used 2 params for colour, with a mix, using a splatter to get the effect, from the training videos. i cant seem to get the noise small enough though - from a distance it looks good but close up it looks wrong - i dont want to but may need to use different shaders for closeups? can anyone suggest a better way?

terracota: trying to shade a flower-pot ... had best luck with the concrete material shader since the random dirt looks good, again though I cant get the detail small enough. close up makes the pot look like it has big lumps, rather than very small ones.

any bump map: i tried making a displacement shader (with and without bumpnoise VOP), anything i do results in the shader preview sphere disappearing, same to objects if i apply the shader. i assume the displace setting is so high that the object moves but i cant seem to adjust it. also i cant seem to be able to make a displacement map from my own VOP... i.e. use the same colour channel for displace also.. just to get a quick, good enough result.

sorry this post is a bit of a ramble.. i sorta get shading in houdini but not quite.. any advice on how to make these basic shaders would be much appreciated - being able to add something like the generic "3dsmax noise shader" to both diffuse and bump channels would be a most helpful start :)

thanks for reading, i will hopefully have some sample pics to show soon :D

edit: also i noticed objects need texture coordinates, even for procedural textures? that seems strange - is this correct or am i doing something wrong...

Link to comment
Share on other sites

Hmmm....

- Try diving into the concrete vop and see if you can adapt it to suit your needs.

- I had always thought that the concept of a "bumpmap" involved you preturbing normals instead of actually displacing geometry to cheaply introduce high frequency noise. So shouldn't that be in a surface shader?

....

Ok, I loaded up Houdini and note the paragraph in the help of the Bump Map VOP (click on the node in the network editor and then click on the question mark icon in the parameters pane):

Typically, this operator will be used in a displacement shader, with both displacement outputs piped into the corresponding inputs of the Output operator. Alternatively, it can appear in a surface shader, in which case the displaced normal would be normalized and then connected to the "nN" input of the Lighting Model operator. The "color" output would go into the diffuse (diff) input of the same operator.

I tried both of these methods in surface and displacement shaders. The previews both times look right to me....

Link to comment
Share on other sites

thanks stemik i did actually see that but didnt take much notice, i thought it was for writing vex code :unsure: that will clear a few things up

edward, i was wrongly thinking that an object could/should have a surface AND displacement shader... bumpmap within the surface shader looks exactly what i need, like you say a cheap way to get noise.

man i feel dumb, but another good session at this and i should be on top of it, thanks !

Link to comment
Share on other sites

Hi Mark,

All procedural shaders need some kind of coordinates, just a lot of the time they are P, the xyz position of the point being shaded. Some procedural patterns look best along a plane of that procedural texture, and that when it's good to supply them with texture coordinates aligned to each individual face; i.e. standard UV texture coordinates. Think of UV's as being small cross-sections of the procedural texture per face of the geometry.

Anyhow, sometimes you can get adequate results just by copying P into uv, and then it'll act how you expect. Some shaders will detect if uv's are present and if they are, use them or else use P. Remember too that P is NOT initially in the space you expect; it's in "world space"- a very misleading term for camera space. You have to convert to object space first to get textures that will be fixed to your surface. Use the function wo_space(P) to do it.

Another reason why many procedural shaders fail is because the object may be deforming and then the model will swim through the texture space. UV coordinates are preserved during deformation, meaning that the texture space references remain the same and so the texture sticks to the surface. Some procedural shaders are written to detect a rest position attribute too; and in these cases use a Rest SOP to create a reference pose for your object.

Hope this helps some,

J

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...