PDA

View Full Version : Modeler- drag pt normal to view- what commands help?



ToolmakerSteve
03-12-2003, 05:14 PM
I am fine-tuning a poly model with 14K polys.

If I had a 3-D input device running on some high-end graphics workstation, I could no doubt grab a point and drag it in 3-D.

Having only a mouse and keyboard, I would like to fake it, by pressing some key to toggle between moving in the plane of a view, versus moving in/out of the screen.

This would be quicker, and flow more smoothly, than the only solutions I have found in LightWave:

Solution#1:
Drag or DragNet. Open two views, frequently moving the mouse back and forth between the two views, in order to get at all 3 axes.

My wrists are saying "enough". Besides, it slows down the "flow" of the work - especially when the point(s) I want are "buried" in one of the views, so must adjust perspective and/or hide other regions. Annoying diversion, when the point is perfectly visible in one of the views.

Solution#2:
DAZ's "pointnormalmove". Better, using one view looking "down" at the surface on which the point(s) lie. But still extra steps required.

"pantograph" REFINEMENT: I'm trying to do tiny adjustments. Sometimes, I have to zoom in absurdly far. I'd like a "pantograph" option for drag - where the mouse move is scaled down by a settable amount. E.g., 1:4 == move the point by 1/4 as much as the cursor is moved.

"orthonormal" REFINEMENT: Perspective is quite annoying for some uses, because parallel lines don't remain parallel.
I'd like the freedom-of-rotation of perspective, but as if looking from infinitely far away (and then zoomed in).

HACK: I can rotate the model and use one of the orthonormal views (front, etc.), but this is
a) inconvenient;
b) hazardous to my end-result, which requires me to get the model back to exactly the original coordinate system.
(for reasons having nothing to do with LightWave, but with what I do with the data after I am done with LW).

Q#1: Has anyone written a plug-in or lscript for moving a point on all 3 axes at once?

Q#2: I am not familiar enough with LightWave or l-scripting yet to know which commands to focus on in building a solution - all suggestions appreciated.

Q#3: Anyone have a script that is in someway close to what I seek to do? I would love to see it as a starting point.

Here is my basic understanding of what I need to accomplish:
1. Detect mouse down.
2. Read cursor position in view (screen x,y).
3. Select nearest point to mouse down.
4. Read mouse-moves.
5. Find out transformation of current view.
6. Convert mouse-move to a 3D move based on vertex's 3D location and the view transformation.

For the pantograph refinement:
7. Bring up a numeric box with a parameter that can be set.
8. Read that value, and use it in step #6 above.

For the orthonormal refinement:
9. Calculate an appropriate view transformation, and instruct the window pane to display using that transform.
Or maybe there is some option already in LW to "turn off" the perspective "divide by z", to get an orthonormal effect?

faulknermano
03-12-2003, 11:54 PM
for the orthonomormal refinement: there's a perspective correction slider in modeler's display options.

regarding pantograph refinement: it may be possible to do that only on two axes at the same time. carl merrit (aka CMan) has some scripts that 'featured' a "non-modal trick" for modeler so that you can see the updates in the background with the UI opened. using requester drawing functions you could probably simulate something like this.


the rest, well for sure lscript cannot detect the mouse cursor in modeler, that's outside a requester.

ToolmakerSteve
03-13-2003, 05:30 PM
faulknermano-

orthonomormal- "perspective correction slider in modeler's display options. "
YES! That does what I wanted! :) :)


pantograph- "...carl merrit (aka CMan) has some scripts that 'featured' a "non-modal trick" for modeler..."
:confused: I haven't been able to find source for such an example. I've posted message to lscript mailing list asking for one.


- "lscript cannot detect the mouse cursor in modeler, that's outside a requester"
:( So, an lscript couldn't do what "Drag" command does?

I mean, be able to detect that user has moved mouse near a vertex of an object, and pressed down the mouse button, and then dragged the mouse some distance?

If that isn't possible, then I'll have to learn to write a plug-in instead...

ToolmakerSteve
03-13-2003, 05:50 PM
Sigh. I examined the SDK. No mention of mouse stuff there either.

I've gotten spoiled by environments like Smalltalk (in 1980's), Java (in 1990's), and now Microsoft.NET (in 2000's), where a programming language can be used to deeply reach into a running application

Does anyone know if ANY of the 3D tools out there have a plug-in capability that lets a programmer get at actual mouse coordinates and button presses?

faulknermano
03-13-2003, 07:35 PM
:( So, an lscript couldn't do what "Drag" command does?
I mean, be able to detect that user has moved mouse near a vertex of an object, and pressed down the mouse button, and then dragged the mouse some distance?


no. there's no callback the modeler gives out for lscript that does this.



I haven't been able to find source for such an example. I've posted message to lscript mailing list asking for one.


yeah i saw it... if you want, you can go to his website at http://www.m2estudios.com/ and see if you can download an uncompiled script. or you can contact him directly.

faulknermano
03-13-2003, 07:38 PM
take a look at Smoo.. that features the non-modal thingy..



Does anyone know if ANY of the 3D tools out there have a plug-in capability that lets a programmer get at actual mouse coordinates and button presses?

afaik, the SDK provides interactive stuff on the viewport... if you look at the Spline Guide tool, you'll see that you can even draw stuff on the viewport, connoting that it is possible to pick up some kind of mouse activity on the viewports.. just dont ask me how to do it. :D