Author Topic: Hair instancing objects problem.  (Read 8096 times)

2017-05-04, 11:30:48

Asticles

  • Active Users
  • **
  • Posts: 84
    • View Profile
Hi all,

I've discovered that instancing objects with hair is not working unless previously rendered the instanced object.
To make the test, just render this file without enabling the hidden layer(the one with the cube.001) object. The instances will not appear.
If you go to that layer and hit on Corona render-export objects, and then render, the duplicated objects are now rendered.

Is this a bug?

Thanks!

2017-05-04, 12:04:05
Reply #1

Asticles

  • Active Users
  • **
  • Posts: 84
    • View Profile
Also, tried to render a simple landscape with grass patches. I've seen export takes forever, could be because the debug log?

Thanks!

2017-05-05, 01:11:26
Reply #2

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
Initial bug fixed in 5.6.2

With the grass, what geometry are you using?  Object instancing/hair strands?  Object instancing is much much faster, with the hair strands each individual hair needs exporting with multiple vertices as it is possible each one is unique so it takes the most time.

To speed it up use instancing if at all possible (for grass this is definitely the case https://forum.corona-renderer.com/index.php/topic,14216.msg97888.html#msg97888) , you can export some generated hairs/clumps and then use that in the instancing.

2017-05-05, 11:49:48
Reply #3

Asticles

  • Active Users
  • **
  • Posts: 84
    • View Profile
I've using a grass patch on every hair strand and with some children interpolation (Hair particles with the patch as dupli object).

2017-05-05, 12:44:00
Reply #4

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
How many hair/children all up? Is the .obj repeated for each hair in the *.scn output file?

2017-05-05, 17:37:44
Reply #5

Asticles

  • Active Users
  • **
  • Posts: 84
    • View Profile
Thousands, I will check, but no additional obj nor binary files are created.

2017-05-05, 17:51:18
Reply #6

Asticles

  • Active Users
  • **
  • Posts: 84
    • View Profile
The scn file is huge, plenty of:

Code: [Select]
<instance>
      <material class="Reference">grass 1</material>
      <material class="Reference">grass 2</material>
      <material class="Reference">grass 3</material>
      <transform>-2.068277597427368 -7.727714538574219 -0.058532558381557465 64.54302978515625 7.7248005867004395 -2.065652847290039 -0.24354611337184906 -84.54467010498047 0.22014546394348145 -0.1194852739572525 7.996001720428467 -6.766663074493408 </transform>
    </instance>

2017-05-06, 00:09:37
Reply #7

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
Ok that is probably as fast it will go.  I can try and optimise that a little more but I doubt it will improve much.

2017-05-06, 13:19:48
Reply #8

Asticles

  • Active Users
  • **
  • Posts: 84
    • View Profile
Hi blanchg

Thanks for your efforts!
« Last Edit: 2017-05-06, 13:59:59 by Asticles »

2017-05-08, 16:53:38
Reply #9

Pixelatedvertex

  • Active Users
  • **
  • Posts: 35
    • View Profile
running into similar problems here (using exporter version 5.6.2.)
I'm trying to render grass using a particle system.
Exporting takes forever, but I get the feeling, it only exports materials for every single copy, not the geometry itself... In the export folder, I can't find any large number of files. The number of duplis is in the millions.
this is what I get during export:


2017-05-09, 01:12:03
Reply #10

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
Are you exporting the hair strands or are you using instancing?

2017-05-09, 10:08:24
Reply #11

Pixelatedvertex

  • Active Users
  • **
  • Posts: 35
    • View Profile
this was particles from an emitter object, I'm trying out hair now (does the same thing), instances don't seem much faster from what I tried right now, they also clutter up my scene. With a large lawn with more layers of plants, I could end up with millions of objects in my scene and I also lose a lot of procedural control when freezing the hair sim.
If it isn't possible to speed up the export process for hair and particle emitters, would it be possible to somehow keep the data that hasn't changed between renders, so it only has to be exported once?
With multiple layers of greenery as separate particle systems, this would make sense for doing test renders.

2017-05-09, 23:50:44
Reply #12

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona

2017-05-10, 00:56:29
Reply #13

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
I just did a release that adds options to disable debug and verbose modes to the preferences window.  This should speed up the export a little more.

2017-05-13, 21:05:11
Reply #14

Asticles

  • Active Users
  • **
  • Posts: 84
    • View Profile
Just did a test with a grass scene:

With debug on and verbose on:
Since hit render button to render buffer appears: 1m43s.
With debug off and verbose on:
Since hit render button to render buffer appears: 43s.
With debug off and verbose off:
Since hit render button to render buffer appears: 38s.

This is GREAT! Thanks!