Dear Blender developers, I want to offer you per BSDF bump mapping capability for Cycles, this feature is often very welcome when we create coated materials like car paints/ metal flakes, organic materials, diffuse bump and glossy coated with bump scratches and many other possibilities.
This also sent the ground for normal mapping support.
The patch is quite simple and modifies some small things from the previous behavior:
- BumpNode got some extra inputs and a normal output. It also has been exposed in the UI for the user (vector sub menu).
- BumpNode no longer modify directly the ShaderData::N, instead a new internal SetNormalNode has been created for this propose.
- BSDF sampling functions uses the new ShaderClosure::N to sample.
- Bump mapping from displacement socket is performed first, then each extra BumpNode added for users will do bump on top of it.
- Mode details commented in the code.
Should i upload this in codereview tool? Is there anything I can do to make easier the review task for you?
Image:
http://www.pasteall.org/pic/show.php?id=32728
Thanks
Agus,
Description
Description
Event Timeline
Comment Actions
Hi,
thanks for the patch. One thing that is obsolete in your patch is the declaration of intensity and bump in DNA / RNA. Sockets don't need to be exposed.
Comment Actions
Attached patch PerBSDF_BumpMapping_0.91.diff which removes DNA structs and only keeps RNA declaration in rna_nodetree_types.h