Page MenuHome

Normal Map Node: Re-implement old behavior as View Space option
AbandonedPublic

Authored by Ryan (shiprex) on Jun 28 2016, 9:17 PM.

Details

Summary

6bfd88ac first changed the way that the GL viewport rendered the normal map to more accurately reflect object / world space rather than the current view.

There was a use case for this behavior, being able to apply a generic .jpg image as a matcap with input in viewspace.

this patch re-implements the view space behavior as another option to the normal map node. Tested release build on Win 7, MSVC 2015; below is screencap of the matcap material working again.

Here's a .blend file to test (anything after 6bfd88ac -> changing to any other space option makes it static):

This is my first C patch, so if there are any other places where changes are needed, advice is welcome :)

Diff Detail

Event Timeline

Ryan (shiprex) retitled this revision from to Normal Map Node: Re-implement old behavior as View Space option.
Ryan (shiprex) updated this object.
Ryan (shiprex) added a subscriber: Ryan (shiprex).

Should be noted that this was mostly to scratch an itch when using sculpt mode / material shading- it doesn't work in rendered mode. Don't know how to do that though.

I don't think that this is correct to use Normal Map node for matcap.
Try the attached file.


[EDIT] updated blend (Vector transform from "World space")

Thanks a.romanov, that works as well, hadn't thought to use a vector transform node.

Live and learn, now I know a little something about the codebase at least X-)

Ryan (shiprex) abandoned this revision.Jun 30 2016, 7:17 PM