16

I place leaves on my trees with emitter particle systems. Then, to make a forest, I place those trees with another emitter (or hair) particle system.

Problem is particles of particles don't work, I only get the trunks without leaves in my forest.

Following this question : How can I convert a hair-particle system into 3D, editable objects?, which solution takes ages (I use about 500 000 leaves per tree), I tried to write a python script, but comes to the same problem. Searching on google, I found Brecht saying it comes from the naming of object (leave.001, leave.002 .... leave.500000) which after 1000 iterations becomes pretty slow and after 10000 extremely slow (so naming 2000 object is much slower than twice the time of naming 1000 of them). Anyway, that step is useless, blender needs one big mesh with all leaves to allow instancing it, not 500000 objects with one linked mesh.

So question is how can I convert all the particles to one unique object in one step (or at least avoid it to take 28 hours every time) ?

matali
  • 2,811
  • 3
  • 27
  • 42
  • Trying to get around the naming problem, i managed to get a dummy script create and name 50000 objects (so 10x times less as what I need) but then Blender was unusable (every click takes ages). So the 2 steps way is really not viable. Only the solution where the converted particles stays in one object (the emitter) could work. I tried ctrl+J but it seems it doesn't work on particles. – matali Jun 26 '13 at 14:52
  • Have you tried using the 'Sapling' addon? – Gwen Jun 26 '13 at 16:19
  • @Gwenn Yes, I used it and Arbaro as well. But I don't like the default leaves (they don't fit the PNG's transparency, are too flat, etc... so I do the foliage manually like MarcoGIta explained on the BA Forum. It's in the sapling thread.) – matali Jun 26 '13 at 18:58

1 Answers1

17

Particle Instance modifier

When a ParticleInstance modifier is added to an object, that object will be used as a particle shape on an object which has a particle system associated with it.

  • Instead of setting the leaf object in the render settings of your tree's particle system.
  • Use the "Particle Instance" modifier on the leaf itself.

This has the advantage that it can be used multiple times for multiple particles systems.

Particle instance modifier example trees using monkey/Suzanne heads as leaves

Aldrik
  • 9,720
  • 22
  • 56
  • 1
    Wow, thanks a lot Aldrik :) To be honest, I thought nobody could answer that and I will get a "it's a blender limitation, for feature request please etc..." because I asked 2 devs and they told me nested instances will never be supported... :D Nice, really nice. You get a kiss as well if you want ;) – matali Jun 26 '13 at 16:01
  • Yes I tried it, it works perfectly. A bit strange to add the modifier on the leave and no on the trunk, but despite that unintuitive way, it works :) – matali Jun 26 '13 at 16:05
  • 1
    For people trying it, one side-note : rotation should be done in edit mode, not object mode. Only downside I found until now, is that the material randomisation per leaf (with particle info node) doesn't work anymore. I can only get randomisation per tree (all leaves of one tree have the same hue value). – matali Jun 26 '13 at 16:48
  • Another thing (in my case not a problem, but iKIsR asked for details and feedback) is that memory usage goes a bit up for low-poly leaves (my case) but goes quickly toward using my 8Gb if I subdivide the leaf a bit. So be careful to not use too much high-poly leaves. – matali Jun 26 '13 at 16:53
  • @matali ok, thanks, it is always a good idea to let people know exactly how helpful the answer was. :) – iKlsR Jun 26 '13 at 17:04
  • sorry Aldrik if you didn't like my edit, wasn't meant to criticize your answer, but I thought most people won't read the comments. Having the side effects in the answer could help people decide to use it or not ? Thanks again. – matali Jun 26 '13 at 18:55
  • @Aldrik I did only test placing the trees with particles first, works perfectly with thousands of particle trees. But if I try to manually create duplicates (Alt+D), the memory consumption goes up crazy, I filled the 8GB trying to render only 3 trees. I also tried to apply modifier before duplicating, didn't help. Any idea why and how to solve that, I sometime need to place and rotate trees carefully (the foreground ones)? – matali Jun 27 '13 at 05:15
  • @Aldrik Everything ok, looks like a bug. When appending such trees without applying modifier first in the library blend file the memory usage explode. But applying in the library file and saving, then appending works great... – matali Jun 27 '13 at 07:02
  • My issue with the edit was that it was written in the first person (rather than just listing the issues) and was duplicated in the comments. While undesirable, I believe the issues your having are standard behaviour for a modifier. Do file a bug report if you disagree. For lower memory usage you can use make duplicates real on your forest and use a single particle system for the leaves. – Aldrik Jun 27 '13 at 08:40
  • Tried the unique particle system for leaves. But with 1000+ trees with each of them more than 50 000 thousands leaves, we reach the Blender limit. (10 000 000 I had as max value, which doesn't work with only 8Gb either). Using dupligroups option in the append option panel solves the memory problem. – matali Jun 30 '13 at 11:29
  • Extraordinarily powerful approach, thanks Aldrik for sharing. But I've been trying to implement this answer for a couple days, and only end up with unusable chaos (scaling and rotation). Could you add screenshots of the particle settings you used for both Plane and Cylinder? – Gnaural Aug 13 '13 at 16:43
  • @PlenusFranckly I have recreated the scene for you to inspect. I don't think adding particle setting improve the answer. If you think something is missing fill free the make edits. ;) – Aldrik Aug 13 '13 at 18:05
  • @Aldrik, that was extremely helpful. I can immediately see I had a number of things confused. I am going to be studying this for a while. Thank you so much. – Gnaural Aug 13 '13 at 19:25
  • @Aldrik OMG I love Stackexchange... I am a "trackbuilder" and I spent all the day trying to figure out how to achieve decent viewport performance when using particles to plant the vegetation, I ended up with limiting view distance... Now when I discovered this MAGIC modifier, it opens whole new world of possibilites for me! I can finally focus on the actual creating! Thank you! :) – Jan Kadeřábek Jan 14 '19 at 01:23