Tips for OBJ/LWO export?
 1-3  4-23  24-32

Previous
Next
 From:  solex (DSOLITO)
3793.4 In reply to 3793.3 
I had a problem with a solidworks igs exported file. Some edges were "naked"
I changed the export to STEP and it was OK and in one solid. The scale of the model was too big but I didn't take attention because I use MOI just for solid > polygon conversion.
Before changing my file format, I tried to join my surface but with no luck. So the 0.005 limitation is probably the reason.
I will try it again (altough step seems to be the best format to import nurbs files from SW - no need to join surfaces during the import process).

Thank you again for this piece of soft. The mesh process is just fabulous!
(I bought earlier polytrans, but I don't use it anymore;-)

Hope to see a import process using multi-core/multi-thread cpu.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.5 In reply to 3793.3 
Hi jason,

> as I've only really had issues converting models
> from this same client.

Probably that one particular client is building things at a somewhat unusually large scale or they are using somewhat looser tolerance settings in the program that they are building it in, making gaps between pieces that are larger than MoI's join tolerance.

But in either case doing a scale down followed by join can help, because when you scale objects down the gaps between surfaces also shrink and once they get below 0.005 units then they should get joined when using the Edit / Join command.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.6 In reply to 3793.4 
Hi solex,

> Before changing my file format, I tried to join my surface
> but with no luck. So the 0.005 limitation is probably the
> reason.

Yup, probably that was the case. Probably it could have been joined after scaling the object down somewhat smaller.

It's kind of hard to just automatically increase the joining tolerance to something too large because that can cause edges to get joined together that should not be on parts that have lots of little pieces in them.


> (altough step seems to be the best format to import nurbs
> files from SW - no need to join surfaces during the import
> process)

Yeah probably STEP is better to start with. It does maintain the edge connection information in the STEP file so that avoids needing to do any joining.

Sometimes there can be other different issues with STEP files though, because STEP files only contain the 3D curves for the trimming edges and that leaves the UV space part of the trimming curves to be calculated by MoI, and in certain cases that can be a kind of difficult calculation.

So if it is possible I'd recommend requesting more than 1 file format from your clients, like both STEP and IGES files instead of only 1 format.

Unfortunately each format has its own kind of quirks so there is not 1 single format that is automatically guaranteed to be the best in every single case.


> Thank you again for this piece of soft. The mesh
> process is just fabulous!

You're welcome, I'm glad that it is useful for you!


> Hope to see a import process using multi-core/multi-thread cpu.

I use a library to do IGES, STEP, and SAT imports, so getting multi-core working for depends on support for that being added to the library. That might happen eventually but it may take a while.

But something that should happen sooner than that is improving the import process by making something like a progress bar so you can see what is going on rather than just having the screen frozen while it is busy working on the import.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
3793.7 In reply to 3793.5 
WHen i bring stuff over from another Cad/Cam package i use, even though it was set to "Inches" in the other package, it comes in as "Millimeters" and the object is very huge in the viewport... I first change the model back to inches and it drops back down to size again....

We have discussed this before Michael. Something about the other app (which I believe is working with mm as a native internal unit) that doesnt transfer over properly....

FYI
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.8 In reply to 3793.7 
Hi Burr, I kind of vaguely remember something about that, it was something specific to that one program right?

If you want to make me a sample file (just a box or sphere or whatever), I can take a look at it again just to make sure I'm not missing something on MoI's side with the units setting. Also it would be good to test it with a few other programs and see if they all see the units as being in mm as well or if they see inches...

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
3793.9 In reply to 3793.8 
Hi Michael... Yeah, pretty sure it is the other program.. I opened it in the demo of turbocad and it was mm also..

Here is a stp and an igs file of a default box at 2 inches... I think they are using harmoneyware translators too!

Some interesting observations...

BobCad is more of a cnc toolpathing program than a cad package.. It's viewport is primitive. I think it is more geared towards working with it's ucs system, integrating it with the toolpathing and output stuff..

They have a "part" system and a "default". Default is whats always set, and part is "current document". So you can change all kinds of settings and prefs on the current document, without affecting the next one you open.. It is also allowing opening a file I made, on your computer, and all the system prefs and units and such will change on your computer for that one file, then go back to default for next doc.. It's kindof like if I set a bunch of prefs in MoI.. Background color.. Line colors etc, etc.. Then you open my MoI file and all those background colors and prefs would be set in your MoI...It's kindof shocking and wierd when you open a file from some guy that likes "pink for Solids" lol

WHen I change the unit system in BobCad, the "VIEWPORT AND UCS GRID" change.. The object doesnt change... (In moi, the object is actually changed/scaled)

In BobCad, the units are set to whatever the default system units are set at.. Almost like "no unit specified in the file?"...So I can open either of these as whatever my systems units are set at....

I know... It's kindof odd...

Anyway, thanks for looking...

EDITED: 19 Jun 2012 by BURRMAN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.10 In reply to 3793.9 
Hi Burr, thanks for posting the sample files. I tried importing them in a couple of other programs too, like Alibre, Rhino, and ViaCAD, and all give the same results with seeing the file's units as being in mm.

So as best I can tell, that's just something that BobCAD decides to do, it seems to decide to only want to write IGES and STEP files with millimeter units instead of what your current BobCAD units are. Maybe there is an option in there somewhere to tell it to stop doing that and use your current units instead of only mm?

Anyway, it's not actually particularly harmful because like you said it actually preserves the proper size of your object. It wrote out your box with 2 inch sides as a box with 50.8 mm sides, and 2 inches does equal 50.8 mm, so the actual size is still maintained.

> (In moi, the object is actually changed/scaled)

Yeah, there is a setting for this so you can decide if you want objects scaled numerically when units change or not so as to maintain the same physically measured size. That's under Options > General > "Unit options" button.



Another way you can do things if you like is to use File > Import to bring the file in, rather than using File > Open.

When you "Open" a file, it means that you are also bringing in some settings from that file like the unit system that it was using.

But when you "Import" a file, it will keep your current settings (and other geometry as well) intact and if the imported file is in different units it will scale it into the current unit system (unless you turn off the option for doing that, it's also under Options > General > "Unit options" button).

So for example if you start up MoI, then set your units to Inches, then do a File > Import of one of your example files there, you will then end up with a 2 inch cube and won't need to alter any units setting since the imported geometry will adapt to your current unit setting rather than the setting being changed.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Micha
3793.11 In reply to 3793.10 
Hello Michael,

I hope it's ok to jump in this thread. Could you create an option that allow meshing like surfaces are joined? Maybe something like an internal join is done, but the created mesh is without additional "joins". It would be a dream. From time to time I run in the problem, that I mesh an object what needs different materials at different parts of the object. My current workaround is: I joint the object, mesh it and extract the needed mesh parts in Rhino again.

Micha

Visualisation for Designer and Architects | http://www.simulacrum.de
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
3793.12 In reply to 3793.10 
Hi Michael,
"Import" does indeed bring it in as inches!!! (I would have sworn I tested everything...:o)

Thanks for looking and the help..
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  solex (DSOLITO)
3793.13 
Hi Michael

>But something that should happen sooner than that is improving the import process by making something like a progress bar so you can see what is going on rather than just having the screen frozen while it is busy working on the import.

It was my request in the french forum. Happy to see that it is in the pipe.

By the way, were do you find time to reply to all of us and continue programming?
Are you alone? Did you receive some request from big companies to buy yours?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.14 In reply to 3793.11 
Hi Micha,

> Could you create an option that allow meshing
> like surfaces are joined?

That would be difficult to do it that way, because joining is a quite intensive process, there is a lot of searching and distance measurement that happens in joining, because you can't just join any 2 naked edges together, you only want to have edges that are close by each other to get joined. That determination involves a lot of calculation.

So that's why joining is a separate process from meshing.

But if I understand what you want, you can use the already existing weld option to do what you need.


> Maybe something like an internal join is done, but the
> created mesh is without additional "joins".

You can turn off the welding option to make the generated mesh work like that. The option is here:



When you have a joined object, if you uncheck that "Weld vertices along edges" option, it will still produce a watertight no-crack mesh but the mesh will be clustered into separate non-connected (non-connected in a topological sense, but actually physically touching in location) sets of vertices with one set for each original surface. This will then allow you to use your polygon modeler's mesh processing functions to separate the mesh into individual objects.

In Rhino v1 there was a command called ExplodeMesh which would do this job of breaking a mesh into separate objects, with one object for each connected cluster of vertices. This seems to have been removed in later Rhino versions though, and I'm not sure if there is a replacement for it. The regular Rhino Explode seems like it will do it for meshes that have sharp edges in it (but then making a group out of the pieces??) but not if the pieces are smooth where they are next to one another or something like that.


> It would be a dream. From time to time I run in the
> problem, that I mesh an object what needs different materials
> at different parts of the object.

Yes, that is a major limitation of Rhino that it does not allow you to easily select individual faces out of a joined solid and apply different materials to them.

MoI itself does not have this limitation - you can select faces within a solid in MoI and apply different styles to them, and those will become different material assignments when you export to OBJ format.

- Michael

EDITED: 30 Sep 2010 by MICHAEL GIBSON

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.15 In reply to 3793.13 
Hi solex,

> By the way, were do you find time to reply to all
> of us and continue programming? <....>

Well, it helps that I type fast! :)

But actually answering questions in the forum is an important method for my information gathering which ultimately guides the programming. It helps me to understand what things people are getting confused by and what features in particular would help out the most.

I know it may sound strange, but it can actually even be helpful for programming to go more slowly in some ways. One of the ways that software can get messed up is if it gets a lot of stuff built along a certain direction and then later on with a large body of stuff it is hard to change that direction or change some of the initial assumptions and stuff like that.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.16 In reply to 3793.11 
Hi Micha, also if you can't find a way in Rhino to break a mesh apart into connected pieces, you can use this utility instead:

http://moi3d.com/download/SeparateOBJ.zip

To use that, export your joined objects from MoI to an OBJ file but make sure to turn the welding option off.

Then run that SeparateOBJ.exe utility on that file, and it will edit the OBJ file to break it into chunks like that.

Then when you load it into Rhino after that, you will have a watertight mesh without cracks but with a separate mesh object for each original surface in the solid.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jason
3793.17 
Thanks for all the tips, guys. They've helped me get much cleaner meshes into Lightwave.

However, I'm still having some issues with some of the objects. When pulled into Lightwave Modeler, the object looks generally fine (except for the fact that I get a very large number of flipped polys initially).



When I do a quick, no-frills render though, I get this:



There's all kinds of odd tearing and gapping, but only upon render.

Does anyone have any idea what might be causing this?

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.18 In reply to 3793.17 
Hi jason,

> (except for the fact that I get a very large
> number of flipped polys initially).

This could mean that you've still got pieces that have not been joined to each other.

What happens if you run the "select naked edges" script that was posted previously in this thread (here: http://moi3d.com/forum/index.php?webtag=MOI&msg=3793.2), do any of the edges highlight? If so then that means those edges are not joined edges between 2 pieces.

Or another way this can happen is if your object is not a completely closed solid - when an object does not define a completely closed sealed volume, it can possibly have polys oriented in either direction, it's only for closed solids that polygons will automatically be oriented to the outside of the object. You can use the Flip command in MoI in cases like this to reverse the positive normal direction for an object that is not a closed solid. But also it can be easiest if you just turn on double-sided rendering so that it doesn't make any difference.


> There's all kinds of odd tearing and gapping, but only upon render.
>
> Does anyone have any idea what might be causing this?

It's a bit hard to see the artifacts clearly, could you zoom in one one area there to show them a bit better? Are they actually holes, or is it a problem with shading?

Shading problems could be from problems with vertex normals or sometimes from self-shadowing artifacts. Do they go away if you turn off shadow rendering?

Could you possibly post (or e-mail to me at moi@moi3d.com) a small part of the model where you've got those artifacts happening so I can examine the geometry?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.19 In reply to 3793.17 
Hi Jason, also which version of LightWave are you using?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jason
3793.20 In reply to 3793.19 
I'm using 9.6, Michael.

I'm away from my machine at the moment, but I will supply you with a little more detail shortly...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jason
3793.21 In reply to 3793.18 
Hmm. So in cutting off a piece of geometry for you to sample, I've encountered something very strange:

I selected a piece of the original model, deleted the rest, and did a save as. When I went back to open my original, I now have two instances of almost every face in the object. I have to delete them manually as far as I can tell, although I really hope there's a way to collapse/merge them. In fact, I just reopened the piece I trimmed out and it ALSO has two faces where there should be only one. What could possibly cause that to happen?

Here's a screen shot - the clipping you see is the faces on top of one another:



I've also attached the LWO, the 3DM, and a render of the artifacts I'm getting.
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jason
3793.22 In reply to 3793.21 
Here's the full original model that's now causing me problems if looking at that one is of any help.
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3793.23 In reply to 3793.21 
Hi Jason, my guess is that those rendering artifacts are probably a side effect of the surface duplication - when you get polygons stacked up on top of each other like that it can cause rendering problems with the rendering thinking that some of the polygons are shadowing other ones.

Some areas of the model seem to have even more than just 2 pieces stacked up, I just saw one spot that had 4 stacked up pieces.

It's hard to tell at this point if that duplication was in the original IGES file, or if it was some side effect that happened when attempting to join the surface pieces in the original IGES file together. One way you could tell about this part would be to turn off the automatic joining that happens with IGES importing (that's under Options > Import/Export > IGES options > "Join surfaces on import"). If you have that turned off, when you import the file do you get stacked up pieces or no stacked up pieces?



Also I've attached here a tuned up version of your sample piece, where I have removed the duplicate surfaces and have just single surfaces all joined together. Could you please test exporting and rendering this version and see if your render issues are solved with this version? If so then that would definitely pinpoint that it is the duplicates that are causing the rendering artifacts that you are seeing (most likely in relation to raytrace shadow calculations during the rendering, that's probably why you don't see them in the real-time view since its not doing shadows there), and if that's the case I can then help you to clean up the full model.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-3  4-23  24-32