MoI discussion forum
MoI discussion forum

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

Show messages:  1-20  21-31

From: Tommy (THOMASHELZLE)
1 Mar 2021   [#1]
Hi,

I have a project coming up where I will model an object in Blender as Subdivision Surface with sharp creases and then want to convert the result to NURBS for further preparations for injection moulding and adding mechanical detail.

I did this in the past with Fusion 360s internal T-Splines, but would prefer to avoid Autodesk.
Rhino 7 came out a while ago and it does it perfectly, but I'd rather use MoI if possible and would update to version 4 in an instant for that feature.

The problem is, that open seams in the imported obj work for non-crossing edges very well, I could totally use the result.
But when there are three or more open edges, I get holes. This was an issue in the old importer for v3 already and seems to be exactly the same in v4?
So my question is: has anybody found a workaround or viable technique to get such edges/corners to work?
I wouldn't mind if I had to do a bit more work, but so far I didn't come up with a solution myself and didn't find anything with the forum search, although I guess it's a common problem.

I also tried the double-edge approach where each edge that needs to be sharp is comprised of two edges that have no distance to each other. That kinda works, but creates a rather ugly mesh.

What also semi-works is to subdivide the mesh with the creases very highly in Blender (like 5 SubD-steps), apply the SubD and import that fine mesh into MoI. Again, this creates sub-optimal heavy meshes.

Thanks for any pointers!

Tom

This is the result from Fusion/TSplines:


This is MoI with open edges:

Image Attachments:
FusionNURBSconversion.jpg  OpenEdgesNURBSconversionMoI.jpg 


From: Frenchy Pilou (PILOU)
1 Mar 2021   [#2] In reply to [#1]
without an example of OBJ file it's difficult to answer something elaborated! ;)
From: Michael Gibson
1 Mar 2021   [#3] In reply to [#1]
Hi Tom, there is an option under Options > Import/Export > SubD import options > Open boundares: "Smooth" or "Keep corners". Does setting it to "Keep corners" help?

The kind of model that you show would be something I'd recommend to build natively with NURBS instead of doing it as sub-d.

- Michael
From: Tommy (THOMASHELZLE)
1 Mar 2021   [#4] In reply to [#3]
Thanks Michael,

the option didn't really do anything useful, the image I posted actually is with "Keep Corners", with the "Smooth" option it's getting weird:


The reason for SubD conversion is, that I design with SubDs for a long time - it is my way of working for about 20 years since Lightwave came up with "Hypernurbs", then I used Softimage XSI and now Blender.
In theory I could rebuild the things I do with NURBS when I'm finished, but that would make iterations much slower and tedious.

Since this is a quite common thing, I thought I ask if I'm missing something, but I guess not... ;-)

Cheers,

Tom

Image Attachments:
OpenEdgesNURBSconversionMoISmooth.jpg 


From: Michael Gibson
1 Mar 2021   [#5] In reply to [#4]
Hi Tom, sorry I don't think the current converter is able to do what you want. It's primary focus is on importing smooth organic shaped sub-d surfaces.

If you can post an example file that does not convert as you need then that would be useful as a reference for future work for making it work with creases.

- Michael
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 :)

Show messages:  1-20  21-31