MoI discussion forum
MoI discussion forum

Full Version: import SubD with crossing creases - any solution?

Show messages:  1-5  6-25  26-31

From: pafurijaz
2 Mar 2021   [#6] In reply to [#5]
Hi I've a solution for that, can you share the file for Blender?, Or try your self, the solution can be done splitting the sharp edges, in blender and then import the obj with edges split in moi3d.
here a link on the solution I've shared few time ago.
https://moi3d.com/forum/messages.php?webtag=MOI&msg=9908.1
From: Tommy (THOMASHELZLE)
2 Mar 2021   [#7]
Thanks pafurijaz, your files were quite helpful to check out different options, but in the end, none of them was viable.
I'll probably have to bite the bullet and update to Rhino 7, they now have Subdivision Surfaces implemented pretty perfectly.
I'm not a big fan of Rhino, but it is getting stuff done, even if clumsy.

And thanks Michael for looking into it, but since my job starts next week, I guess I'll have to find other solutions... ;-)
This is a cube in Blender with some of the edges (the pink ones) set to a crease value of 1.0, which is fully sharp. At 0.0, which means no creasing, the object would be a sphere. Then gradually the creases become more and more sharp.
As you can see, the lower frontal corner has three sharp creases come together, so it forms a sharp, pointed corner, basically like in the original cube:


Now to get sharp corners in MoI, those creased edges need to be split:
This results in each polygon getting it's own rounding instead of meeting in the pointed corner - the open edges work only where two corners meet like in the upper right area:


And the same happens if I import that open edge object into MoI:


So what would be needed is a different way to tell the object/MoI on import what edges should be sharp (or in an ideal world it would be like in Blender a weight per edge between 0.0 and 1.0 for in-between semi-sharpness).
This could for instance be done in a window like the export windows you use for polygonal export, where the wireframe of the imported file is shown and the user can select edges and assign weights.
Subdivision Surfaces are only really useful if there is edge-weighting, otherwise it's only usable for some edge cases.

For completeness, here I set the edge weights that were 1.0 before to 0.8:
This is often very nice for slightly rounded corners and semi-organic shapes that have a very special kind of natural behaviour:

This look can be achieved by the methods pafurijaz showed, by having the semi-sharp edges have double-edges that either coincide or have a slight distance for larger roundings.
That was the old method we were using back in ~2000 in Lightwave 3D, before there was edge weighting.
It works in most cases, but creates very messy meshes that are hard to work with, since the overlapping edges can't be easily changed once they are created.

Blender has it implemented very well, Softimage XSI had it down to perfection and most polygon-modellers do it well for quite a while, Rhino 7 only offers sharp edges, no in-between weights, but they do it mathematically perfect, so it can be used like NURBS and converted easily.

I'll also attach the blender file and the obj.

Cheers,

Tom

Attachments:
BlenderSubD.zip

Image Attachments:
CubeWithHighSubdivisionsAndOpenEdges.jpg  CubeWithHighSubdivisionsAndOpenEdgesMoI.jpg  CubeWithHighSubdivisionsAndSemiSharpCreases.jpg  CubeWithHighSubdivisionsAndSharpCreases.jpg 


From: pafurijaz
2 Mar 2021   [#8] In reply to [#7]
Probably you have to change the default preferences on Moi3D keep corner in SubD import options



And one more things with a very low topology the result is often impossible, for a better result you have to keep in mind to increase the mesh topology in order to have the desired result, and in the exported OBJ don't apply the modifiers never on exported object, keep it simple exporting a basic mesh, that is the rule

Image Attachments:
SubD-options.png 


From: Tommy (THOMASHELZLE)
2 Mar 2021   [#9] In reply to [#8]
Thanks, but like I wrote and showed before, that setting doesn't help at all.
From: pafurijaz
2 Mar 2021   [#10] In reply to [#9]
You make a mistake on exporting the obj with modifiers applied
From: Tommy (THOMASHELZLE)
2 Mar 2021   [#11] In reply to [#10]
You may be right, but when I remove the modifier in Blender before export, I get a different mess, but not a better one...?

In this extremely simple case, I could now trim away stuff and see if I can get the result I need, but again, this may be viable for a one-off, but not as a workflow solution.
Or am I still missing something?

Cheers,

Tom

Image Attachments:
CubeWithHighSubdivisionsAndOpenEdgesNoModifiers.jpg 


From: Frenchy Pilou (PILOU)
2 Mar 2021   [#12]
Blender Blend --> Export OBJ ---> _importOBJ (by Max) gives that


From: Michael Gibson
2 Mar 2021   [#13] In reply to [#7]
Hi Tom, currently MoI doesn't do edge weights for subdivision surfaces. Edge weights are not part of the .obj file format and so can't come over by the current import route either.

re:
> Subdivision Surfaces are only really useful if there is edge-weighting, otherwise it's only usable for some edge cases.

For most people this is incorrect, the most common use of subdivision surfaces is for creating organic smooth shapes without edge weights.

It's only a smaller set of people trying to use subdivision surface modeling for hard surfaces that require this.

it's not a focus for MoI as of yet because these types of hard surface models are generally better to create directly in NURBS rather than in subd. You can't even get an exact circle or cylinder in a sub-d model, it's not a good fit for mechanical shapes that have features like exact circular holes and similar things in them.

I understand that you need it for your particular use case, but sorry that type of use is not the current focus.

- Michael
From: Frenchy Pilou (PILOU)
2 Mar 2021   [#14]
Blender (Blend) -->obj ---> SUbDiv / Create from File

The SudDiv native gives these 2 solids who are very near your original Blender object
There is no crease.
https://moiscript.weebly.com/uploads/3/9/3/8/3938813/2solids.3dm




From: Tommy (THOMASHELZLE)
2 Mar 2021   [#15] In reply to [#13]
Yeah, I see where you are coming from Michael.
People who are "raised" in NURBS have a very different mindset from those who come from Subdivision Surface modelling with polygons.

I think we can close this thread now.

Thanks anyway.

Cheers,

Tom
From: Frenchy Pilou (PILOU)
2 Mar 2021   [#16]
Even this always Blender (Blend) --> export OBj --> Native SubD / Create from file
no crease again!
https://moiscript.weebly.com/uploads/3/9/3/8/3938813/another_one.3dm




From: Michael Gibson
2 Mar 2021   [#17] In reply to [#7]
Hi Tom,

re:
> I'll also attach the blender file and the obj.

One problem is your .obj contains a high poly already subdivided result with gaps in it, it looks like this when loaded into Cinema4D for example:



The .obj file format does not have any method in it for storing edge weighting, so it isn't possible to transfer your edge weighted model directly to another application using that file format.

In the future I do want to support FBX format transfer for the sub-d importer in addition to .obj format, and FBX does have a way to contain edge weights.

Currently you will need to use some other solution than MoI though.

- Michael

Image Attachments:
obj_already_subdivided.jpg 


From: Frenchy Pilou (PILOU)
2 Mar 2021   [#18]
The File Blend exported in OBJ (from Blender) then Import by SubDIv / Create from a file don't resolve the problem ?

As Shown in my previous posts ?
From: Michael Gibson
2 Mar 2021   [#19] In reply to [#11]
Hi Tom,

re:
> You may be right, but when I remove the modifier in Blender before export, I
> get a different mess, but not a better one...?

Can you post the .obj file that you generated for this one?

When you export to .obj, the .obj file does not contain any edge weighting, there is not any facility in the .obj file format itself to store edge weights.

So there is not a way to transfer an edge weighted model using this file format. The .obj file that you generate where the edge weights have been stripped out will not generate your same shape in any application. There isn't a way for the receiving application to automatically know what your edge weights are, they are effectively discarded during the .obj export.

- Michael
From: pafurijaz
2 Mar 2021   [#20] In reply to [#19]
Hi Micheal about the storing edges in file format you can add in the next release the ability to convert also FBX that has the feature to store edges creases? or maybe at latest the use of edges sharp as edges creases in OBJ that store that data?
Thanks :)
From: Michael Gibson
2 Mar 2021   [#21] In reply to [#20]
Hi pafurijaz, there is not any method in OBJ format for storing edge weights. It's not part of the format spec. I do want to add support for FBX imports in the future though.

- Michael
From: Tommy (THOMASHELZLE)
2 Mar 2021   [#22]
Hi Michael,

you guys were right, I did it wrong the first time, but like I wrote, the "correct" (?) way also creates a mesh that seems to need a lot of additional work with manual clipping (not in this simple example, but in the production object).

Pilou, thanks, but your version creates a mesh with tons of control points and is very hard to deal with in the further process - and also not what I need in this specific case.

As for the endless mantra of "obj does not contain crease information": There are many ways around that limitation.
Either one can use "sharp edges" like pafurijaz wrote, use a different file format or have an editor on import where the user can add the weights manually.
But what I get from this discussion is a basic non-understanding of SubD and it's benefits when fully implemented, or at least a very limited interest in it.
We had that same discussion several years ago and got to the same point.

That is fine with me.

It's also somehow funny, since I heard the same from Rhino (and other CAD-) people for ages while they fumble around with crazy complicated workflows to create simple organic shapes with NURBS and now in Version 7 they rave about how SubD is a major breakthrough and "changes the way you work".
Yes, indeed...
The CAD world is just about 10-20 years late as usual...
Maybe one day MoI will do the same as Rhino does now, implement SubD as a native object format.

I personally am the other way around, I find NURBS a kludge that I only use when I have to. They have some specific technical benefits, but also massive drawbacks for organic design.
But that's a whole other can of worms...

As you were,

Tom

Attachments:
SubD_OpenEdges3.obj


From: pafurijaz
2 Mar 2021   [#23] In reply to [#21]
Nice for fbx, about obj the file format doesn't store creases but what I mean is the use of edge sharp as a trick because OBJ store in it the normal information for the smoothness shading like this image below, is something assimilable for the creases information inside that anyway Moi3D doesn't use in importing process. As can see in the images below these edges on the model are marked only because they are marked in the obj file format.
Anyway that aren't the right way,is only a compromise.
Anyway I'm happy with new feature in Moi3D I have the ability to convert complex hull without much works already with the v4 Thanks!

Image Attachments:
Schermata del 2021-03-03 11-32-06.png  Schermata del 2021-03-03 11-32-29.png 


From: Michael Gibson
3 Mar 2021   [#24] In reply to [#22]
HI Tom, ok but you are aware that MoI is a NURBS modeler, right? So that's what it is primarily focused on.

If you're not interested in NURBS modeling then I find it confusing why you are here.

Sub-D is definitely useful and has its place particularly for organic shapes but for example the shape you
posted earlier is very easily constructed using NURBS modeling:







The strong area of NURBS is with models that are well defined using 2D profile curves.With mechanical shapes
it's sub-d that becomes a horrible kludge, instead of just being able to drill a hole through something you have
to manage a sea of points and become an expert in topology. And even if you fight your way through all that at
the end you don't have any kind of precision control over how exact of a circle you've got. With NURBS you just
do this:




Sub-d has a significantly higher learning curve, it requires developing spatial awareness skills that are
more like sculpting and wrangling points in 3D space. Forming shapes from 2D profile curves in NURBS
modeling is significantly easier for people to learn when starting from scratch. That's the reason why MoI exists.


re:
> Maybe one day MoI will do the same as Rhino does now, implement SubD as a native object format.

Yes, that is something I'm slowly working towards. That's the reason why I added a SubD to NURBS converter
in for MoI v4, to open the door for a using a hybrid modeling approach using SubD to create some organic
elements like say the base form of a helmet and then continue working on it using the regular NURBS toolset
to construct other components from curves and add details using booleans.

The Sub-d converter is a step towards that, in the future I do expect to add some sub-d modeling tools directly
into MoI as well, at a kind of basic level for doing fairly lightweight base shapes.

- Michael

Image Attachments:
tom_nurbs1.jpg  tom_nurbs2.jpg  tom_nurbs3.jpg  tom_nurbs4.jpg 


From: Frenchy Pilou (PILOU)
3 Mar 2021   [#25]
<<< like in Blender a weight per edge between 0.0 and 1.0 for in-between semi-sharpness).

Seems this "weight" is something in Nurbs variable fillets...

Show messages:  1-5  6-25  26-31