We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

can we get camera co-ordinate in verge scene

Home Forums General Questions can we get camera co-ordinate in verge scene

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39596
    visualizer
    Customer

    Hello
    Hi team,

    Is it possible to get the camera coordinates out from published scene of verge 3d?
    Example – If I have a verge 3d scene published with some room environment, is it possible to trace the live camera position of the user handling to some output file?

    Yuri & Team?

    Regards

    #39618
    GLiFTeK
    Customer

    You can designate your camera to a variable puzzle, then use an exec JavaScript puzzle.

    Make a puzzle variable named “myCameraPuzzleVar”…
    Give it the value of the selector puzzle of the camera object.
    And create a recieving puzzle variable named “camPosAll”…
    plugged a logic puzzle “null” into that just to register it.

    Then make:
    Exec Code within something like:

    
    var camera = VARS['myCameraPuzzleVar'];
    var camObj = app.scene.getObjectByName(camera);
    var camPosX = camObj.position.x;
    var camPosY = camObj.position.y;
    var camPosZ = camObj.position.z;
    var camPosAll = [camPosX, camPosY, camPosZ];
    VARS['camPosAll'] = camPosAll;
    

    Doing this from mobile so some things might need adjusting.

    :good:

    #39625
    visualizer
    Customer

    Hey
    GlifTek

    That sounds interesting !
    I think in broader sense I understand what you say. I need to check with my developer to make it working.
    Hope it will get through

    Regards

    #40806
    nmcandre
    Participant

    Hi,

    I am testing the Verge 3D for Blender and I need to get the camera positional coordinates and rotation, write it on a text file (for example a csv).

    Is it possible to do it? If so, how can I can do it?

    Thanks.
    Regards,
    Nuno

    #40835
    visualizer
    Customer

    Hi
    nmcandre

    yes I am also looking for the similar outputting the camera coordinates but my need is little dynamic.
    one thing as you said it can be in text or csv file.
    Second I m expecting is if camera keeps changing its position in scene how that dynamic changing can be updated constantly ?
    Is there any way? Developers can you throw some light ?

    Example –
    I have “A” verge 3d scene with user moving here & there while in the “B” verge 3d scene is fetching the camera co-ordinates from “A” continuously and showing some representation of that camera movement from scene “A” in the current scene “B” & may be vice versa.

    Regards

    #40842
    nmcandre
    Participant

    Hi visualizer,

    I think that I need also the dynamic update on camera position. I’ll give you my example:

    On the web browser the user can rotate, pan and zooming the camera freely. At any position he could need a high resolution rendered image.

    If I have the actual position of the camera outside the web browser I can make a python script to run the render at exactly those coordinates seen.

    If I find a way of doing it I’ll share here.

    Regards,
    Nuno

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.