Making shadow follow the shape of "Alpha" texture?


(Anton42) #1

Sorry if this is already answered somewhere, I couldn’t find anything helpul by "Search"ing.

Say, to make a grass blade, I create a polygon, then draw a “shape” b&w texture, and apply it as Alpha modifier. The blade is then shown as needed. I add a spot light, shadows on, and the shadow is the shape of polygon (square), not the “real” rendered shape of the grass blade.

I hope this is possible.


(S68) #2

Not that easy, you should place that texture on the spot also, make it cast a light which already has that ‘shadow mask’ make it layer only and place it on the same layer where the shadow of the grass is to be cast.

Stefano


(Anton42) #3

Hmm… so if I created 50+ blades of grass like that, it becomes virtually impossible, right?

Right. Then I guess I need to make my polygon as close as possible in shape to the shape of the object, so that the shadows at least look believable :slight_smile:

Thanks!


(S68) #4

By the way…

RipSting released ‘Fiber’ A grass/hair/whatever generator script… why don’t you use it?

Stefano


(vetzeen) #5

Do you by chance have some links for it? Or some sample pics even? Im curious.


(kos) #6

it is virtually impossible without a raytracer.the shadow-map rendering algorithms do not take account how the texture is mapped to the object.it only calculates the geomatry of the object.so until you render your scene in a raytracer you won’t get those realistic shadows of the grass and have to use some sily tricks like s68 said.


(Schlops) #7

Do a search in the python&plugins-forum for “Fiber” by author ripsting.


(Anton42) #8

Thanks, Stefano, I will try to find and test this “grass” script.

I was asking more “in principle” though, and the blade of grass was an example I could come up with. Thanks for your answer, it helps me not to look further and to look for a workaround :slight_smile:

Will there be a raytracer in Blender in future releazes, do you know?