jit.gl.text2d coordinates in 3d-space question
Greetings you all
I am generating text-labels for some points in 3d space with the jit.text2d object which is working just fine.
But: Now I would like to add some backdrop behind my text for better visibility.
I am doing this using the coordinates i feed into text2d, for a scaled gridshape object.
This is working well as long everything is on Z=0. As soon as things start to move into the back, the gridshapes get smaller (due to perspective) but the text does not (due to screenmode = 1)
So my question is: Is there some way to get the gridshapes behave the same way as the text2d objects do? (coordinate-wise.) E.g. Moving only on the XY-axis but not on Z?
Thanks for the help!
I want to help, but I’m unclear of your intention.
If you don’t want to move the gridshapes on Z, then don’t move them.
But what visual effect are you trying to do?
Do you want a gridshape, with a white box overlayed, and on top of the white box have text?
If so, there are so so so many ways. In teh OpenGL world, by default, everything is 3d and drawn with perspective. Do you not want to use 3D perspective? If so, then maybe you want Max mgraphics; it is all 2D vector graphics drawing.
If you want to control the text in 3D, then scale, rotate, and change the Z location of your gridshape, textbox, and text as needed.
You can also use the @layer attribute to force a certain drawing order if you want things like transparency control.
Thanks for your response.
To clarify: I have a cloud of particles (in 3D space), each one having a certain database entry linked to it. Now I can hover around and select groups with the mouse (or whatever) and the Name appears. Everything is working fine, except: As there is much going on, some of the texts are not readable very well. Hence I wanted to add a little "backdrop" between text and particles. (See the attachment above)
But: As the text2d object discards some Transformations (Screenmode = 1) it stays the same size regardless of the Z coordinate. If I now attach a gridshape-backdrop to those same coordinates, it gets scaled due to the perspective transformation (the one text2d disregards). See the attached patch as example.
Now I tried to undo the Perspective with a reversed projection-matrix, and other things, without success. What am I missing?
----------begin_max5_patcher---------- 1277.3oc4Y0zaaiCD8r8uBt55l0Pj5CaWfB3Vf8POu4vtcSQ.sDiMSkH0RQG mzh9eeGRJk3jZKK6H4jfBmHYRQQ9lGG9lgzee3.u4xaYkdn2g9WzfAee3fA1 pLULnp7.ub5sIYzRay7Rj44Lg16L2yzra015+zUn6jqP4xaXHpHE8Yz6Q9iF gnYYHdIZMKK6BwEhOtRi3tlVxzPqzRzu8d+2gtP72126ePkZ5cvqwWHXon4P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lvVbfc8340YGOarnm7KBYQro9Ga4kxUpj5dqNwHP3sF1orRMWX2j9FMBB .gdvzVxSSYhMAeJuzXOVS1eqSAsENliwZig5kFNlCZduv4IXtWomos.OOAz8 JdF+5heLa6oc3AeZ3mV6+Pd8vO6a5JmmVHAknJEmfXm523P6ou51suovCCS2 g+1HOXI8SDeF1V7bZ72v9cv7a2AmoupPSa78wSOcZUsRK+zEpqEnI7jhl8kU B1+vDphmNZBru6fXSZaSsZVXqZksTOnVE7HcnWZJ0bD862+2rHI3zfm31hmW QZ4V7bLZ4tD0oEE2vTkU8oEJvlQtVpLEiOyVjKbEsaBvSwtgW2d6uMqGUAaE QC6CYkxs6pamD6MzLN+X3+uahjyM -----------end_max5_patcher-----------
- not use @screenmode=1; nothing is perfect
- use jit.gl.text3d
You can use objects like jit.anim.node to group/align the text w/ the box and then position that group using its parent anim.node.
Thanks again, Then perhaps I indeed will just not use screenmode=1
jit.gl.text3d is too heavy unfortunately as there can be lots of labels depending on the situation.
Forums > Jitter