-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.obj exporter? #2
Comments
It would be even more handy if the OBJ could also/alternatively contain the (trimmed) NURB surfaces from the b-rep. Few people today know this but Waveront OBJ is perfectly capable of storing these (scroll down to Free-form curve and surface types). Among the apps that ingest such OBJs with higher order geometry are Maya and Rhinoceros 3D. I wanted to look into adding at least NURBS + trim curves support to Generating the |
I have moved the export format from Closing this for now since multi type export is not something I think the project needs. There are plenty of good converter tools. |
The point I made in this ticket, was having a way to export NURBS that is easier to implement than STEP. If you have a B-rep modeling tool, you want to have a way to export data as lossless as possible. For example, if I want to create CAM tool paths in something like Fusion360, your input data should not be a triangle mesh. Furthermore, if you mesh a surface, you can create a quad mesh and only use triangles sparsely, e.g. at trimmed edges. This has advantages if you want to further process the mesh to make it an asset in a game or VFX context, e.g. to be rendered as a Catmull-Clark subdivision surface. AFAIK 3MF only supports triangles. The whole point of using a B-rep modeler in the first place is moot then if all you can export are triangle meshes. |
The 3MF format is forward looking and moving to allow volumetric specification. At the moment its likely not very supported but I am not sure if OBJ B-rep is very supported either at this point. https://github.com/3MFConsortium/spec_volumetric/blob/master/3MF%20Volumetric%20Extension.md |
What matters most if the development flow. User experience if you prefer that term. B-rep vs SDF should be hidden from the user in a tool like this. It shouldnt matter. |
I think the misunderstanding comes from the fact that you assume people export from If I want to use a CNC to mill from a block of metal, plastic or wood, polygon meshes are the worst input geometry. If you come from a polygon modeler, you'd likely convert to subdivision surfaces or T-spline nets and then convert those to bicubic patches to get higher order geometry to feed into the CAM for the CNC. But when you come from a B-Rep modeler, like So the way to go is to offer OBJ export to trimmed NURBS (low hanging fruit) and then STEP (potentially a lot more work). Check out the To test OBJ files containing NURBS geometry you can use Maya or Rhino3D (both have test versions). |
@virtualritz from your experience. Would the BREP object file from Opencascade work or is it pretty non standard? https://dev.opencascade.org/doc/occt-6.7.0/overview/html/occt_brep_format.html |
STEP is kind of the industry standard for exchange of B-Rep data. It's to B-Rep data what OBJ (still) is to mesh data. The other one is IGES. As for STEP: hence my suggestion to look at the That said, I would still support OBJ, both for meshed geometry (especially if the mesher can produce n-gons instead of dicing everything into triangles) and for trimmed NURBS export. Simply because it is a vety low hanging fruit and the NURBS part is easy to verify via Maya or Rhino3D demo versions. They both read OBJ files containing higher order geometry. As a user, OBJ export should give me those advantages:
|
Looks like I am in the position where work could start on this. @virtualritz would you be able/willing to help with that development? |
I suspect we could implement it here: |
Cool! But maybe change the name of this crate so you can eventuall publish it on Format specs are in the section Free-form curve/surface attributes here. I can offer help like so: Sample FilesThese can be inspected to see how a (reasonably) well-formed OBJ containing these geometry types should look like.
I can contact different people for samples if you want to add STEP support, eventually. Testing
Code ReviewI can also look at code but I can't make any promises when or how much. I just started a new job and as such my spare time has become a scarce resource. |
Name may change later. Right now its not really intended for publishing. All the crates are pretty connected to dslcad themself. |
Here are the promised examples from Rhino. Sorry this took so long. A sphere and some CSG union operation between a sphere and a cube. Sadly, from the looks of it, Rhino does not export Maybe we have more luck with Maya data that contains attached (Maya lingo), trimmed surfaces. |
Would be handy to be able to export the meshes as something commonly supported by gamedev engines.
.obj seems suitable to the task, it's a very easy, human readable format. The only format perhaps more ubiquitous is .fbx, which is far less friendly.
.gltf is another good candiate.
Really any of these would open a gateway of silliness.
The text was updated successfully, but these errors were encountered: