Page MenuHome

Cycles - Per BSDF Bump Mapping
Closed, ResolvedPublicPATCH

Description

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,

Event Timeline

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.

Attached patch PerBSDF_BumpMapping_0.91.diff which removes DNA structs and only keeps RNA declaration in rna_nodetree_types.h

Hi,
Thanks for patch. Do you know when this patch appears in trunk?
Best Regards

When it is reviewed and approved.

Any chance on getting an updated patch while we wait for this to be approved?

Attached PerBSDF_BumpMapping_0.92.diff which applies fine to svn 50252

Patch committed with some minor modifications, thanks!

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Resolved.Oct 10 2012, 5:49 PM