MonZop / BioBlender

AddOn for Blender to do molecular work
BSD 2-Clause "Simplified" License
113 stars 20 forks source link

EP Curves, not all get a particle directly on the trajectory. #20

Closed zeffii closed 9 years ago

zeffii commented 9 years ago

This may have something to do with the Blender warning: CustomData_copy_data_layer: warning null data for CDOrco type (1277FD94 --> 00000000), skipping

This happens in code that I have not studied in any depth yet, but I suspect that the Emitter Object (A vertex mesh) may have vertices that don't match any Curve trajectories. This is not a matter of the random seed simply not choosing a Curve, but that there is an index mismatch between Emitter origins and Curve end points.

MonZop commented 9 years ago

My understanding was that the emitter object is built using the curves Start points as verteces. Or this was the original idea aniways

zeffii commented 9 years ago

Another area I know less than I thought :)

It appears that when the locations of several Emitter points have close proximity to each other, that Blender may consider these points as falling in a single grid unit. At first I thought perhaps the limits of Blender precision 1e-5 or so, but this happens even when 3 Emitter points are separated by as much as 0.02 which is on a different scale. This points away from the limits of precision and more towards some 3d grid subdivision level for the particle system.

A test to show this can be written, probably tomorrow.

zeffii commented 9 years ago

recreating separately, confirms this. image

A zoom to the emitter mesh points shows these indicator circles, i imagine these are used to decide which trajectories to use image

Let's see if we can shrink that radius..

MonZop commented 9 years ago

I just thought of a detail that might be relevant: all lines emit particles from their positive end; however, they should not all start simultaneously, but emission should start at random, in the 5 frames between the calculation of new set of lines.

zeffii commented 9 years ago

another_closeup

zeffii commented 9 years ago

they should not all start simultaneously, but emission should start at random

Adding this to the checklist

zeffii commented 9 years ago

With respect to the Force Fields, Curve Guides have a Maximum and Minimum Distance property, set individually per Curve. image Setting these could be done in a second final loop, or during curve creation.

zeffii commented 9 years ago

seen as emitter coordinate should be the same as the first coordinate of the Curve Spline, perhaps it is alright to do something like this:

    ob.field.guide_minimum = 0.0008   # originally 0.8
    ob.field.distance_max = 0.0008   # originally 0.05

for each. This reduces significantly the chances that emitter particles will pick unwanted trajectories. But in the case where several trajectories seem to originate from exactly the same point (due to numeric rounding) this will not be a solution.

MonZop commented 9 years ago

In theory , because of how they are calculated, not two lines should ever intersect. (This is a property of the vector filed). It is very normal that , for the locations with hi electrical intensity, several lines run in close proximity. The idea is that the number of lines should procisely provide information about the charge inetnsity distribution on the molecular surface; in the same time, the direction of particles provide information on the direction of the field.

zeffii commented 9 years ago

i've committed the proposed change to the branch, i notice no negative side effects and now the particles seem to follow only existing trajectories.

Thanks for the explanation! Stuff like this can make it directly into the 2.0 manual too