PDA

View Full Version : Material with textured shadow?


Mic_Ma
06-04-2006, 07:03 PM
I want to make a material where the shadows (on the object) are textured.

So, I have 2 textures A and B. These textures are blended between lighter parts of the object (shows texture A) and the darker parts (show texture B).

I tried putting an incidence shader in the Diffuse Colour, but not very successfully.

Any ideas?

Atyss
06-05-2006, 02:01 AM
Before I give out potentially useless advice, can you clarify this for me: by "shadow" area, do you mean:
a) the area on a surface that receives shadows casted by other objects
b) the shadow casted by the object
c) area on the surface that does not receive light (or less light)

I'm asking because these each require quite different approach.


Thanks
Bernard

Mic_Ma
06-05-2006, 09:57 AM
Hi Bernard


a) the area on a surface that receives shadows casted by other objects
b) the shadow casted by the object
c) area on the surface that does not receive light (or less light)


"c" is the case.

Atyss
06-05-2006, 02:43 PM
Then what you are referring to is not shadowed area, it's called "ambient color".

So the incidence shader was not a bad idea, but personally I'd rather with a Simple Lambert, unless you want to link the illumination with a single light (or a set of lights).

So plug that simple lambert into the weight input of a mix2colors. Then plug each texture you want to see in the base_color and color1 of that mix2colors shader.



Cheers
Bernard

Mic_Ma
06-05-2006, 04:29 PM
Hmm...I see...you mean like this?

Basically I want some crosshatching on top of the base texture in the darker ambient color. There is a problem with the white parts showing on the texture, so I tried "multiply" but that doesnt seem to work.

I suppose I could make 2 versions of the base texture, one with and one without hatching, and then simply mix-blend them...

Atyss
06-05-2006, 05:38 PM
Okay what I have proposed was meant to have two different branches in diffuse and ambient colors.

Invert the simple_lambert color (with an invert node), set the mix mode to alpha, check Multiply weight by alpha. Finally, in your texture, make sure the RGB channels are of a plain color, and the alpha channel has the line pattern. You may have to invert the alpha channel in Photoshop.


Cheers
Bernard

Mic_Ma
06-05-2006, 09:41 PM
Oh that's great. Thanks Bernard. I modified it a little and plugged the whole thing into the diffuse of a Phong and now it does exactly what I want!

CGTalk Moderation
06-05-2006, 09:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.