Spawn particles on a mesh

I’m relatively new to UE4.

I’m trying to create trees/bushes as spherical blobs, and decorate the surface with leaves.

I was trying to create leaf sprites and spawn about 50 of them over the surface of each bush.
They would not move, and have an infinite life time. Ideally the positions per tree/bush instance would also be random.

Is this possible at all or should I consider doing it a different way?

I guess a more general way of stating this problem is : For every surface with material X, can I spawn particles/sprites randomly over the surface.

So the surface could be a tree, bush, terrain etc - I would like leaf particles dotting the surface.

After some trial and error I was able to get particles to spawn on the surface. I found this forum post for UDK that applied to this situation :

“The basic process is you add the module to the emitter in the particle system and set the Skel Mesh Actor Param Name property and add bone names to the Valid Associated Bones array. Particles are only emitted from surfaces or vertices weighted to these bones. You should have some skeletal mesh actor or other actor using a skeletal mesh in your map and it’s skeleton should contain bones matching the names you added to the array. Then you place an emitter for the particle system in the map and add an Instance Parameter with the Name you used for the Skel Mesh Actor Param Name in the emitter, set its Param Type to PSPT_Actor, and assign the skeletal mesh actor to the Actor property.”

Now, is there any way to spawn a constant amount of particles on the surface (say 50 or 100) and leave it there. i.e. I don’t want those particles to get destroyed and I don’t want any more particles to be spawned.

I tried adding a burst of 50 particles, but it still generates 50 every second. I know I need to adjust the spawn rate distribution somehow, but I’m not sure what to set it to. Any ideas?

I think I answered all my questions :slight_smile:

This isn’t the most efficient approach, but here’s how I got it to work.

My model (the bush) was skinned to one bone and exported.
The particle emitter had the following settings:

  1. Under required, I selected a material for the leaf particle. I set screen alignment to Facing Camera position and I set max draw count to 100. I need to check this as the count in Cascade still goes up to 1000.
  2. Under Spawn, I set the rate distribution to constant of 0. I added an item to the burst list where I set count and count low to 100 each.
  3. I added a Skel Vert/Surf Location property. Source type: Surfaces.Orient mesh emitters. Actor Param Name “VertSurfaceActor” (unchanged from default). I assigned the skeletal mesh here from the editor. Under associated bones, I added one entry for me single joint in my model (in my case it was named joint1)
  4. Lifetime: Min and Max = 0. I think this should have infinite life and with the other settings should not increase over time.
  5. Initial size : up to your discretion: I set it to 10 10 10 for the leaf particles.
  6. Initial velocity : Set these to 0 to prevent the particles from flying off.

To get all of this to work there was one important step I was missing.

Place the mesh and the particle emitter both in the scene. They can both be at the root level - parenting is not necessary.

On your particle emitter, go to the details tab, go to Instance Parameters - add one element. Name = “VertSurfaceActor”. Param type = “Actor” and assign your bush mesh to the “Actor” field.

That should work. If it doesn’t you might need to check things like initial size etc. Hope this helps someone else!

That really helped me! Thanks for sharing your discoveries :smiley:

Just created a small tutorial on that: How to spawn Particles on an Actor-Surface (Unreal Engine 4.10) - YouTube