Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Blender 2.6 Bug Tracker: Browse

[#25857] [updated] create_dupli_list incorrect behaviour with particle systems

Date:
2011-01-29 21:14
Priority:
3
State:
Closed
Submitted by:
Doug Hammond (dougal2)
Assigned to:
Janne Karhu (jhk)
Category:
Python
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
 
Summary:
[updated] create_dupli_list incorrect behaviour with particle systems
Detailed description
object.create_dupli_list incorrectly takes the particle system Display panel settings into account. The result is that in order to export full particle systems, one has to set display to 100% and this can cause considerable viewport slowdown. This is preventing exporting large particle systems of this type.

It should be noted that the tooltips for these settings suggest they should affect the 3D view only, and indeed Blender Internal renderer ignores them.

See the attached scene for such a scene setup.

Followup

Message
  • Date: 2011-01-29 21:32
  • Sender: Brecht Van Lommel
  • The particle object instancing works with the same system as dupliverts, duplifaces, etc. That's accessible from python through:

    Object.dupli_list
    Object.create_dupli_list(scene)
    Object.free_dupli_list()
  • Date: 2011-01-29 21:48
  • Sender: Doug Hammond
  • Thanks Brecht, that makes a lot of sense now that you mention it :)
  • Date: 2011-01-29 22:00
  • Sender: Doug Hammond
  • However, this seems to export only the fraction of particles set by Displacy % and not the full list ?
  • Date: 2011-01-29 23:39
  • Sender: Doug Hammond
  • Updated bug title and description
  • Date: 2011-01-31 10:33
  • Sender: Janne Karhu
  • This issue is not a simple one, as the dupliobject creation code relies on the particle system to be updated with the correct settings (render in progress or not) before starting to create the duplis. A similar issue will happen if you don't have "rendered" selected as the display visualization for the particles.

    One solution could be to set the needed particle settings manually through python (settings.draw_percentage = 100) and then tag the object for updating (object.tag).
    After this do a scene.update() call to actually recalculate the object and particles with correct settings, and only after all this call create_dupli_list(scene). Afterwards you should of course set the draw percentage to it's original value, tag the object and update the scene again to get to the original state.

    Other than the possible solution above there's really not much that can be done at this point. The issue is quite deep in the way data is changed by the way it's viewed in the viewport and it would require some major design changes to fix it. Closing the report.
  • Date: 2011-01-31 22:49
  • Sender: Doug Hammond
  • Thanks for the workaround Janne - however I do have to keep wondering about these apparent double standards for methods in the API and the functionality of the Blender Internal renderer. I hope the core issue is addressed in good time.
  • Date: 2011-02-03 23:48
  • Sender: Doug Hammond
  • I'd like to re-open this because the workaround no longer works since the render() RNA-write restriction has implemented.
  • Date: 2011-02-07 13:30
  • Sender: Janne Karhu
  • I don't quite understand how the render restrictions effect creating dupliobjects? If you're exporting the particles while rendering (is this even possible?) then the particles automatically should use the full draw percentage. And if you're exporting when not rendering then you should be able to change the draw percentage of every exported particle system just fine before creating the dupliobjects.
  • Date: 2011-02-08 20:11
  • Sender: Doug Hammond
  • I've attached a screenshot that shows the difference between rendering and create_dupli_list(). I would expect create_dupli_list() to create the full list required to produce the render.
  • Date: 2011-02-12 22:54
  • Sender: Janne Karhu
  • Committed the patch, so closing the report.
 

Attached Files:

Name Date Download
particle_group.blend 2011-01-29 21:14 Download
create_duplis_error.png 2011-02-08 20:11 Download

Changes:

Field Old Value Date By
status_idOpen2011-02-12 22:54jhk
close_dateNone2011-02-12 22:54jhk
StatusReopened2011-02-12 22:54jhk
File Added14930: create_duplis_error.png2011-02-08 20:11dougal2
status_idClosed2011-02-03 23:48dougal2
close_date2011-01-31 10:332011-02-03 23:48dougal2
StatusRejected / Closed2011-02-03 23:48dougal2
status_idOpen2011-01-31 10:33jhk
close_dateNone2011-01-31 10:33jhk
assigned_tonone2011-01-31 10:33jhk
StatusNew2011-01-31 10:33jhk
summaryCannot access objects used by particles in Group mode2011-01-29 23:39dougal2
detailsThere doesn\'t seem to be a way to access which object in a group is being referenced by each particle when using a particle system in Group render mode. The particle system settings object contains the dupli_group property to tell which group is being used, however beyond that, details of which object has been picked by each particle is not available. This is preventing exporting particle systems of this type. See the attached scene for such a setup.2011-01-29 23:39dougal2
File Added14792: particle_group.blend2011-01-29 21:14dougal2