[Bf-codereview] Normal Node for Cycles (issue 5440091)
Daniel Salazar - 3Developer.com
zanqdo at gmail.com
Sun Dec 4 21:08:42 CET 2011
go dalai go!
just saying :D
Daniel Salazar
3Developer.com
On Sun, Dec 4, 2011 at 3:01 AM, <dfelinto at gmail.com> wrote:
> Reviewers: bf-codereview_blender.org, brechtvl,
>
> Description:
> Hi Brecht,
>
> I wanted to tackle a more complicated node and gave Normal Node a try.
> (and failed *cough* ;)
>
> I created a new NodeNormal for storage of the Normal, and whatever I put
> as default in the node_shader_normal.c::node_shader_init_normal() is
> passed to the shader correctly.
>
> The problem now is to hook up the interface normal values to the cycles
> storage node.
>
> Maybe I don't need a storage node and could use the
> bNodeSocketValueVector directly in blender_shader.cpp. I don't know if
> it's possible (and the way to go).
>
> Another idea was to create a custom get function in the RNA def_normal
> for the direction and point this to the bNodeSocketValueVector. Again, I
> don't know if is the correct way or even possible.
>
> FInal Notes:
> ---------
> My ultimate goal was to port the RGBCurves node to cycles, so I decided
> to start with a 'similar' but simpler one. I used the SkyTexture for
> some of the
>
> Also, I was testing with a sample file created before I added the
> storage node in node_shader_init_normal. That was crashing on
> blender_shader.cpp (get_float3(b_normal_node.direction());) and I
> couldn't figure out why. Luckily I had the insight of remove the node
> and create it again :)
>
> Thanks for any feedback and review.
> OSL comes once those problems are sorted out.
>
> Please review this at http://codereview.appspot.com/5440091/
>
> Affected files:
> intern/cycles/app/cycles_xml.cpp
> intern/cycles/blender/blender_shader.cpp
> intern/cycles/kernel/CMakeLists.txt
> intern/cycles/kernel/svm/svm.h
> intern/cycles/kernel/svm/svm_normal.h
> intern/cycles/kernel/svm/svm_types.h
> intern/cycles/render/nodes.cpp
> intern/cycles/render/nodes.h
> source/blender/makesdna/DNA_node_types.h
> source/blender/makesrna/intern/rna_nodetree.c
> source/blender/makesrna/intern/rna_nodetree_types.h
> source/blender/nodes/shader/nodes/node_shader_normal.c
>
>
> _______________________________________________
> Bf-codereview mailing list
> Bf-codereview at blender.org
> http://lists.blender.org/mailman/listinfo/bf-codereview
More information about the Bf-codereview
mailing list