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: 71
Joined: Mon Dec 02, 2019 11:16 pm
Location: Zambia
Contact:

Animated OpenVDB Volumes

Post by Continuum »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Animated OpenVDB Volumes

Post by Dade »

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: 71
Joined: Mon Dec 02, 2019 11:16 pm
Location: Zambia
Contact:

Re: Animated OpenVDB Volumes

Post by Continuum »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Animated OpenVDB Volumes

Post by Dade »

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: 71
Joined: Mon Dec 02, 2019 11:16 pm
Location: Zambia
Contact:

Re: Animated OpenVDB Volumes

Post by Continuum »

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

Re: Animated OpenVDB Volumes

Post by Continuum »

I think I am beginning to understand how this works. So I dived into the SDK instead, and I am beginning to get results within my application (I still can't get blender to animate imported vdb's though). But I am also having problems using vdb files generated in other apps. Getting closer though.

https://www.youtube.com/watch?v=SyP1BJJQwWA
Post Reply