Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Current camera position

  1. #1
    Super Member Boris Goreta's Avatar
    Join Date
    Aug 2003
    Location
    Zagreb, Croatia
    Posts
    1,357

    Current camera position

    Is there a node that gives you current camera position ?

  2. #2
    ITEM INFO node can do that for World Position. Add the node and double click to select which item for it to look at. There is also a node to gain access to all the camera settings.

    -M
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ItemInfoCapture.PNG 
Views:	23 
Size:	15.0 KB 
ID:	145837  
    I was thinking of the immortal words of Socrates - "I Drank What??"

  3. #3
    Super Member Boris Goreta's Avatar
    Join Date
    Aug 2003
    Location
    Zagreb, Croatia
    Posts
    1,357
    Yes but I don't know which camera is current, the node should work for any current camera, not only one specific camera.

  4. #4
    Ah, you are looking for the position of the Current Render Camera. Yup something the Camera node does not have. What is it that your trying to do?
    I was thinking of the immortal words of Socrates - "I Drank What??"

  5. #5
    Super Member Boris Goreta's Avatar
    Join Date
    Aug 2003
    Location
    Zagreb, Croatia
    Posts
    1,357
    Calculate focal distance with a scene with multiple cameras and camera selector plugin.

  6. #6
    Should be easy with expressions.

    1) make sure each camera has a unique name ex. Camera1, Camera2
    2) make a focus object or null ex. FocusPoint
    3) use this expression: vmag(FocusPoint.wpos(Time)-Camera1.wpos(Time))
    4) add the expression to the camera focal distance envelope
    5) repeat for each camera making sure one changes name in the expression for each camera

    So 10 cameras that all need to focus on the same point in the scene will calculate the distance automatically. Works with the lscript master plugin Universal Camera Selector.

    -M
    Attached Files Attached Files
    I was thinking of the immortal words of Socrates - "I Drank What??"

  7. #7

  8. #8
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,049
    TrueArt nodes has a Render node with Render Camera ID output?

    Denis.

  9. #9
    Quote Originally Posted by dpont View Post
    TrueArt nodes has a Render node with Render Camera ID output?

    Denis.
    Could not find a node that does from his library.
    I was thinking of the immortal words of Socrates - "I Drank What??"

  10. #10
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,049
    Quote Originally Posted by MSherak View Post
    Could not find a node that does from his library.
    I didn't check his 2018 library version, so I'm not sure, but in previous version it has a Render Info node.

    Denis.

  11. #11
    Quote Originally Posted by dpont View Post
    I didn't check his 2018 library version, so I'm not sure, but in previous version it has a Render Info node.

    Denis.
    I checked his site and he does have a render info node. No camera information node to extract position for focal distance to be calculated.
    I was thinking of the immortal words of Socrates - "I Drank What??"

  12. #12
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,049
    Quote Originally Posted by MSherak View Post
    I checked his site and he does have a render info node. No camera information node to extract position for focal distance to be calculated.
    As I said the output is a Camera ID, for the position you need an Item Info node,
    here in pre-2018, I'm using the DP Kit one, but in 2018 the native one had an ID input too.
    (I'm posting about the first question, not directly about focal distance...)

    Click image for larger version. 

Name:	CameraID_ITemInfo.jpg 
Views:	15 
Size:	77.9 KB 
ID:	145900

    Denis.
    Last edited by dpont; 09-06-2019 at 12:31 AM.

  13. #13
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,900
    Quote Originally Posted by dpont View Post
    TrueArt nodes has a Render node with Render Camera ID output?
    Yes,
    Render Info node outputs currently selected (by e.g. Camera Selector) camera ID.
    and Extended Item Info has Item ID input.

  14. #14
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,049
    Quote Originally Posted by dpont View Post
    As I said the output is a Camera ID, for the position you need an Item Info node,
    here in pre-2018...
    I tried the same setup in LW2019, but using this single python node:
    render_camera_node.zip

    It is open source, so you could also easily modify it for outputting other scene infos.

    Denis.
    Last edited by dpont; 09-06-2019 at 10:17 AM.

  15. #15
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,049
    Minor update of this little utility, because I tested it shortly through the Python node loader (Additional Nodes),
    so I remove the useless nodal preview, when it is added as a plugin,
    forgot to say that in this case it is located in Python Nodes/Item Info folder'.

    render_camera_node(2).zip

    Denis.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •