You can rename the blendshapes in your 3D software, or if you are writing a script you can get/set blendshapes by their name docs.snap.com/api/lens-studio/Classes/Components#BlendShapes
I have a 2d image of a hooded face, with mouth animations using the GIF format, Lens studio allows me to import it and use it but I do not know how to trigger the animation with facial expressions. Is there functionality for this?
To trigger based off the facial expressions as I used them in this tutorial you would need to script that. Here are the docs for playing animated textures: docs.snap.com/api/lens-studio/Classes/Providers#AnimatedTextureFileProvider An alternative would be to use the behavior script which has a few face events that might work for you: docs.snap.com/lens-studio/references/guides/lens-features/adding-interactivity/helper-scripts/behavior#face-event
@@Swarley-ph1le There needs to be something there to rotate. With the skull model I had already rigged the lower jaw with a bone to control the rotation.
tell me how to make the 3d model repeat the rotation of the head, but the angle of rotation of the 3d model should be 4 times less than the angle of rotation of the head
@@darkssektor8554 that's not super easy to explain in a RUclips comment. I recommend you ask it on the official forum support.lensstudio.snapchat.com/hc/en-us/community/topics
awesome tutorial Mike... have you tried it in the most recent version of Lens Studio (3.161) ? I ask because I'm not getting the same results as in your video when you enter the first two lines of script: //@input Component.RenderMeshVisual faceMesh // @input SceneObject target In your video, as soon as you enter these lines, the inspector panel shows a new dialog box with fields for source and target. In the current version of Lens Studio I'm not getting that result. I can manually add component to get render mesh component, but I still don't have a way to enter the bone as target. Any thoughts? I'm wondering if ongoing development of Lens studio has broken your solution... which isn't all that old... its only been a few months since you posted this video.
Have you saved the script with ctrl-s? There’s a little dot that will show up next to the name of your script in the tab of the editor when your script has unsaved changes. Also make sure the script editor is active (blinking cursor) when you hit ctrl-s.
@@ModelsbyMike3d thanks for the quick reply Mike. I have no experience with scripting and just enough experience with Lens Studio to get totally frustrated, so I only did what you showed in the video. Any keystrokes or hotkeys that didn't get specifically mentioned didn't get done here. I treat tutorial videos like recipes, trying to repeat exactly what I see. But there's always stuff that the presenter takes for granted as being obvious that may not always get mentioned. Are you saying that once I save the script the dialog box I mentioned will appear? I'd really like to get this working because for my needs the ability to move a hinged mesh with a bone will be more useful than the full blown shape keys approach.
@@ModelsbyMike3d I'm happy to report that it works after learning to save the script! (to be fair, you DID say to save it, and I remember wondering how, so I skipped that step hoping that maybe it would self-save at some point. This is awesome! Thank you! Now.. can I repeat the process in the same project to use a bone to generate an eye blink?
@@patrickmarr7076 Glad to hear! You can indeed extend the script. You’ll need to add additional inputs for the other objects you want to control, get the additional face expression weights, then set the corresponding rotations. Alternatively you can make copies of the script and just change the expression name in each copy of the script
Thank you very much for sharing the tutorial
Great tutorial thank you
wondering if these scripts still work in the most recent version. I can seem to get the jaw open data to print.
were youb able to figure it out?I I can't seem to find the right script asset
Suscribe + like .. this tutorial is a life saver. Thanks for sharing
My blendshapes are present but have different names. How do I rename the blendshapes accordingly?
You can rename the blendshapes in your 3D software, or if you are writing a script you can get/set blendshapes by their name docs.snap.com/api/lens-studio/Classes/Components#BlendShapes
I have a 2d image of a hooded face, with mouth animations using the GIF format, Lens studio allows me to import it and use it but I do not know how to trigger the animation with facial expressions. Is there functionality for this?
To trigger based off the facial expressions as I used them in this tutorial you would need to script that. Here are the docs for playing animated textures: docs.snap.com/api/lens-studio/Classes/Providers#AnimatedTextureFileProvider
An alternative would be to use the behavior script which has a few face events that might work for you: docs.snap.com/lens-studio/references/guides/lens-features/adding-interactivity/helper-scripts/behavior#face-event
Amazing tutorial!! Does this work with any 3D object?
It does!
Amazing have to try this!! Does the model have to have the open jaw rotation or will the script and face mesh do that automatically?
@@Swarley-ph1le There needs to be something there to rotate. With the skull model I had already rigged the lower jaw with a bone to control the rotation.
@@ModelsbyMike3d alright thank you!! 🥰 going to give it a try
awesome tutorial! how could we add fire/gif/mp4 when mouth is opened? : )
The easiest way would be with the built-in behavior script.
hello, it is works with a jaw in 2D?
where did u download that skull from??
Either BlendSwap or TurboSquid
tell me how to make the 3d model repeat the rotation of the head, but the angle of rotation of the 3d model should be 4 times less than the angle of rotation of the head
and how can I make the rotations be only on one axis, for example X
@@darkssektor8554 that's not super easy to explain in a RUclips comment. I recommend you ask it on the official forum support.lensstudio.snapchat.com/hc/en-us/community/topics
awesome tutorial Mike... have you tried it in the most recent version of Lens Studio (3.161) ? I ask because I'm not getting the same results as in your video when you enter the first two lines of script:
//@input Component.RenderMeshVisual faceMesh
// @input SceneObject target
In your video, as soon as you enter these lines, the inspector panel shows a new dialog box with fields for source and target. In the current version of Lens Studio I'm not getting that result.
I can manually add component to get render mesh component, but I still don't have a way to enter the bone as target.
Any thoughts? I'm wondering if ongoing development of Lens studio has broken your solution... which isn't all that old... its only been a few months since you posted this video.
Have you saved the script with ctrl-s? There’s a little dot that will show up next to the name of your script in the tab of the editor when your script has unsaved changes. Also make sure the script editor is active (blinking cursor) when you hit ctrl-s.
@@ModelsbyMike3d thanks for the quick reply Mike. I have no experience with scripting and just enough experience with Lens Studio to get totally frustrated, so I only did what you showed in the video. Any keystrokes or hotkeys that didn't get specifically mentioned didn't get done here. I treat tutorial videos like recipes, trying to repeat exactly what I see. But there's always stuff that the presenter takes for granted as being obvious that may not always get mentioned.
Are you saying that once I save the script the dialog box I mentioned will appear?
I'd really like to get this working because for my needs the ability to move a hinged mesh with a bone will be more useful than the full blown shape keys approach.
@@patrickmarr7076 yes, once you save the script the input boxes will appear.
@@ModelsbyMike3d I'm happy to report that it works after learning to save the script! (to be fair, you DID say to save it, and I remember wondering how, so I skipped that step hoping that maybe it would self-save at some point. This is awesome! Thank you!
Now.. can I repeat the process in the same project to use a bone to generate an eye blink?
@@patrickmarr7076 Glad to hear! You can indeed extend the script. You’ll need to add additional inputs for the other objects you want to control, get the additional face expression weights, then set the corresponding rotations. Alternatively you can make copies of the script and just change the expression name in each copy of the script
it is works with a jaw in 2D?
It will indeed! You may need to modify the script a bit, but the overall method is the same.
A bit useless tutorial for people who don't have experiences with scripting.
I have no experience with scripting, and it works excellent