I am sorry, but when I use your script the rotation of the card does not
match the angle of the point on the sphere that i sampled


On Fri, Feb 21, 2014 at 12:49 PM, Ron Ganbar <[email protected]> wrote:

> X and Y rotations are easy. You just need to use the R value for Y and the
> G value for X and multiply by 90. The Z - I'm not sure what to do there.
>
> set cut_paste_input [stack 0]
> version 8.0 v1
> Camera2 {
>  inputs 0
>  translate {0 0 5.480000019}
>  name Camera1
>  selected true
>  xpos 79
>  ypos -164
> }
> set N1f4fa180 [stack 0]
> CheckerBoard2 {
>  inputs 0
>  format "256 256 0 0 256 256 1 square_256"
>  name CheckerBoard1
>  selected true
>  xpos 192
>  ypos -171
> }
> Card3D {
>  inputs 2
>  rotate {{normalValue.g*90} {normalValue.r*90} {normalValue.b*90}}
>  name Card3D1
>  selected true
>  xpos 192
>  ypos -60
>  addUserKnob {20 User}
>  addUserKnob {18 normalValue R -1 1}
>  normalValue {-0.1099824831 0.3830043972 0.9200040698}
>  addUserKnob {6 normalValue_panelDropped l "panel dropped state"
> -STARTLINE +HIDDEN}
> }
> push $N1f4fa180
> push $cut_paste_input
> Sphere {
>  name Sphere1
>  selected true
>  xpos -40
>  ypos -138
> }
> push 0
> add_layer {N N.x N.y N.z}
> ScanlineRender {
>  inputs 3
>  motion_vectors_type distance
>  output_shader_vectors true
>  N_channel N
>  name ScanlineRender1
>  selected true
>  xpos -40
>  ypos -67
> }
> Shuffle {
>  in N
>  name Shuffle1
>  selected true
>  xpos -40
>  ypos -43
> }
> Merge2 {
>  inputs 2
>  name Merge1
>  selected true
>  xpos -40
>  ypos 44
> }
>
>
>
>
> Ron Ganbar
> email: [email protected]
> tel: +44 (0)7968 007 309 [UK]
>      +972 (0)54 255 9765 [Israel]
> url: http://ronganbar.wordpress.com/
>
>
> On Fri, Feb 21, 2014 at 2:41 PM, Gustaf Nilsson <[email protected]>wrote:
>
>> Hello
>>
>> Doesnt look like it is as straight forward as i hoped; I am trying to
>> sample a colour from a normals pass and put those values into the rotations
>> of an axis to align its angle with the surface.
>>
>> is there a fancy formula for this?
>>
>> Thanks
>> Gustaf
>>
>> --
>> ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
>>
>> _______________________________________________
>> Nuke-users mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>
>
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>



-- 
■ ■ ■ ■ ■ ■ ■ ■ ■ ■
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to