Can I author geometry by specifying size in pixels?

In our visualizer we have a need to display glyphs that are geometries that are fixed size (does not scale with camera zoom) and the size is specified by the user in pixels. I am able to have geometry that is fixed size by setting the SuppressCameraScale modifier on the instance (Stream Cache Authoring) but the geometry size is still in model space. There seems to be no way to specify that the geometry has to be 10 pixels big (for example). We used to be able to do this in OSG but now cannot … causing some backward compatibility issues.

1 Like


if you need fully 3d (rotating) glyphs and so using the canvas or svg layer is not an option, then I think you would need to do a bit of math to calculate the actual pixel space of the geometry based on its projected bounding box and then apply the appropriate scale matrix to the glyph nodes (which would need to be reapplied whenever the canvas size changes). Does that make sense?

yes that is what I am attempting to do. A feature request would be to support it as a Modifier (like SuppressCameraScale)

Can you point me to how OSG implements this from an API perspective? Do you somehow provide the desired width/height of the mesh?