View Full Version : Nodal brain meltdown.

10-02-2013, 12:01 PM
My brain got so bent out of shape last night I thought it was going to burst. In the end I had to walk away from it for a while, and I thought asking here might help.

Basically what I am trying to do is set off a blink morph by pressing the X button on my (virtual studio attached) XBOX controller. This way I could have one person doing the nevron-powered facial capture and another off screen person firing off secondary animations (blink, swallow) using the controller.
My initial idea was to animate a null and use its Y axis channel (0-100-0 over 6 frames) to drive the morph, but that was where it got sticky, as the x press fires off an integer, and I couldnt work out how to tie that to the frame number of the channel part.
I can get a ramp from 0-100 by keeping the button pressed, but I am looking for a 0-100-0 from one press.
Any help greatly appreciated.:)



10-02-2013, 02:51 PM
To get a ramp inside that 6 frame range to go from 0 to 100 to 0 (provided the button press feeds the 0 - 100 data), you could try to remap the values to a trangle wave:

100 - fabs(fmod(XButtonData / 6, 1 ) - 0.5) * 200

This assumes that the button feeds said data as values going from 0 to 100.

I'll try to see what my XBox controller does in LW.

10-02-2013, 03:03 PM
Thanks for the idea! I will give that a try. The button has an integer output (which is really more of a boolean 1 for being pressed and 0 for not)
I'm trying to use the button press as a trigger and go from there.

10-02-2013, 03:22 PM
Looking at the manual, I might be able to use a wrap node. Im not near a computer right now, but if I get it to work, ill post the results.
Any other ideas greatly appreciated !

10-02-2013, 04:13 PM
Attached is an example scene.

It uses 2 nulls, one to store a temporary value in its Y position and the actual null that needs to bounce when the button is pressed.
When you press the button, the null will bounce from 0 to 10 and back to 0 in 25 frames.


Let me know this is what you had in mind.



10-02-2013, 04:33 PM
Are you using Item Info > Device node?
Without device, we don't see what outputs it offers..
Make screen-shot better..

10-02-2013, 05:08 PM
Is that question pointed at me? If so, see attached screenshot.

This is also the first time i used the Studio / controller function of LW, so no idea what happens when the controller isn't connected, but the output is the normal XBox controller button output (bool value).


Oh, and nodes with the _INFO postfix have comments attached (would be nice there would be visual feedback a node has comments)

10-02-2013, 05:09 PM
Is that question pointed at me?


This is also the first time i used the Studio / controller function of LW, so no idea what happens when the controller isn't connected.

But I see you could answer question, as you have nodes I have never seen..

Button Integer output from Device is 0 or 1, or it's some range?

I see you're using it to add node, and multiply, so I guess so it must be from 0.. 100?

If so, would it not better to normalize it, by dividing by 100, so 0 -> 0.0, and 100 -> 1.0 ?

Such normalized output could be plugged to Tools > Mixer > Opacity.

10-03-2013, 12:43 PM
Thank you very much for this. Originally I thought that I wanted the button press to be an 'activated' switch that makes the morph go from 0-100-0, but with your setup the value only gets increased if the button is kept pressed. After playing with it though, I like this better, as I can keep the morph (which is a blink) around for longer by keeping the button pressed (more of an eyes closed in this case)
I have made a few modifications, I will post a screengrab of the final node setup when Im done, but for the most part, this is exactly what I needed.

the value is an integer, and only either 0 or 1 (pressed or not pressed) so I was treating it more like a boolean BUT it can be cast as a scalar if you wish. This confused the crap out of me initially, but with Sven's help, I think I have it now.



10-09-2013, 02:16 PM
After playing with this for a while I have another question:
Is it possible to tie the "Virtual Studio Live" button to the xbox controller? It would be really useful to be able to (using Nevron) pull a facial contortion and turn it off so I can see how it renders.
Right now I'm pulling a face, holding the expression while i nudge towards the mouse to turn the button off, hoping nevron will keep the facial expression when I get too close for the kinect to read me.
Which works 10% of the time ;)