Jump to content

pnn

Member
  • Content Count

    11
  • Joined

  • Last visited

  • Medals

Posts posted by pnn


  1. Camera should track an object on the ground and give the top view ( eg: looking at a vehicle on the ground from a UAV (top view)) How do I modify the script? Thanks, -P

     

    _cam = "camera" camCreate (myobj modelToWorld [0,10,10] _cam camSetTarget myobj; _cam camSetRelPos [10, 0, 1.5]; _cam cameraEffect [ "internal", "right"]; showCinemaBorder false; _cam camCommit 1;


  2. Hello,

    I am new to Arma Scripting  and I'm trying to detect an object in a *png file. This is the script I'm trying to get to work.

     

    _screenPos = worldToScreen position pickup_truck;
    _screenX = _screenPos select 0;
    _screenY = _screenPos select 1;
    _myX = (_screenX - safeZoneXAbs) / (safeZoneWAbs);
    _myY = (_screenY - safeZoneY) / (safeZoneH);
    diag_log format [ "X: %1 Y: %2", round (_myX * (getResolution select 0)), round (_myY * (getResolution select 1)) ];

     

    Now when I look at the Image( testFile.png) at pixel location (_myX,_myY) I dont see the truck.

    The truck is at around (421,612) but the output I get from the script is (619,542).

    https://www.dropbox.com/s/fgbdo1156k8ci3p/testFile.png?dl=0

    Any leads as to why this is happening will be highly appreciated.

     

    Thanks,

    -P


  3. @pierremgi

    This is the script I'm trying to get to work. I don't have to use screenshot (as long as I can save images)

     

    _screenPos = worldToScreen position pickup_truck;
    _screenX = _screenPos select 0;
    _screenY = _screenPos select 1;
    _myX = (_screenX - safeZoneXAbs) / (safeZoneWAbs);
    _myY = (_screenY - safeZoneY) / (safeZoneH);
    diag_log format [ "X: %1 Y: %2", round (_myX * (getResolution select 0)), round (_myY * (getResolution select 1)) ];

     

    Now when I look at the Image( testFile.png) at pixel location (_myX,_myY) I dont see the truck.

    The truck is at around (421,612) but the output I get from the script is (619,542).

    https://www.dropbox.com/s/fgbdo1156k8ci3p/testFile.png?dl=0

    Any leads as to why this is happening will be highly appreciated.

     

    Thanks,

    -P

     


  4. @Larrow,

    Sorry I just saw your reply

    This is the script I'm trying to get to work. I don't have to use screenshot (as long as I can save images)

     

    _screenPos = worldToScreen position pickup_truck;
    _screenX = _screenPos select 0;
    _screenY = _screenPos select 1;
    _myX = (_screenX - safeZoneXAbs) / (safeZoneWAbs);
    _myY = (_screenY - safeZoneY) / (safeZoneH);
    diag_log format [ "X: %1 Y: %2", round (_myX * (getResolution select 0)), round (_myY * (getResolution select 1)) ];

     

    Now when I look at the Image( testFile.png) at pixel location (_myX,_myY) I dont see the truck.

    The truck is at around (421,612) but the output I get from the script is (619,542).

    https://www.dropbox.com/s/fgbdo1156k8ci3p/testFile.png?dl=0

    Any leads as to why this is happening will be highly appreciated.

     

    Thanks,

    -P

     

     

     


  5. Hello,

    I am new to Arma Scripting  and I'm trying to detect an object in a *png file. This is the script I'm trying to get to work.

     

    _screenPos = worldToScreen position pickup_truck;
    _screenX = _screenPos select 0;
    _screenY = _screenPos select 1;
    _myX = (_screenX - safeZoneXAbs) / (safeZoneWAbs);
    _myY = (_screenY - safeZoneY) / (safeZoneH);
    diag_log format [ "X: %1 Y: %2", round (_myX * (getResolution select 0)), round (_myY * (getResolution select 1)) ];

     

    Now when I look at the Image( testFile.png) at pixel location (_myX,_myY) I dont see the truck.

    The truck is at around (421,612) but the output I get from the script is (619,542).

    https://www.dropbox.com/s/fgbdo1156k8ci3p/testFile.png?dl=0

    Any leads as to why this is happening will be highly appreciated.

     

    Thanks,

    -P

     

     

     


    screenshot "testFile.png";


  6. I am having a similar issue. I am trying to modify a code "http://killzonekid.com/arma-3-bounding-box-utility/" so that a bounding box moves along with the object (pickup truck) that I created. Unfortunately I am not able to pass the variable using  -null=[pickup_truck] execVM "orig_code.sqf" and the bounding box always appears on the player. Any help will be appreciated ( I am new to arma scripting).


  7. Hello,

     

    I would like to use Arma 3 to generate video files/ raw images of the simulations. I would like to then have bounding boxes  2D) for objects of interest. I should be able to obtain the pixel coordinates (x1,y1) (x2,y2) with respect to the origin ( the top left point). Can this be done by using scripting in Arma 3 ( I saw a function bounding box that gives 3D bounding boxes)? I need to make a decision if I should purchase this software  :)

     

    Thanks in adavence,

    -P

×