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
Animated OpenVDB Volumes
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: Animated OpenVDB Volumes
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.
Re: Animated OpenVDB Volumes
I need a complete scene (.cfg, .scn, etc.), the VDB file alone doesn't tell me very much.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
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.
Re: Animated OpenVDB Volumes
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.
I also discovered some older videos and noticed there was an offset bounding box option in Blender, but it is no longer available.
Re: Animated OpenVDB Volumes
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
https://www.youtube.com/watch?v=SyP1BJJQwWA