[Closed] "Real" BumpMap generator based on geometry
This problem may already have a solution, but I am thinking out loud here!
I need to create a greyscale image for a bump map based on geometry height along the viewing axis.
I could of course light the object and render it, but I want to avoid light direction and anomalies caused by complicated shape etc.
Very basically, something like this:
Look at the <selected> geometry.
the lowest z Position = Black
the highest z Position = white
create greyscale image based on this.
Does this sound plausable?
Geri
If im not making a mistake, zbuffer is doing this, also there is a sample script for zbuffer in maxscript Ref.
maybe…
I did have another idea (not using a script):
Apply a material with a black to white gradient in the diffuse to the object using the viewport showing the “top” of the object.
Render this.
The white is at the front, and black at the back…
Looks like it works.
OK, if u dont want a script, y ur asking it here? also u can use G-Buffer(s) to get the result flat B/W result, the good thing about GB is that you can have multiple layers of ur objs & there are so many ways to do this with maxscript.
I have done this, and it works fine. Only problem is in making sure the black end of the gradient doesn’t bleed over into the white bits, which means making sure gradient is slightly longer than the object. Also helps to turn off dithering in the renderer, since otherwise it tends to add noise to the map.
Initially, I did want a script – But I posted after I found a simple solution so no one wasted their time thinking about it. (Maybe Mod could move this?)
Sounds like buffer is way to go …would be good to do something if time allows.
Cheers for the advice