MaxToLux - Autodesk 3ds Max Integration for LuxCoreRender

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by Dade »

patro wrote: Thu Feb 25, 2021 5:10 pm
TAO wrote: Wed Feb 24, 2021 10:51 pm So base on Dade point just hit the 7 number on the keyboard and simply check how many triangles your scene has.
Of course, I'll try to implement instance objects very soon but till then you need to be a little bit patient.
I've cheked the scene by hitting 7
polys 34.771.035
verts 17.742.370
I can easily render 60+M triangles with 8GB of GPU ram, do you run out of GPU memory ?
Support LuxCoreRender project with salts and bounties
User avatar
patro
Posts: 201
Joined: Sun Jan 21, 2018 7:09 pm
Location: mount Etna

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by patro »

Dade wrote: Thu Feb 25, 2021 5:13 pm
patro wrote: Thu Feb 25, 2021 5:10 pm
TAO wrote: Wed Feb 24, 2021 10:51 pm So base on Dade point just hit the 7 number on the keyboard and simply check how many triangles your scene has.
Of course, I'll try to implement instance objects very soon but till then you need to be a little bit patient.
I've cheked the scene by hitting 7
polys 34.771.035
verts 17.742.370
I can easily render 60+M triangles with 8GB of GPU ram, do you run out of GPU memory ?
GPU has just 2GB,
I have 16Gb ram. But I will check if it is the GPU.
User avatar
patro
Posts: 201
Joined: Sun Jan 21, 2018 7:09 pm
Location: mount Etna

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by patro »

Dade wrote: Thu Feb 25, 2021 5:13 pm
patro wrote: Thu Feb 25, 2021 5:10 pm
TAO wrote: Wed Feb 24, 2021 10:51 pm So base on Dade point just hit the 7 number on the keyboard and simply check how many triangles your scene has.
Of course, I'll try to implement instance objects very soon but till then you need to be a little bit patient.
I've cheked the scene by hitting 7
polys 34.771.035
verts 17.742.370
I can easily render 60+M triangles with 8GB of GPU ram, do you run out of GPU memory ?
I deselected the GPU, rendering with bidirectional CPU and metropolis.
it renders using almost 14GB ram but it renders. As you guessed it was my GPU the problem.
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by TAO »

2Gb of GPU ram is a bit low for this scene, Also if you want to render with CPU i think PathCPU could be much faster.
Of course with instancing this scene will need much less GPU memory too.
But as Dade already mention that you can measure how much GPU ram you need by simply counting the scene triangles.
There are many parameters left and I can not promise any date for adding instancing but I'll try my best to make it happen sooner.
As i have already seen a few of your scenes you can clean up your scenes before render too. for example, if a few objects are behind the camera or they should not be supposed to render at all, all un necessarily texture and materials, etc. ;)
User avatar
patro
Posts: 201
Joined: Sun Jan 21, 2018 7:09 pm
Location: mount Etna

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by patro »

oh well that's what I have for tersting MaxToLux :)
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by TAO »

Add support for object instancing for now it is not multi-thread and in huge scenes, with too many instances objects can get a little bit slower than the old algorithm but will offer a huge benefit in memory usage.
If i have enough time i will work on multi-threading and providing a better and faster solution later this month.

The very first look is like this:
Screenshot 2021-03-03 004759.jpg
All objects are instances and the scene takes almost no memory.
it is a static function yet and i use a loop for it, so it duplicates objects one by one not all at the same time.
Last edited by TAO on Wed Mar 03, 2021 8:48 pm, edited 1 time in total.
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by TAO »

Add support for instancing and references, 12000 teapot with more than 370 million polygons.
Translate time 17 seconds.
GPU memory usage about 1GB
Renderer PathGPU
Render time 55 seconds for 991 passes
Screenshot 2021-03-04 192157.jpg
The impressive result compares to parsing different mesh, especially in memory usage but a little bit time-consuming in translation part.
I do not know what is the dark color in middle I have seen that before in another render too and it is not about instancing.

Cpu: i9 9900k
GPU: Nvidia GTX 1080
Ram: 32GB
Last edited by TAO on Thu Mar 04, 2021 7:11 pm, edited 1 time in total.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by B.Y.O.B. »

TAO wrote: Thu Mar 04, 2021 6:36 pm Translate time 17 seconds.
This seems very long to me.
The Blender addon exports 12000 particle instances in 0.2 seconds, and 12000 objects with shared meshes (alt+D copies) in 2.8 seconds.

How does your current algorithm for detecting which meshes can be instanced work?
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by TAO »

B.Y.O.B. wrote: Thu Mar 04, 2021 7:04 pm
TAO wrote: Thu Mar 04, 2021 6:36 pm Translate time 17 seconds.
This seems very long to me.
The Blender addon exports 12000 particle instances in 0.2 seconds, and 12000 objects with shared meshes (alt+D copies) in 2.8 seconds.

How does your current algorithm for detecting which meshes can be instanced work?
You right, i need to do it in a different thread, so i collect all data that i need and then duplicate all objects once the thread is done. for now, i did it in the main thread and it is a bit slow especially that 3dsmax uses a single process to handle UI and object pointer.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: MaxToLux - 3ds Max Integration for LuxCoreRender

Post by B.Y.O.B. »

The Blender addon does it single threaded too, and in Python on top of that.
It sounds to me like the algorithm to detect instances is very very complicated. How does it work, in detail? I would first check if there's a faster alternative before thinking about multithreading.
Post Reply