Hi,
I need to draw a lot of text into a 3d view into a drawtrigger. Using multiple call to "drawtext" command take a lot of time.
There are other way like opengl or mesh api?
Thanks
Luciano
Hi,
I need to draw a lot of text into a 3d view into a drawtrigger. Using multiple call to "drawtext" command take a lot of time.
There are other way like opengl or mesh api?
Thanks
Luciano
Yes, drawtext() has quite slow performance. It is designed to be flexible and easy, not fast.
If you are drawing static text that doesn't change very much (such as real words instead of variable number values), then you could create the text in a 3D modeling software, such as AC3D, and import entire strings of 3D text as shapes. Rendering an entire static string of text as a 3D shape is fast.
If you are trying to optimize for performance, I'd suggest doing that for as much text as you can and only using drawtext() for text that you know changes frequently and unpredictably (such as numbers).
In 19.2, we added a C++ class called a TextMesh that we use for rendering text very quickly. It generates a texture atlas for its characters within a single texture and then uses texture coordinates for mapping each character to its location in the texture atlas.
We added it so that we could render dynamic text such as label values on Rack slots very quickly:
We didn't make the TextMesh accessible in FlexScript, but in 19.2, you should be able to use it in C++ code, such as in the Module SDK.
Hi Phil,
Ok, I agree that drawtext() is designed to be flexible and easy.
I could try to use a 3d shape.
For the TextMesh I'll wait a future FlexScript version because in my library I trying use onyl FS.
Thanks
Luciano
13 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved