hair and fur

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: hair and fur

Post by Dade »

Silverlan wrote: Mon Mar 15, 2021 11:08 am Here's the console output of luxcoreui up to the point where the memory usage starts to skyrocket: https://pastebin.com/9HdpwDfQ

Is there some way to reduce the memory footprint without reducing the number of hair / defining all hair the same?
I haven't uploaded the scene due to the large file size, but I can do so if needed.
You are trying to render a scene with nearly 90 millions of triangles:

Code: Select all

[LuxRays][35.750] Total vertex count: 92772492
[LuxRays][35.750] Total triangle count: 86772064
I would say it is quite normal to run out of memory with 90M triangles and 16GB of ram.
Silverlan wrote: Mon Mar 15, 2021 11:08 am I know that 3 million hair is a lot, but that still seems a little excessive to me, even without instancing.
The parameters I'm using for "DefineStrands" are as follows:
- tesselType: TESSEL_RIBBON_ADAPTIVE
- adaptiveMaxDepth: 12
- adaptiveError: 0.0075
- solidSideCount: 12
- solidCapBottom: false
- solidCapTop: false
- useCameraPosition: true
You are transforming each of the single triangle, in the first image, in up to, 2^12 ("adaptiveMaxDepth" parameter) segments (each segment is made of 2 triangles but the last one where a single triangle is used). Just do the math of how many triangles can potential have this scene: billions.

"adaptiveMaxDepth" allows to split, recursively, a single segment into 2 if the error is too big.

To start, try to use "adaptiveMaxDepth" of 2.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: hair and fur

Post by B.Y.O.B. »

Silverlan wrote: Mon Mar 15, 2021 11:08 am Thank you! Turns out I've already used instancing without realizing.
I'm assuming instancing only works if the hair are all defined the same?
I think you misunderstand what is being instanced here. The hair is one single mesh, which is defined as an instance. Not each individual hair strand.
Post Reply