PDA

View Full Version : OpenVDB not rendering?



RPSchmidt
11-08-2018, 07:45 AM
So I created an explosion in Blender and baked out all of the physics to OpenVDB.

Then I took that into Lightwave to incorporate into a building destruction scenario.

I set everything up with nodes and the explosion shows up clearly in VPR.

BUT... when I render it, there is nothing there. The render takes forever as though something SHOULD be there, but it doesn't actually render the explosion.

Not sure what is going on. Checked my render properties and I didn't inadvertently select anything that would cause the VDB to be invisible to the render camera.

Any ideas?

JohnMarchant
11-08-2018, 10:03 AM
Does legacy volumetrics effect this. TFD has to be set to legacy volumetrics, not sure about Blender exports.

RPSchmidt
11-08-2018, 10:14 AM
Does legacy volumetrics effect this. TFD has to be set to legacy volumetrics, not sure about Blender exports.

Hmmmm... not sure. I wouldn't think so, because it is using the OpenVDB object. That's new in LW2018, so I wouldn't think that it would be dependent on legacy volumetrics.

This is my first foray into using OpenVDB sequences from Blender though.

prometheus
11-08-2018, 10:26 AM
Does legacy volumetrics effect this. TFD has to be set to legacy volumetrics, not sure about Blender exports.

No..blender imported vdb should render fine, no need of legacy volumetrics, itīs just for rendering the direct generated volumetrics from TFD, if you bake out turbulenceFD to VDB...there is no need for legacy either.

I would suggest set the imported blender vdb file in Lightwave as a scattering channel set to density, and emission to density as well if itīs only smoke, if it is carrying a temperature channel, you would want to set emission to that or flame.

In blender...do not compress the simulated vdb files in the cached options, it could screw up the channels for fire and flame.
Note..make sure to enable volumetric shadows in vpr if you use that as a previewer.
Depending on initial density simulated in blender, you may want to increase scattering scale a bit.

Check the link to a thread covering a bit of this..for more info...https://forums.newtek.com/showthread.php?155499-Blender-openVDB-smoke-sims-into-Lightwave&highlight=blender+open+vdb

https://forums.newtek.com/attachment.php?attachmentid=139177&d=1515099678

RPSchmidt
11-08-2018, 11:17 AM
No..blender imported vdb should render fine, no need of legacy volumetrics, itīs just for rendering the direct generated volumetrics from TFD, if you bake out turbulenceFD to VDB...there is no need for legacy either.

I would suggest set the imported blender vdb file in Lightwave as a scattering channel set to density, and emission to density as well if itīs only smoke, if it is carrying a temperature channel, you would want to set emission to that or flame.

In blender...do not compress the simulated vdb files in the cached options, it could screw up the channels for fire and flame.
Note..make sure to enable volumetric shadows in vpr if you use that as a previewer.
Depending on initial density simulated in blender, you may want to increase scattering scale a bit.

Check the link to a thread covering a bit of this..for more info...https://forums.newtek.com/showthread.php?155499-Blender-openVDB-smoke-sims-into-Lightwave&highlight=blender+open+vdb

https://forums.newtek.com/attachment.php?attachmentid=139177&d=1515099678

Thanks, prometheus.... I went back and checked my scattering and absorption channels and made those changes, then also changed the OpenVDB node to use velocity and that worked like a charm.

I did output them with compression, though... so I think I will go back and bake it again without compression.

prometheus
11-08-2018, 11:47 AM
You could also use blackbody radiator node instead of your own manual gradient, in this case I applied it the emission channel and a texture editor node, which I think was overcomplicating it, you should be able to do this within the main node editor I think.

Quality wise? well you got the three various interpolation modes, but you need high resolution simulations for it to render really smooth in Lightwave open vdb.
In houdini there is a smoothing vdb node, I do not think there is a similar tool in blender or something in Lightwave that would help with that in a similar way, so High res simulations for smoother results.
The images I posted as showcase of the nodes are way...way to small in simulated resolution.

Imported blender vdb files can crash if you scrub the timeline to zero, so beware of that.

https://forums.newtek.com/attachment.php?attachmentid=139572&d=1516308663

RPSchmidt
11-08-2018, 12:46 PM
I did use a blackbody radiator and once I got the separate channels set up correctly, the end result was very nice.

Now to see how the entire scene render looks!

RPSchmidt
11-09-2018, 06:57 AM
Okay... things are not working out.

First, I created an explosion in Blender following a tutorial. In Blender, the explosion looks great. It was created using Smoke and Flame.

I baked out the OpenVDB sequence.

When I create my OpenVDB object in Lightwave and use my sequence, I am missing practically everything that has to do with fire in the Emission / Scattering / Absorption channels.

For example, I am missing flame, flame low, fuel, fuel low, heat, heat old.

All I have to work with (essentially) is density and velocity.

Not sure what I did wrong; although I am using a slightly older version of Blender (2.78).

In addition, a single frame is taking a horrifically long time to render; a frame I started last night wasn't even finished this morning.

Now granted, it's on my work comp which is a tad old (dual Xeon 2.6ghz processors, 16 threads)... but when I render the sample OpenVDB scene in the Lightwave content, it renders very quickly.

I must be doing something horribly wrong, because this seems ridiculous.

prometheus
11-09-2018, 07:54 AM
Okay... things are not working out.

First, I created an explosion in Blender following a tutorial. In Blender, the explosion looks great. It was created using Smoke and Flame.

I baked out the OpenVDB sequence.

When I create my OpenVDB object in Lightwave and use my sequence, I am missing practically everything that has to do with fire in the Emission / Scattering / Absorption channels.

For example, I am missing flame, flame low, fuel, fuel low, heat, heat old.

All I have to work with (essentially) is density and velocity.

Not sure what I did wrong; although I am using a slightly older version of Blender (2.78).

In addition, a single frame is taking a horrifically long time to render; a frame I started last night wasn't even finished this morning.

Now granted, it's on my work comp which is a tad old (dual Xeon 2.6ghz processors, 16 threads)... but when I render the sample OpenVDB scene in the Lightwave content, it renders very quickly.

I must be doing something horribly wrong, because this seems ridiculous.

First...save your blender file, so it is caching correctly, Ivé run across that as well about loosing the temp, flame etc, I think it has to do with the cache format you set..have to check within a couple of hours, if you donīt solve it I can probably
advice then.

Check your volume step size if you have a large scale sim, turn this step size up till it renders faster in vpr, also check other AA settings, turn of radiosity for starter.

Iīll try to record something soon.

Ztreem
11-09-2018, 08:04 AM
You could also bring your LW scene to blender and render everything there. :)

RPSchmidt
11-09-2018, 08:30 AM
You could also bring your LW scene to blender and render everything there. :)

Nope. I don't know enough about Blender to fix any potential issues and all I want is a simple explosion for an already constructed bullet simulation.

prometheus
11-09-2018, 09:41 AM
Nope. I don't know enough about Blender to fix any potential issues and all I want is a simple explosion for an already constructed bullet simulation.

In blender...
Checking..hereīs what to try, do not load the very first vdb file from blender, use number two..otherwise it most likely skips the flame and heat channels....so just change your vdb file loader to load from number 2.

make sure you have smoke and fire material as well, I would suggest to install 2.79.3 which have the great principled volume material to make it easier to setup fire and smoke.

Make sure you have selected fire and smoke in the fluid emitters flow/flow type.


If you have a cuda card good enough, using blenders gpu will render volumetrics much faster than Lightwaveīs cpu volumetrics(unless having a very very fast cpu), both cycles previewer and final renderer, and within blender you can change the scenery both fluid and dynamics at once.
Once imported as vdb In Lightwave, you are limiting yourself and the render.

The fracture tools and beaviour of fractured stuff in blender is also great in the sense that it doesnīt jitter, unlike a lot of other sim tools, and you can create fracture dust debris particles and emitting fluid smoke from it (fracture build)

I mostly use the spacebar and run quicksmoke for any item in blender I want to simulate fluids from, and change flow type to fire and smoke, instead of manually adding each item such as container/domain etc.

I think you should invest time in learning blender, itīs a great helping tool ..If you do not have the resources to get TurbulenceFD, and many many other things, turbulenceFD currently do not have a built in
PBR volume shader, so in that sense it may fall short in render realism against blender, Unless you convert the simulated TFD result to VDB format and load back in to the scene.

VDB in Lightwave has been asked for years, but maybe it still is a bit thin in implementation, itīs a helper if you absolutely need to render out in Lightwave for some reason, but if original sims in other software can be rendered both with better quality and faster, And keeping the sceneīs dynamic flexibility which VDB doesnīt have..why not?

Edit...multiscattering in Lightwave volumetrics with PBR doesnīt seem to working good enough, in blender it yields better results...and trying with turbulenceFD old legacy volumetrics ..it recalculates quite a while for each change you do in the shading..just too slow in my opinion.



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

RPSchmidt
11-09-2018, 10:52 AM
In blender...
Checking..hereīs what to try, do not load the very first vdb file from blender, use number two..otherwise it most likely skips the flame and heat channels....so just change your vdb file loader to load from number 2.

I'm just loading the VDB sequence into the null object with OpenVDB applied. I did try to change the Sequence settings to start from the second frame (I saw you mentioned that in another thread) but it kept crashing LW.



make sure you have smoke and fire material as well, I would suggest to install 2.79.3 which have the great principled volume material to make it easier to setup fire and smoke.

Make sure you have selected fire and smoke in the fluid emitters flow/flow type.

Unfortunately, I don't have any installation permissions on my work computer and getting them to update anything takes forever and a year.

I did double-check my simulation in Blender; I do have the material set up and added an emission material as well. I also double-checked my emitters' flow type.

The simulation looks fine in Blender; Shift+Z shows the volumes and the OpenGL shows it as well. When I take it into Lightwave, the simulation is there and plays, I just don't have all of the channels available.


The fracture tools and beaviour of fractured stuff in blender is also great in the sense that it doesnīt jitter, unlike a lot of other sim tools, and you can create fracture dust debris particles and emitting fluid smoke from it (fracture build)

Yup, but as I said, I already built the entire simulation (minus the explosion) in Lightwave; I even rendered out a 500 frame test and it looks great! It's just missing an explosion.

I was holding off on trying to get these bozos to buy turbulenceFD until the new version came out. Even if I started the process today, I would be lucky to get it by next year.

I really appreciate the help and suggestions!

prometheus
11-09-2018, 11:16 AM
I'm just loading the VDB sequence into the null object with OpenVDB applied. I did try to change the Sequence settings to start from the second frame (I saw you mentioned that in another thread) but it kept crashing LW.




Unfortunately, I don't have any installation permissions on my work computer and getting them to update anything takes forever and a year.

I did double-check my simulation in Blender; I do have the material set up and added an emission material as well. I also double-checked my emitters' flow type.

The simulation looks fine in Blender; Shift+Z shows the volumes and the OpenGL shows it as well. When I take it into Lightwave, the simulation is there and plays, I just don't have all of the channels available.



Yup, but as I said, I already built the entire simulation (minus the explosion) in Lightwave; I even rendered out a 500 frame test and it looks great! It's just missing an explosion.

I was holding off on trying to get these bozos to buy turbulenceFD until the new version came out. Even if I started the process today, I would be lucky to get it by next year.

I really appreciate the help and suggestions!


If that is the situation, you need to stress to your company that you need that update, or you canīt do your job..if they do not listen...drop the job, either the company or the current work ahead.

Donīt mess with the sequence options, just unload the vdb file by setting it to none, then load the vdb file 00002 or something, not the 0001 file..so you shouldnīt have to mess with sequence options.

Fine..you have the material and other settings right..again, itīs most likely the case that you have loaded the 00001 sim, as I sadi before..load the 00002 sim and ..not with the sequence options.

I have had so many issues with TFD and Jascha has been so silent that I am not feeling confident in investing in TFD, as well as Lightwave overall as of latest release, I do hope Lw picks up speed..but this time I can not join in
for the current lw release.

Blender offers fire and smoke in opengl at once, and faster and more realistic render, what it may not be able to compete with compared to TFD, that is perhaps simulation speed and huge voxel cached sims, and also...TFD has more control over finer turbulence settings I think.
Octane for lightwave may help overcome some issues in TFD rendering though.


AS for already created lightwave bullet sims, you can mdd export the lightwave bullet scene, and apply blender fire and smoke on it in there, though you need to be aware and now how to flip the mdd file axis correctly, If I only had time to record it..could
take a print screen on it maybe.
So itīs not necessary to create fracture and do that stuff all again in blender, you should be able to go this way with mdd and be fine.

The problem is that you would have to learn setting up nodes for fire and smoke in blender if you are not allowed to install 2.79.3...since itīs that version that has the Principled volume shader, with that shader you just need to raise blackbody intensity for the fire to kick in.

In my sample vid I just showcased how to use two of the same principled material to push the density scattering as if it had more flames in the density.

Other alternatives would be to use real fire clips if you can find good ones, and it may by todays standard look a little fake if youīre not good at compositing.

or use particles and hvs, but then you loose realism by todays standard.

Ztreem
11-09-2018, 11:16 AM
Nope. I don't know enough about Blender to fix any potential issues and all I want is a simple explosion for an already constructed bullet simulation.

I know the feeling been there a year ago, now I havn’t started LW in months. You can render the explosion in blender and comp it with you lw render. Best would ofcourse be to get the vdb file to work in lw. Good luck!

prometheus
11-09-2018, 11:20 AM
I know the feeling been there a year ago, now I havn’t started LW in months. You can render the explosion in blender and comp it with you lw render. Best would ofcourse be to get the vdb file to work in lw. Good luck!

I think he should be able to get the vdb in there.

Ztreem
11-09-2018, 12:09 PM
I think he should be able to get the vdb in there.

With your help he will. I can’t help as I’ve not used the feature yet

prometheus
11-09-2018, 12:34 PM
With your help he will. I can’t help as I’ve not used the feature yet

Ill try, but he may have to wait til tomorrow for recordings, unless Rod manages to follow that instruction right..then he may solve it sooner,


Unfortunately I got caught up in fun with burning flags, simulated with clothfx, exported as mdd with mdd baker, saving out both mdd and object at once in one special folder, then loading
to blender, delete any subdiv modifier to avoid mismatch in points, correct flip axis, then go to weigth paint, create a vertex map called fire density and paint in where I want fire to emitt from.
Quick smoke and advanced for the flag object and use vertex map ..So I am having fun with burning flags...a combo of a question around flag and clothfx or bullet for flags in another thread, and following upp
my hints on using mdd to export to blender.

Havent eaten anything after work, so itīs about time and then some relaxing watching something on the Tv tonight...maybe tomorrow.

RPSchmidt
11-09-2018, 12:51 PM
No worries, prometheus... I got it working, at least mostly.

One of my issues is that I am still using LW2018.0. So partially, I am dealing with whatever was broken with OpenVDB on that release that may have gotten fixed in a later release.

I went back to Blender and freed my bakes. Then I set the bake to start at frame 2.

Previously, when I would just load the second file in the sequence, it would crash nearly every time. I thought that maybe if I just started the bake from the second frame, then I would have the information I needed.

Well, that worked. When I loaded the file into the null with OpenVDB, I had all of my options and it didn't crash.

Set up my nodes and blackbody radiator, using flame for the OpenVDBNode and the Emission channel and Density for scattering and absorption and the explosion looked waaaaay better... far more detail and much more realistic than it had been previously.

Checked it in VPR and it looked really good. Started to render a single frame, but it was going to take two hours for that one frame, so cancelled it.

So that worked; at least, I had all of the channels available.

Now if I can just get past Layout crashing every time I try to load the VDB sequence into a null in my simulation... ugh.

Ah well.

I really appreciate all the help and suggestions. Just the fact that I went from seeing nothing to a very serviceable explosion is huge progress.

Will have to try to press these guys to update Lightwave and see if that provides a fix for the crashing.

Thanks again!

prometheus
11-09-2018, 01:10 PM
Good luck, keep on working...that is what I did to get somewhere, stubborn is a middlename for many of us.

I suspect VDB may be unstable in Lightwave, also a part of many other things I decided not to upgrade.

Teaser flag, clothfX in lightwave, exported mdd to Blender, painted the areas where I wanted fire with weigth paint, then made sure the fluids fire acess this by setting advanced smoke for the flag to that very painted weight map, the cool thing is that I can continuously paint new areas on the flag if I think it is missing fire flames, or erase paint it if it gets to much, then just go back and hit play.

I just canīt see myself being able to do that with such flexibility in Lightwave and using turbulenceFD, TFD doesnīt have any options to emitt fluids from weigth paint, and on top of all that..It doesnīt cost me anything than the invested parts for lw 2015.
I havenīt even begun exploring blenders soft dynamics.

Just an openGL preview of it to save time and file size and avoiding uploading to youtube for now.

The principles could be applied for using fractured and bullet dynamic simulated collisions etc in Lightwave and savind mdd, then applying fire ..or smoke or explosions in blender.

prometheus
11-09-2018, 01:17 PM
I have to say though, I am glad that a lot of stuff can be shared quite nicely between Blender and lightwave, clothfx, or bullet ..mdd export it, run fluid fire sims on it in blender, send it back to lightwave with openVDB if needed.
Using lightwave and OD copy and paste, pasting edges for skin modifier in blender, sending mesh back with armatur and continue animating in lightwave and render.

RPSchmidt
11-16-2018, 07:16 AM
Had to finally give up on LW.... OpenVDB in version zero is almost entirely unusable for me.

Seventy percent of the time, trying to load the VDB sequence crashes Layout. When it does load and I get it set up, one or another thing occurs that stops the render... and when I open the file again, "a crash has occured". Now the Layout file is useless and I have to start over again.

Hopefully when I get ver. 2018.0.7 it will be more stable. Until then, I just exported an MDD of the simulation and imported it into the Blender file with the original explosion. I'll just have to work from there and render it out from Blender.

Ah well. At least I got a little taste of the potential workflow.

prometheus
11-16-2018, 08:35 AM
Letīs see if this post getīs through due to the forum acting weird this day.


Let me know how the mdd to blender and fluids works for you, strongly advice to use blender 2.79.3 and use the principled volume shader for fluids, just make sure to raise blackbody intensity.

otherwise with 2,78...you need to wrestle with setting up nodes properly, you could look at youtube or other images of nodes for it though.

prometheus
11-26-2018, 01:30 PM
A quickie test..since the topic has evolved a bit in to openvdb questions...

just a quickie test of running a bullet sim in lightwave from the 2015 content bullet/forces/ explosion scene.
Then sending to blender by mdd baking, then painting a weightmap around the main break area with blenders weight paint..and then assigning that map to serve as fluid density map..from where blenders fluid is generated, simulate it in blender at a resolution of 101 divisions, and smoke high resolution at 4 divisions.
Saving out the simulation as vdb uncompressed.

Back to lightwave and adding a null, set it to openVDB and load the vdb file, creating a manual gradient in emission and in scatter channel, render out with VPR.
I only have discovery edition so canīt get the best quality in there.
I think I also set the step size to high ..so the quality could be better.
Interpolation mode quadratic.


Arggh...vimeo embeds not able to work within this forum..how do we solve that?

https://vimeo.com/302915512


<div style="padding:69.23% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/302915512?autoplay=1&loop=1" style="position:absolute;top:0;left:0;width:100%;height:1 00%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>

RPSchmidt
11-26-2018, 01:58 PM
A quickie test..since the topic has evolved a bit in to openvdb questions...

just a quickie test of running a bullet sim in lightwave from the 2015 content bullet/forces/ explosion scene.
Then sending to blender by mdd baking, then painting a weightmap around the main break area with blenders weight paint..and then assigning that map to serve as fluid density map..from where blenders fluid is generated, simulate it in blender at a resolution of 101 divisions, and smoke high resolution at 4 divisions.
Saving out the simulation as vdb uncompressed.

Back to lightwave and adding a null, set it to openVDB and load the vdb file, creating a manual gradient in emission and in scatter channel, render out with VPR.
I only have discovery edition so canīt get the best quality in there.
I think I also set the step size to high ..so the quality could be better.
Interpolation mode quadratic.


Arggh...vimeo embeds not able to work within this forum..how do we solve that?

https://vimeo.com/302915512


<div style="padding:69.23% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/302915512?autoplay=1&loop=1" style="position:absolute;top:0;left:0;width:100%;height:1 00%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>


It must be something in version 2018.0 that is causing the issue with crashing. Even after I saved a file where I had successfully loaded the OpenVDB sequence and rendered from it and everything looked fine, if I closed that file and then tried to open it again, "A critical error has occurred. Close Layout?" and that's all she wrote. The file was corrupt from then on.

We'll see how it goes when I get upgraded to 2018.0.7, although Blender is doing a good job of rendering the whole sequence with the imported assets and MDD files.

prometheus
11-26-2018, 02:16 PM
It must be something in version 2018.0 that is causing the issue with crashing. Even after I saved a file where I had successfully loaded the OpenVDB sequence and rendered from it and everything looked fine, if I closed that file and then tried to open it again, "A critical error has occurred. Close Layout?" and that's all she wrote. The file was corrupt from then on.

We'll see how it goes when I get upgraded to 2018.0.7, although Blender is doing a good job of rendering the whole sequence with the imported assets and MDD files.

Glad you found a way to render in blender then...and will see what happens with openVDB in the next upgrade for Lightwave.

Many ways to shade with various options in openVDB in lightwave, full nodal or using the channels directly.
It is however easier to tweak the fire and smoke shader in blender...If you use the principled volume shader, and as I mentioned before..I use a mix of copying the principled volume shader, then use a mix shader.
check the attributes settings for them two..density attribute is on one shader set to density, and temperature attribute set to temperature, where the bottom principled volume shader has itīs density attribute set to flame and temperature attribute set to density.

You write in the attribute name that you want, by writing in temperature instead of flame..that is what you get when the shader retrieves attribute inputs.


Blender...
https://forums.newtek.com/attachment.php?attachmentid=143427&d=1543266698
143427



Lightwave..
https://forums.newtek.com/attachment.php?attachmentid=143426&d=1543266505
143426