Animated OpenVDB Volumes

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.
Post Reply
User avatar
Continuum
Posts: 68
Joined: Mon Dec 02, 2019 11:16 pm
Location: Zambia
Contact:

Animated OpenVDB Volumes

Post by Continuum » Sat Aug 28, 2021 1:10 pm

I am experimenting with volumes in Luxcore, in Blender, and I have run into an odd problem. Cycles & Renderman seem to handle this automatically. Since OpenVDB is a sparse format the grid size changes for each frame. Since Luxcore treats the grid as a texture, the simulation transforms on every frame. There is a video below highlighting the problems. How do I fix this?

https://www.youtube.com/watch?v=H3WQ_l1gISc

This file also doesn't seem to show, I exported it from Houdini. It works in Cycles & Renderman.
https://www.deepfxworld.com/public_down ... penvdb.zip

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

Re: Animated OpenVDB Volumes

Post by Dade » Mon Aug 30, 2021 10:20 am

I'm looking in a Disney material related problem and I will check this as soon as I have finished there
.
Support LuxCoreRender project with salts and bounties

User avatar
Continuum
Posts: 68
Joined: Mon Dec 02, 2019 11:16 pm
Location: Zambia
Contact:

Re: Animated OpenVDB Volumes

Post by Continuum » Mon Aug 30, 2021 9:57 pm

Okay, thanks. I currently use v2.4 for continuity reasons, since the feature set ticks all my use cases. If this problem has been fixed for the latest release then I may upgrade to a newer release in the future.

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

Re: Animated OpenVDB Volumes

Post by Dade » Tue Sep 07, 2021 10:57 am

Continuum wrote:
Sat Aug 28, 2021 1:10 pm
This file also doesn't seem to show, I exported it from Houdini. It works in Cycles & Renderman.
https://www.deepfxworld.com/public_down ... penvdb.zip
I need a complete scene (.cfg, .scn, etc.), the VDB file alone doesn't tell me very much.

Anyway, the source of your problem is in how the VDB file is read and scaled for the densitygrid.

The OpenVDB file is scaled to match the densitygrid size: https://github.com/LuxCoreRender/LuxCor ... d.cpp#L114

and traslate to match the position, here: https://github.com/LuxCoreRender/LuxCor ... d.cpp#L153

This means the position and size information stored in the OpenVDB file are not used, the densitygrid will instead use its own position/scale information. In your case, you would like the opposite: to position/scale the densitygrid according the the VDB file.

It is is something it should be possible to add with a specific flag/option, I will check.
Support LuxCoreRender project with salts and bounties

User avatar
Continuum
Posts: 68
Joined: Mon Dec 02, 2019 11:16 pm
Location: Zambia
Contact:

Re: Animated OpenVDB Volumes

Post by Continuum » Fri Sep 10, 2021 4:42 pm

Okay thank you for looking into this. I wasn't sure about the scaling. I was implementing a OpenGl raycasting shader and run into a similar issue since the vdb has to be a 3d texture, so went another direction.

I also discovered some older videos and noticed there was an offset bounding box option in Blender, but it is no longer available.

Post Reply