How to get screen position of a vertex?
So I have a Genesis model, and within that model I have 2 vertexes that I need the screen position of(on the final rendered image).
Example of what I'm trying to achieve:
1. My Script randomizes some things in the scene
2. I get the screen positions of both shoulders of my model
3. My script starts the render, and exports a png of the render, together with a json/csv or whatever with the screen coordinates of the marked shoulders.
Anyone can help me? I have the world positions of the vertexes using:
var vertexR = geometry.getVertex(rightShoulderIndex);var xPos = vertexR.x;var xPos = vertexR.x;var yPos = vertexR.y;
And the same for the other shoulder.
When my model is centered those positions on the X axis are -10 and +10. I'm guessing thats the world pos, and since my model is centered, the left and right shoulder are 10 away from the center. On the edge of the screen that is around 60. but I need the positions in a coordinate space that is useable after the render. Example: My render has a dimension of 1080x1440 and the leftshoulder is at pixel 487.