Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Converting 3D Points to Screen Space X&Y in Python

  • Converting 3D Points to Screen Space X&Y in Python

    Posted by Kevin C. burke on July 28, 2018 at 11:57 pm

    Hello,
    I’m trying to get the X&Y pixel coordinates of my polygon plane’s vertices. The output dimensions are 4096×2160 pixels (attached). These are the plane’s 3D vectors followed by the pixel coordinates I’m looking to get:
    # Top Left Corner: (-200,200,0) -> 1493,505
    # Top Right Corner: (200,200,0) -> 2458,471
    # Bottom Left Corner: (-200,-200,0) -> 1524,1712
    # Bottom Right Corner: (200,-200,0) -> 2438,1509

    Does anyone know how can I do this in Python? I’ve tried to us BaseDraw’s WC, CS, WS, and WC_V methods, but I’m not sure what to do with their results (which are not in pixels).
    WC: Vector(-174.873, 181.224, 1288.966) # Top Left Corner
    WC then CS: Vector(472.901, 423.506, 1288.966) # Top Left Corner
    WS: Vector(472.901, 423.506, 1288.966) # Top Left Corner
    WC_V: Vector(-163.448, 174.118, -151.55) # Top Left Corner
    CS: Vector(-25959351, -25959394, 0),Vector(25960649, -25959394, 0),Vector(25960649, 25960606, 0),Vector(-25959351, 25960606, 0) # All four vertices

    Thank you.

    Kevin C. burke replied 8 years ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy