Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / text display in viewports
  RSS 2.0 ATOM  

text display in viewports
Rate this thread
 
30622
 
Permlink of this thread  
avatar
  • badoumba
  • Posted: 06 June 2009 11:41 AM
  • Location: Stavanger, Norway
  • Total Posts: 61
  • Joined: 30 April 2008 02:45 PM

Hi everybody

I would like to try a couple of things with the viewport drawing set of functions - especially text at point3 position.

When I evaluate the documentation examples, all my drawing disapear once I click back to the active viewport. I think it’s linked to fact that the text is not copied directly to the viewport but on a “snapshot” of the view - as far as I understood.

Is there a way to keep it displayed as long as I don’t desactivate this feature by any custom function ? I tried to link my design function to the viewport redraw callback function, but it doesn’t work.

Thanks for any help

...

It seems that I have to use OpenGL instead of DirectX. It solves it but the framerate is very bad and the texts are flickering a lot.



Badoumba

Replies: 1
/img/forum/dark/default_avatar.png

Hi! well i have been searching for ways of doing the same thing for a while now.

To answer your questions based on my experimentations, it is possible to have a “sticky ( as in updating, non flickering) “ text, lines, triangles drawn on viewport using the maxscript’s Viewport Drawing Methods.

i used same approach as you, and used Viewport Redraw Callback Mechanism.  basically you have to register a function that includes all your Viewport Drawing Methods, such as gw.text, gw.lines etc etc.

when everything is setup well, it does work, and work well within limited scope.

however, its very tedious, hard to maintain, and has many limitations.

I am still in search of better ways of drawing “2D” elements onto the viewport (such as flat text).

If you still having trouble, i can email you my function which is registered to callbacks.  Let me know.

Author: alteredgene

Replied: 25 June 2009 11:32 AM  
avatar

Has anyone figured something out for this? I’m having the same issues with the gw methods and although I’m using examples from the documentation, it doesn’t seem to refresh or do so when selecting objects or other unrelated actions.

I’ve resorted to using a manipulator for markers (points and triangles) however it is far too cumbersome.

Any help would be appreciated.

3dsMax 2009 SP1 (32bit)



---
3DSMax 2009 SP1

Replies: 0