Jump to content

[SOLVED] X coordinate of "center" parameter of renderMessage2D (Visualizer) seems inverted


photo

Recommended Posts

Posted

EDIT: the first issue reported was due to an obscure conversion that took place in our own codebase I was not aware about. Unigine's 2D message screen positioning works as expected. Sorry about the inconvenience.

Posted

EDIT: post edited to remove references to the previous post which was not a Unigine bug.

 

Hello again,  :)

 

We have just switched to the latest Unigine version and the signature of the renderMessage2D function has changed and now asks for an additional 3D vector parameter named "center" which, as I understand it, would be the origin of the local coordinate system of the text quad. The way the X and Y components of the "center" vector are treated seems inconsistent. Hereafter are a few screenshots to illustrate the issue:

post-946-0-75955000-1368174930_thumb.png

 

post-946-0-78972100-1368174941_thumb.png

(Shouldn't it be the result for (1,-1,0) ?)

 

post-946-0-54496700-1368174949_thumb.png

(Shouldn't it be the result for (-1,1,0) ?)

 

 

Here is the local coordinate system I would expect to be consistent with the way we position the text message into the coordinate system of the viewport (or maybe with (0,0) at the bottom-left corner and (1,1) at the top-right one ?):

post-946-0-04722200-1368174959_thumb.png

 

 

Thanks for reading.

 

Posted

Vertical axis will be flipped in the next SDK. Thanks.

Posted

Hello, just a quick related question : I used the renderQuad2D() function for the first time today and it uses yet another coordinate system for positioning in screen/image space : from top-left corner (0,0) to bottom-right (1,1) (same for renderPoint2D() and renderTriangle2D()). Will all those positioning systems (that is, 2D primitive in screen space, 2D message in screen space and 2D message anchor in local space ("center" parameter)) be unified in the next SDK?

  • 3 weeks later...
Posted

visualizer coordinate system will be the same. top-left corner is 0,0; bottom-right corner is 1,1.

×
×
  • Create New...