3d object particles coming out of mouth on [Mouth Open]
Hey there, I have an effect I am trying to create where when the user opens their mouth, they have poker chips fly out of their mouth. I remember the pizza tutorial where it was on a wheel... but I'd like the output to be a little more random. Also would like to have red, white and blue poker chips.
Thanks! Just having trouble finding out how to assign the 3d object as the particle.
Anyone?
Hi Topher!
Our current particle system does not support 3D objects as the particle. We will pass the request on!
However, you can simulate this using a 2D flipbook with each frame being a different angle of the poker chip. We do something similar in the Team Celebrate template found in the latest Studio.
For example, I made these quick ellipses to simulate different angles (inverted here so we can see it on the white page background):
Then in the particle's material Inspector panel, I set up a flipbook:
You can then make a couple version of the sprite for each chips, or use the Color setting in the Particle system. Don't forget to duplicate the mesh and materials for each chip.
And with this I was able to create something like this:
To trigger the particle when the user's mouth open, take a look at: https://lensstudio.snapchat.com/guides/general/particles/
Let me know if you need any clarification. Can't wait to see the final Lens!
Cheers,
Jon
Hey Jon! This is working well, but I made 4 frames of the poker chip like you did but it seems like it doesn't loop. Is there something I am missing here?
I also noticed that my flipbook is fading on, is there a way to not have that happen? I looke through the settings, couldn't find anything...
I noticed that the Fade on is just in the preview window, doesn't actually happen when I push the lens to the device. I also noticed something interesting. I had the fake footage stuff going when I pushed the lens to my device... it wouldn't initialize the effect, and said there was an error. I then switched it to an image in the preview window, and it worked on my device... Just thought it might be a bug.
Thanks so much for your help! Here is a link to the finished lens!
Hey Topher!
Looking awesome! Thanks for sharing.
Hmm when you say "Fading On", do you mean the number of particles is increasing or the texture is fading? Under the material's Flipbook option, can you check whether "Frame Blend" is unticked?
Also when I played with the lens I noticed a couple things:
Some of the sprite's transparent area is overlapping the other. Try turning off "Depth Write". This way the transparent part of each particle won't overlap each other.
Additionally, it looks like your texture size is not a power of two (256x256, 512x512, 1024x1024, etc.). Because of this, the texture is not displaying correctly. If you resize your texture to be 512x512 instead of 500x500, the chips should appear more consistently.
Let me know how it this works :) Lens is looking cool regardless!
Cheers,
Jon
How to fix the starting position of particles in the mouth?
Hi James!
To fix the starting position of anything, including particles, you can use the Head Binding object. To do this, in your Objects panel, click "Add New" then press "Head Binding"
Then in the Objects panel, select the new Head Binding object, and in the Inspector panel, press the drop down next to Attach to Point and select Mouth Center.
Then you can drag your particles underneath the Head Binding object, and set it's position to 0,0,0
You should now see your particles starting from the mouth center of the user!
You can use the red, green, and blue arrows in the Scene panel to adjust more finely the starting position of your particles.
Can't wait to see what you come up with!
Cheers,
Jon
Note: since you don't need to occlude the particle, in this case, you can delete the Face Occluder object by right clicking it and pressing "Delete"
It looks like the world space/ world force option does not work (all particles follow the head binding & move with the head as a big moving swarm), or am I missing something?
Is there any way to have all particles emitted from a local mouth position/rotation but then simulated in world space with the particle material system?
Or is there a way to change the emitter's spawn location world over time in script?
...Or do I have to redo everything in script to use prefabs and SetWorldPosition...
Hi Bastien!
Take a look at this guide that shows how to simulate world space particles:
https://lensstudio.zendesk.com/hc/en-us/community/posts/360012401863/comments/360000612463
Can't wait to see what you come up with.
Cheers,
Jon