Whats New - Version 4.5.5 |
Command Echo
|
Tool keyboard focus |
RSL displacement to slim template vector diff = normalize(N) - normalize(Ng); If "(Ng)" is found it is assumed the user is already applying normal differencing - refer to Steve May. If it is not found in the source code then Cutter adds the following parameter block to the Slim template. parameter float UseShadingNormals { label {UseShadingNormals} description "Directly using the normal returned from calculatenormal() causes polygons to appear faceted. This parameter adds the offset of the original shading normal to the calculated normal. This re-smooths the polygons. For more information refer to, http://accad.osu.edu/~smay/RManNotes/WritingShaders /disp.html#smooth by Steve May." default 0 subtype switch } It also modifies the body of the RSLMain block to include the following statements. output "vector _dnormal = normalize(N) - normalize(Ng);" output "P = P - n * hump * Km;" output "N = calculatenormal (P);" output "if([getvar UseShadingNormals] != 0) { " output " N = normalize(calculatenormal(P)) + _dnormal;" output " }" |
© 2002- Malcolm Kesson. All rights reserved.