Notifications
Clear all

[Closed] Is gw.text the only way to display text overlay in viewports?

A couple of years back I wrote my own that uses a text spline and a scripted transform to keep it locked to the camera/FOV etc. But that can be a bit annoying with clipping planes amongst other things. I was hoping there was a newer, less convoluted way to do this now. I can’t find anything in the help or on CgTalk. Anyone got any tips? The gw.text is too small for our needs.

Cheers,

Cg.

4 Replies

semitransparent .net form or wpf control might work. if you don’t need to render it with a view. or text shape always faced to a camera

2 Replies
 lo1
(@lo1)
Joined: 10 months ago

Posts: 0

From what I remember this would negatively affect viewport frame rates, as it renders the viewport once for the viewport, and once for the transparent form BG. I didn’t try with WPF though.

 PEN
(@pen)
Joined: 11 months ago

Posts: 0

GDI method explained here but it does slow the viewport down. The trick there is only to draw the form where the text will be. The smaller the form the faster the drawing.

http://www.penproductions.ca/tutorials/dotNet/gdiDrawing/index.htm

Latest Nitrous sdk extensions allow custom overlay fragments being hooked into the display chain. Requires C++ sdk coded fragement but provides mxs interface hooking/removing
Same is available for post and background render fragments

AFAIK the new selection outline and Viewport tooltips already use these mechanisms ( internally )

So … someone would have to write that overlay fragment plugin which accepts text input and some styling interface. Best of course would be having something like that delivired right from the Max dev team, but i don’t know how high on priority such things are …

SDK reference here
http://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__cpp_ref_class_max_s_d_k_1_1_graphics_1_1_i_fixed_viewport_pipeline_html

Some samples are in the Max 2016 SDK folder (…\maxsdk\howto\Graphics )
But i only had success when hooking in the background fragement sample

But this method opens the viewport for postFX too , there is even a bloom postfx sample in the SDK , but as said, i did’nt succeed hooking that one in …