OpenVDB support

Discussion related to the Engine functionality, implementations and API.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: OpenVDB support

Post by B.Y.O.B. » Thu Apr 12, 2018 2:44 pm

Great!
These are my timings:

Old:

Code: Select all

[Smoke Domain] Beginning smoke export (channel: density)
[Smoke Domain] conversion from bpy_prop_array to Python list took 0.640s
>>> Smoke Export total time: 15.671s
New:

Code: Select all

[Smoke Domain] Beginning smoke export (channel: density)
[Smoke Domain] conversion from bpy_prop_array to Python list took 0.610s
>>> Smoke Export total time: 3.480s
(Tests with a grid with 13,141,440 floats)

But currently I'm still converting the bpy_prop_array to a list like we did before.
If I try to pass the bpy_prop_array to AddAllFloat directly, I get this error:

Code: Select all

Wrong data type for the list of values of method GetArray(): bpy_prop_array
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Developer
Posts: 3270
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenVDB support

Post by Dade » Thu Apr 12, 2018 2:59 pm

B.Y.O.B. wrote:
Thu Apr 12, 2018 2:44 pm
But currently I'm still converting the bpy_prop_array to a list like we did before.
If I try to pass the bpy_prop_array to AddAllFloat directly, I get this error:

Code: Select all

Wrong data type for the list of values of method GetArray(): bpy_prop_array
Bah, they don't offer Python buffer interface, can you post a test scene, so I can run the tests here and check if I can directly read from bpy_prop_array.
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: OpenVDB support

Post by B.Y.O.B. » Thu Apr 12, 2018 3:24 pm

Here.
But if it's too much trouble - 0.6 seconds on 13 Mio. floats is OK I think.

You have to checkout the branch byp_prop_array in BlendLuxCore to get the error.
Attachments
bpy_prop_array.blend
(106.22 KiB) Downloaded 99 times
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Developer
Posts: 3270
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenVDB support

Post by Dade » Fri Apr 13, 2018 2:57 pm

B.Y.O.B. wrote:
Thu Apr 12, 2018 3:24 pm
But if it's too much trouble - 0.6 seconds on 13 Mio. floats is OK I think.
Ok, I see, it is just a "list(grid)". Do you need an AddAllFloat with stride ? To read 3 float (aka RGB) and skip one (aka Alpha).
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: OpenVDB support

Post by B.Y.O.B. » Fri Apr 13, 2018 3:03 pm

Dade wrote:
Fri Apr 13, 2018 2:57 pm
Ok, I see, it is just a "list(grid)". Do you need an AddAllFloat with stride ? To read 3 float (aka RGB) and skip one (aka Alpha).
Would make color grid export faster, yes.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Developer
Posts: 3270
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: OpenVDB support

Post by Dade » Fri Apr 13, 2018 3:24 pm

B.Y.O.B. wrote:
Fri Apr 13, 2018 3:03 pm
Dade wrote:
Fri Apr 13, 2018 2:57 pm
Ok, I see, it is just a "list(grid)". Do you need an AddAllFloat with stride ? To read 3 float (aka RGB) and skip one (aka Alpha).
Would make color grid export faster, yes.
Ok, I added the support for ".AddAllFloat(list, 3, 1)" (it will read 3 float and skip one). And I guess we can can close this chapter for the moment.
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: OpenVDB support

Post by B.Y.O.B. » Fri Apr 13, 2018 3:42 pm

You used u_int instead of unsigned int, will this cause problems on Windows again?

edit: Guess not, it was there before.
Support LuxCoreRender project with salts and bounties

Rivental1
Posts: 14
Joined: Tue Mar 05, 2019 9:15 pm

Re: OpenVDB support

Post by Rivental1 » Sat Oct 05, 2019 12:43 pm

Sory for stupid question... I have read the branch, but my English is very bad, and i not understood eventually... Can we render VDB files (not blender simulation cash) inside blender with luxcore?

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2997
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: OpenVDB support

Post by B.Y.O.B. » Sat Oct 05, 2019 11:10 pm

Rivental1 wrote:
Sat Oct 05, 2019 12:43 pm
Can we render VDB files (not blender simulation cash) inside blender with luxcore?
No, the only option currently implemented in the Blender addon is to read the cache through Blender (can be Blender's own format or OpenVDB, but it has to be loaded by Blender).
There has been some work on an OpenVDB node that would bypass Blender's simulation cache, but it's not yet done: https://github.com/LuxCoreRender/BlendL ... penVDBNode
Support LuxCoreRender project with salts and bounties

Rivental1
Posts: 14
Joined: Tue Mar 05, 2019 9:15 pm

Re: OpenVDB support

Post by Rivental1 » Sun Oct 06, 2019 5:28 am

Thank you. Blender smoke simulator is very slow and often gives strange results... So would be great to render VDB cash from other programms, like Houdini or Cinema 4d with FumeFX or TFD. Strange why blender no read other VDB files...

Post Reply