Page MenuHome

Particles - Emit from Verts emits double on one vert
Closed, ResolvedPublic

Description

System Information
Operating system and graphics card
Windows 7
GeForce GT 330 M

Blender Version
Broken:
Tested on 2.77 and 2.72b

Short description of error
Particles of a particle system set to emit from verts (random off) emit two particles on one vertex while not emitting a particle on a different vertex, even though the particle count is set to the same amount as the emitter has vertices.
This only happens if the emitter object has more than a certain amount of vertices. In my tests this was over 450 or so.

Exact steps for others to reproduce the error

  • create torus with 46 major segments and 16 minor segments. This torus has 736 vertices.
  • add particle system to torus
  • set number of particles to 736.
  • set start frame to 1 and end frame to 1
  • set Emit From to Verts
  • turn off Random
  • set all velocity to 0
  • set gravity and all field weights to 0
  • move the timeline
  • set display to cross and draw size to 3px or something like that for better visualisation

You can now see that there is one vertex in the mesh where there is no particle. In my case this was at Vertex 204.

If you set start frame to 1 and end frame to 736 and then move throught the time line frame by frame you can easily see which vertex emits two particles. In my case it was vertex 159.

In the file attached there are two torus objects with one particle system each. You can switch scene cameras to see the relevant position on the objects.
On the one torus the particles are generated over time. When going from frame 159 to 160 it looks as if no particle is generated. But actually there is one generated on the same position where the particle was generated on frame before.
If you switch to the other camera you can see the other torus. All particles are generated at frame one here. You can see the vertex which misses a particle.

First fix for this issue (rBcb1994805373) caused (or rather, made worse/more visible) another issue with current distribution code for vertex particles (due to discrete nature of vertices and float imprecisions), as demonstrated by this file:

Event Timeline

Probably I feel lack one generated emitter.
I think that emitter is drawn on all vertices if you increase the number of emitter by one.



Or it may not only draw one specific emitter.

I'm sorry, a location of emitter repeated when I checked it.

import bpy

obj = bpy.data.objects['Torus.001']
pobj = obj.particle_systems
for i, em in enumerate(pobj[0].particles):
    for ci, cem in enumerate(pobj[0].particles):
        if i != ci and em.location == cem.location:
            print(i, ci, ': double')
            break
Bastien Montagne (mont29) lowered the priority of this task from 90 to 50.

Took me some time to find the cause of this, fix incoming.