OpenVDB with subpatched models possible?

slacer

Member
I created a panel with rounded edges using sub patch. It seams MeshToModel creates output based on the polygonal model instead of the subpatched model.
The left is result of OpenVDB Union and the right is just the model without OpenVDB.
subpatch-vs-openvdb.PNG

Is there a way besides freezing the model in modeler to keep the soft edges in OpenVDB nodes?
 

Attachments

  • subd-panels.PNG
    subd-panels.PNG
    43.2 KB · Views: 25

prometheus

REBORN
You can´t work with vdb´s in modeler, vdb´s is for layout only and whatever you freeze in layout (save transformed is what you should use) is what you then can continue to work on in modeler, but as a freezed mesh without any vdb properties.

And unless lw 2020 has a new thing called mesh to model, if not..that term is wrong, its mesh to volume, where the mesh is previewed and displayed as a level set volume, before you freezed it by saving out trans object to become a true mesh.

Layout recognizes the change in subpatch levels for instance in layout, but that is only a small effect changing the shape depending on how much you increase a subpatch cube for instead that just changes the shape from round to more sharper result If you increase subpatch levels and when vdb mesh to volume is applied, but it doesn´t increase the actual resolution on the volume mesh since that needs to happen in the vdb voxel size settings, and you are just increasing the subpatch level on the actual geometry which is pointless since that isn´t what you use for the end result.

if you want to mess with the actual vdb volume to mesh level sets softness on the vdb result, you should add filters, gaussian and similar, but as always in layout, you do not have a direct connection to either a freezed model or modeler, you need to save it as trans object first.
And if messing with vdb´s ..forget subpatch, at leas until you have frozen it and maybe editing it in modeler.
 
Last edited:

slacer

Member
I applied "freeze" to a copy of my subpatch model and used the result as target in vdb and it works. I just wanted to know if there is another way because freezing creates a large polycount. I use dilate for some targets and apply a gaussian filter to CSG Grid output in order to smooth the result.

Thank you
 

prometheus

REBORN
I applied "freeze" to a copy of my subpatch model and used the result as target in vdb and it works. I just wanted to know if there is another way because freezing creates a large polycount. I use dilate for some targets and apply a gaussian filter to CSG Grid output in order to smooth the result.

Thank you

That is not right, you don´t freeze the subpatch model at all, you should stand on the vdb item and save trans, which will save whatever resolution you have set in the voxel size.
So don´t confuses a subpatch model and work on that, besides, there is no reason to have the subpatch model at all since what I said about resolution ..it doesn´t matter what subpatch resolution you use..it will not be recognized as any resolution change when you are converting it withing the vbdb with mesh to volume, any change in supbatch resolution you do change in subpatch will only change the actual subpatch resolution mesh and not vdb and as such just changing the sharpness of the object, with subpatch on you will get a kind of roundess, toggle it ouff and it will be sharp, but the resolution will be the same no matter if you change subpatch levels.

As for changing softness or sharpness on the actual vdb mesh to volume, work on that instead on a mesh that isn´t subpatched, and in the end, make sure to select vdb item and save trans so you do not save out the actual subpatch mesh, cause that has nothing to do with any of the vdb results.

The poly account you correct to lower polys by changing voxel size to a larger value.
there´s no need really to subpatch a mesh, but if you have to make sure you use modeler first and subpath freeze your model to a low subpatch level, send it to layout and don´t mess with it as a subpatch object in there just apply mesh to volume on the mesh and put a filter with gaussian or similar in between the final output, the final result from vdb is not anything near a subpatch result.
 
Last edited:

prometheus

REBORN
If it´s an animation effect..you should skip anything that has to do with subpatch or freezing at all.
It all happens in the vdb evaluator and nodes with remeshing and you have no use of any freezing.

So if it´s only for animation then I don´t understand why you have to freeze it or work with subpatches?
 
The way I see it:
The issue is that the object he wants to convert to a level set has sharp edges because the OpenVDB Mesh To Volume node ignores subpatching and uses the base object. That's why he froze the object before converting it to preserve the rounded edges.

ciao
Thomas
 

prometheus

REBORN
The way I see it:
The issue is that the object he wants to convert to a level set has sharp edges because the OpenVDB Mesh To Volume node ignores subpatching and uses the base object. That's why he froze the object before converting it to preserve the rounded edges.

ciao
Thomas

Yes, that is what I understood as well and tried to explain that it will only react to the form to some degree when subpatching, and the more levels you have on a box for example, it will become sharper within the VDB result (unless overriding with filters)

And completely without anysubpatch active, it will be totally sharp, but at level one subpatch, it will be smoother and level 2,3 will increase divisions and make the box sharper, even with vdb applied.

But that is just about the shape not resolution, after initial freezing of a subpatch, leave all that behind and focus on the vdb tools.
That is also why I said you should freeze it in modeler first, as it came across in the question, it sort of sounded like working with subpacth to freeze in layout and also getting too much polys.
 

slacer

Member
@Thomas Leitner is right.
This image illustrates the problem.
The panel on the right side is a subpatch object and on the left side is a mirrored copy of this object. But it is used as target for a Mesh To Volume node. This node uses the bounding box of my subpatch model. The wireframe reveals the dense mesh vs. a subpatch model for a similar shape.
subpatch-vs-openvdb.PNG
patched-vs-frozen-small.PNG
 

slacer

Member
Yes, that is what I understood as well and tried to explain that it will only react to the form to some degree when subpatching, and the more levels you have on a box for example, it will become sharper within the VDB result (unless overriding with filters)

And completely without anysubpatch active, it will be totally sharp, but at level one subpatch, it will be smoother and level 2,3 will increase divisions and make the box sharper, even with vdb applied.

But that is just about the shape not resolution, after initial freezing of a subpatch, leave all that behind and focus on the vdb tools.
That is also why I said you should freeze it in modeler first, as it came across in the question, it sort of sounded like working with subpacth to freeze in layout and also getting too much polys.

No problem here. This is my first tiny project with vdb and I expect to learn more and more.
 

prometheus

REBORN
@Thomas Leitner is right.
This image illustrates the problem.
The panel on the right side is a subpatch object and on the left side is a mirrored copy of this object. But it is used as target for a Mesh To Volume node. This node uses the bounding box of my subpatch model. The wireframe reveals the dense mesh vs. a subpatch model for a similar shape.
View attachment 150715 View attachment 150717

No..that can´t be correct ,are you saying you have the left side, marked with a ring a subpatched only in layout, and then a mirrored copy..that is frozen?
that can´t be.
As for the wireframes you show, it doesn´t matter, they are the same in end shape result, one subpatched, one frozen.

What Thomas said is correct to what you should do, but that is also what I told you...you shouldn´t mess with subpatching at all in layout, fix the subpacth freezing in modeler if you have to to get the rounding more correct, I am all for that and agree with him as I said also in the beginning, but it was probably not noted.

As for layout, just drop any subpatch activity ..and just use any mesh as it is frozen or not depending on it´s smoothness in edges of course whey you built it.
 

slacer

Member
No..that can´t be correct ,are you saying you have the left side, marked with a ring a subpatched only in layout, and then a mirrored copy..that is frozen?
that can´t be.
As for the wireframes you show, it doesn´t matter, they are the same in end shape result, one subpatched, one frozen.

What Thomas said is correct to what you should do, but that is also what I told you...you shouldn´t mess with subpatching at all in layout, fix the subpacth freezing in modeler if you have to to get the rounding more correct, I am all for that and agree with him as I said also in the beginning, but it was probably not noted.

As for layout, just drop any subpatch activity ..and just use any mesh as it is frozen or not depending on it´s smoothness in edges of course whey you built it.
Sorry, we run in circles here. I did not try to use subpatch in Layout. I created a simple model as subpatch in Modeler and it looks great in Layout. But if I try to use this model as a target in a vdb node, the result is not soft any more. It is just a harsh box.
 

prometheus

REBORN
Sorry, we run in circles here. I did not try to use subpatch in Layout. I created a simple model as subpatch in Modeler and it looks great in Layout. But if I try to use this model as a target in a vdb node, the result is not soft any more. It is just a harsh box.

yes of course we do ..I had a feeling of that. :)

So not trying to overcomplicate it.

The vdb nodes do not respect subpatching properly, that is the remeshing cares little about it and as such it will go for the unsubpatched mesh, which is harsh apparently.
There is nothing you can do about it besides from freezing it as you initially stated in your first post, Or...adjust softness of the vdb result with the vdb filter nodes, but that´s it and it will not be the same nice polyflow as a subpatch object will have, not in the vdb result..you would have to freeze that vdb result and go back to modeler with that mesh and continue to work on it, but generally the vdb results makes quads in quite a different flow than a subpatch model has.

There are plugins from hurleyworks I think that can retopo stuff, but commercial, and there are free other tools that you can apply voxel modifiers on to and add additional smoothing modifiers too and also remeshing types in a way that is a bit difficult in Lightwave.
 

prometheus

REBORN
plugin MetaMesh is the stuff...



Probably not for this case though, it was supposed to be animated with boolean union.

And that is as much as I want to speak to you today, and that is not me being rude intentionally, but I know what happens when we engage, long conversations :p
And me to blame mostly for that.

so only a few words now, it´s 6 a clock in the morning and the sun is just awake as well, so it´s back to the coffin, so goodnight Erik, hope you had a relaxing vacation.
 
Top Bottom