Hello Again OSL
.start
Continued working on my osl shader tests posted earlier. Today I setup a node network to replicate what the OSL code does and in the process learned quite a bit about shading nodes.
Also, While working with the Node Editor I noticed the following.
- Selecting nodes and pressing CTRL+J will join the nodes in a new frame.
- There is no hotkey for removing a node from its parent (Frame/NodeGroup), so I had to manually do it from the NodeEditor header menu (Node -> Remove from Frame)
- Changing socket names of NodeGroups will update the names across all shared NodeGroups.
Following the code below, you will see the node network that is trying to mimic the code below
float scalar = abs(dot(-I, Normal));
if( scalar > highValue ) {
Color = Highlight * HighBoost;
} else if( scalar > midValue ) {
Color = Highlight * Mid;
} else {
Color = Highlight * Shadow;
}
In the screenshot below, the active monkey has uses my custom node network and the other monkey uses the OSL script node. Need to improve the node network for dialing in the proper angles!
Related Posts
Links
- http://www.openshading.com/tutorial-1-introduction/
- http://www.openshading.com/tutorial-3-basic-lines/
.end
satishgoda at gmail dot com
Hey Satish,
ReplyDeleteALT-P will remove a selected node from the frame. Selecting a node, then SHIFT selecting the frame and pressing CTRL-P will add that node into a frame. :)
Sean K
That is awesome. Thank you so much. Where are they documented?
Deletehttp://code.blender.org/index.php/2012/05/node-editing-tweaks/
DeleteCool. Thank you for the link :)
Delete