[Closed] Revealing (unhiding) object with mouse hotspots
Sorry for the somewhat vague thread title… I tried my best.
I was just wondering if this was at all possible… Basically you’d have a series of control objects/splines or whatever that would be floating around a character as usual but they wouldn’t be visible until you hover your mouse over a specific hotspot (or at best clicking on an object).
I believe this would make animating a complex rig much less clunky, for example; all the control objects for an arm, fingers, etc would be hidden until you hover your mouse over the limb (or as I mentioned before, click on it once at most). When you move out of the area or deselect the objects they would become hidden again.
Does anyone think this is at all feasible?
Many thanks for any insight!
I think your idea is sound but will take a bit work to get it just right.
There would be away to do a hover, but I don’t have it at hand to tell, I’ll look it up when I next have some spare time…
However, you could use the “WHEN” constructs to determine when a given object or objects are selected and through some clever association, unhide your helpers.
You could even go as far as have a “special” material associated with each group of helpers that would allow you to change the opacity in real-time (i’ve seen artist do this when they have a lot of reference objects in a scene and they want to control the transparency)…
It would work something like, when the user selects the shoulder, you’d set the opacity to full. You’d move down to the next “bone”, ie the neck and elbow and set the opacity to a slightly lower value ie 75%, move to the next bone, set the opacity to those controls to 25% maybe…etc…
You would need to plan out either your hierarcy (which from experience doesn’t always match this logical) and walk the child/parent tree a given distance from the source, or set up you own “virtual” tree which would connect all the bones in logical flow that suited your needs…
Anyway, back to the WHEN.
Basically, you can add a WHEN construct to a number of objects and flag to be notified when the selection changes. The when event handler can tell you which object was selected.
I would personally build a table of objects, so that when the selection change occurs for our objects, you simply look up the object in the table and pull out all the relevent controls for that object.
If you are using a common rig setup all the time, it wouldn’t be to hard to hard code many of these elements, but if your rig config changes a lot, you will want to think about how you would go about setting this up…ie, select the parent, add the controls to it, select the next parent…etc…
This sounds like a really cool idea, I’d be interested in hearing how you go!
Shane
Also have a look at this for inspiration
http://www.keithlango.com/wordpress/?p=457
and
http://www.keithlango.com/wordpress/?p=482
It’s for maya but maybe it can be translated to max.
-Johan
Thanks very much, both you! I’ll definitely put two and two together and explore the possibilities.
RustyKnight, I know next to nothing about scripting unfortunately, I am but a humble animator. Is there a possibility you might be able to point me in the direction of some tutorial or explanation regarding how to use the ‘WHEN’ construct?
You see, I know what I want to achieve but I just don’t speak the language :shrug:
Cheers!
Ahh, tutorials, now wouldn’t that be helpful…
Seriously though, Bobo has done a great job with the MaxScript docs and I’d start by reading through the “when construct” section.
Now having spent a better part of my life de-cyphering some of the docs, I know it can sometimes seem unpleasently complex, but it is…no seriously, once you come to understand what the designers where actually trying to do it is relativly simple…most of the time
Okay, so we want to detect when an object is selected
when select your_object_list_here changes id:#MySpecialSelectScript obj do (
-- Perform your actual code here
)
Now “your_object_list_here changes” is either a reference to a single node or an array of nodes…the problem is going to be detecting when a node is created and/or deleted, but it is possible. The “#MySpecialSelectScript” tag provides a much simpler way to access the construct and remove it when you need to, without the need to maintain a reference to the construct “deleteAllChangeHandlers id:#foo[b]”
[/b]Hope that helps
Shane