Keeping jit.gl.text3D steady while scene rotates

Apr 6, 2009 at 8:11pm

Keeping jit.gl.text3D steady while scene rotates

Hi all,

Would like to know if anyone has a way to keep a short list of jit.gl.text3D phrases “facing out” while the scene is rotated with a jit.gl.handle. It’s a list of 4 of the “what’s playing next” scene clips (short descriptive phrases, one line each) coming up in my playlist (the clips are textured onto various shapes in the GL, and having a handle is great to see the scene from all angles). But the text would be unreadable from lots of these angles, so if there’s a way to keep it facing forward that would be great. I’ll have camera motion too, but only in the Z direction, and will probably only use the rotate action of the handle.

Almost like having a separate render context within the main one, but without using another window, since having transparency around the text would be great. Plus, the user can go fullscreen, thereby likely placing a separate window in an awkward location, depending on their screen resolution.

For that matter, wondering if anyone has a straightforward way of “excepting” certain elements (like gridshapes etc.) from the action of a jit.gl.handle that controls the overall scene. I know everything gets moved together when you use the handle like this, but are there some simple operations one could do on the rotate etc. parameters coming out of the handle object, which then get sent to offset the effect on specific objects? I’m fiddling with them a bit but the rotate command is a lot less intuitive than the rotatexyz one. If this has come up before and someone has an easy answer (and maybe some insight into the rotate command itself) that would help a lot.

Thanks!

#43239
Apr 6, 2009 at 9:21pm

Hello
I don’t know about isolating objects from scene handle, but there might be another way of doing the effect.
It will work only for sketches. Sketch has nice message moveto. So if You create some virtual central object, (which can be invisible) and give it a handle, then You can connect this one handle to all other objects, which should rotate together.
The objects (sketches) should be placed in their positions with moveto x. y. z. message.
Your text gridshape should be rotated with rotatexyz in that case.
In fact, You don’t even need this central object. Just one handle for all your rotating together objects.
It’s also possible to do with models, but then You have to group them in original software and set normalize 0, when reading the obj. files in max.

hope this different approach to your trick will help
Alex

#155082
Apr 7, 2009 at 8:23pm
seejayjames wrote on Mon, 06 April 2009 14:11
For that matter, wondering if anyone has a straightforward way of “excepting” certain elements (like gridshapes etc.) from the action of a jit.gl.handle that controls the overall scene. I know everything gets moved together when you use the handle like this, but are there some simple operations one could do on the rotate etc. parameters coming out of the handle object, which then get sent to offset the effect on specific objects? I’m fiddling with them a bit but the rotate command is a lot less intuitive than the rotatexyz one. If this has come up before and someone has an easy answer (and maybe some insight into the rotate command itself) that would help a lot.

re: grouping. drawobject method to gl.sketch is the easiest way to achieve this.

re: rotate. rotate is returned as an axis-angle pair. if you want to get the conversion to rotatexyz, just send getrotatexyz to an object that you’ve rotated with handle.

not sure if that’s what you’re asking.

#155083
Apr 7, 2009 at 9:32pm

That’s good, I’ll look into the grouping if I use the sketch commands. Should have known there was a getrotatexyz command, I can use that for the “offsetting back” if needed. This could be helpful in other cases too, dealing with the different ways to express rotation.

Thanks for the replies!

#155084

You must be logged in to reply to this topic.