• Hi Guest!

    Please be aware that we have released another critical security patch for VaM. We strongly recommend updating to version 1.22.0.12 using the VaM_Updater found in your installation folder.

    Details about the security patch can be found here.

Question Editing morphs by dragging UI handles

CheekiBreeki

Well-known member
Featured Contributor
Messages
111
Reactions
933
Points
93
I'm trying a basic approach to replicate a intuitive character creator interface like inZOI. Basically I want to drag a handle placed near a body part that lets me adjust morphs related to it, like height, size, depth etc. This is what I'm trying to achieve from the inZOI game.





Here's what I have in VaM so far, just an example to adjust the nose morphs:





Here's my approach:
  • Create an Anchor atom linked to a body part, like the nose tip.
  • Create a Sphere that acts as a handle to adjust morphs.
  • I have an edited version of PrettyFrank's sensor plugin to measure distance offset between two atoms along x,y,z axis.
  • Add separate triggers to adjust morphs based on changes in x,y,z distance offset between the Anchor and Sphere handle.
    • In the example video -> X-axis changes Nose Skew, Y-axis is Nose Height, and Z-axis is Nose Depth.
  • I can adjust the scale of atom movement to morph value changes so it roughly aligns
Here's where I'm stuck and need help to make it work properly:
  1. How do I accurately link an Anchor atom to sub-parts of the body like nose tip, lip corner etc which aren't standard targets. Right now I need to manually place the anchors for a newly loaded look.
  2. How do I read the value of a morph on the current look, and adjust my Sphere handle atom to be positioned accordingly, rather than at the default center?
  3. Is there a way to read out and show the value of a morph as a text tooltip? This will let me see the adjusted values as I edit them.
I don't know much about plugin coding and Unity scripting so looking for non-code ways to make this work for any look.
 
Not sure if there is a good way to link anchor atoms to non-standard targets besides manual anchors.

For adjusting the handle position, I think one of the only ways would be with an animation pattern. I got this to work using JayJayVon's VUML and ActionGrouper plugins. First, you use your handle and its values to set the start and end points of the animation pattern. Then, you set up VUML and get it to read the person's morph values (still controlled by handle). Then, you set up an ActionGrouper and set an action that continuously sends the value your handle is sending to VUML to the animation pattern. Before you link the handle to the animation pattern, you will have to temporarily disable the distance plugin so it doesn't go wonky from being moved. Once you link to the anim pattern, it should be set at the right position. As you can see from my attempt, it does change the value a little bit. Haven't figured out why, but its a start. After the position is set, you need to turn off the anim pattern so the handle isn't locked in place. Finally, reactivate the distance plugin and move it like usual.


As for reading the value, the only way I know how to show a value would be a UI slider, which I guess you could add UI text with numbers on either side, but as for specific values I haven't found a way to show them easily. Although meticulous, you could, in theory, have your values link to an animation pattern and set up a bunch of animation triggers to show increments (0-0.1 makes a linked text show 0 and 0.1-0.2 shows 0.1 for example, or however in-depth you are willing to get).

Although this is meticulous, you could save this animation pattern and UI text as a SubScene and load copies of this subscene for different parts, linking your handles to them. The only caveat is if a morph has a different value range (-1-1 instead of 0-1), of which you would need to create an updated anim pattern.

 
Upvote 0
Thanks! This seems like a usable method. Let me try out the JayJayWon plugins. I also came across some plugins by SPQR which let you dynamically adjust position and ui text. Maybe I can link all of these plugins and get something working. Another simplification I can do is to use new custom morphs which apply on top of any existing morphs, so we always start with 0 morph values.
 
Upvote 0
This plugin may be helpful:
 
Upvote 0
Thanks! This seems like a usable method. Let me try out the JayJayWon plugins. I also came across some plugins by SPQR which let you dynamically adjust position and ui text. Maybe I can link all of these plugins and get something working. Another simplification I can do is to use new custom morphs which apply on top of any existing morphs, so we always start with 0 morph values.

Your "existing" morphs at zero value, wouldn't put the nose/eyes/ears at the default spot if that's what you have in mind.

I think the actual proper idea would be to identify an important vertice of your feature, get its location and align your UI based on that.
 
Upvote 0
This plugin may be helpful:
Dang, this is so close to what I'd want. If only we could adjust the morphs after the search. Maybe time to start looking into plugin scripting 🤔
 
Upvote 0
Your "existing" morphs at zero value, wouldn't put the nose/eyes/ears at the default spot if that's what you have in mind.

I think the actual proper idea would be to identify an important vertice of your feature, get its location and align your UI based on that.

Correct, I was thinking to leave existing look morphs as is. Then apply new morphs on top of them. Although the handle atoms will be misaligned, it wouldn't alter the loded look morphs unless we make changes.

Mainly I was looking for a way to find finer grained sub parts like nose, ear etc. It's fine if I have to manually align "anchor" atoms to them once in a base scene, as long as they stay aligned after changing looks. The Attach to Vertex plugin by Stopper does the trick. It seems to attach to geometry vertices that move correctly even when morphs change.
So I can create anchors for each body part vertex that's relevant, and create linked handle atoms to edit morphs by dragging them. I have a working scene now pretty close to what I want.

The final UI issue I'm running into is Sphere or other small atoms are insanely difficult to select properly. The selection radius is way too large for the 0.01 scale Spheres I'm trying to use as movable handles. Driving me crazy how it doesn't ever select the atom at which I'm actually aiming my mouse cursor.
 
Upvote 0
Back
Top Bottom