OBJ+STL import export

Plugins linking to this thread: (hide)

STL/OBJ Import/ExportAuthor: Reinhard Claus
v 2.0 updated Nov 2017 with material support for OBJ using a simple user extensible renderer API (via callbacks) This addon was developed with the intention to speed up the export of OBJ files which is rather slow using the Softimage factory exporter with >1mil polygon meshes. It was extended to support OBJ import, as well as STL export and import (ASCII/binary) which is becoming more popular as an exchange format due to 3D printing.

Features support for OBJ vertex colors (ZBrush polypaint) and weights (ZBrush masking), remembers last used folder. Available on github.

Also includes a PLY importer in an alpha release (not 100% stable and does not support all possible PLY property elements).

local backup:AdditionalFileFormats.xsiaddon

Discussions concerning plugins for SOFTIMAGE©
Post Reply
User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

OBJ+STL import export

Post by rray » 01 Jun 2017, 22:04

I've been needing a faster OBJ export lately, so I wrote this exporter&importer for OBJ, and thought I'd share that.

It supports zbrush polypaint and painted mask (note: zbrush does now import polypaint too)

Also ex&imports STL binary and ascii, and imports PLY (latter experimental, unstable)

see https://github.com/specularity/softimage/releases

requires a restart
Last edited by rray on 02 Sep 2019, 13:33, edited 1 time in total.
Reason: zbrush does now import polypaint too
softimage resources section updated Jan 5th 2024

User avatar
mc_axe
Posts: 415
Joined: 12 Mar 2013, 18:44

Re: OBJ+STL import export

Post by mc_axe » 02 Jun 2017, 20:43

Thanx rray nice addition :ympeace:

User avatar
ActionArt
Posts: 853
Joined: 25 Nov 2010, 18:23
Location: Canada

Re: OBJ+STL import export

Post by ActionArt » 05 Jun 2017, 18:10

Thanks rray! I'll give that a try. You're previous .stl importer has worked perfectly and very fast.

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: OBJ+STL import export

Post by rray » 21 Nov 2017, 02:29

Version 2
- progressbar fixes
- obj format should be much faster now (uploaded a debug version of the dll by accident last time resulting in >50% speed drop)

https://github.com/specularity/softimage/releases
softimage resources section updated Jan 5th 2024

User avatar
FXDude
Posts: 1129
Joined: 19 Jun 2012, 21:59

Re: OBJ+STL import export

Post by FXDude » 21 Nov 2017, 20:00

That's pretty useful ! Both for fast OBJ in/out, and making STLs, or importing some that are around!

Wonder if Vitaly Bulgarov is roaming around, he'd be delighted to have his import export hotkeys use that instead! ( As well as SItoOctane if not already using that )

User avatar
mc_axe
Posts: 415
Joined: 12 Mar 2013, 18:44

Re: OBJ+STL import export

Post by mc_axe » 21 Nov 2017, 22:13

Hello rray thnx for the upgrade, the obj exporter is crazy fast: 10,5 mil trs mesh about 45s :-o
Default exporter after 2m30s still on 20% , at 4 mins progress bar disappear not responding etc. If i dont touch it it might do the job in 10 mins who knows. ~x(

Now tbh so far i never used your import is the first time i try it :
OBJ default importer on same mesh did 1m41s, addon 2m08s
Also i found an obj that crashes with it :-??

Still thanking you for stl import/export gr8 job

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: OBJ+STL import export

Post by rray » 21 Nov 2017, 23:12

Glad to share that stuff! @FXDude I was wondering the exact same thing while watching the gnomon talk!

Then again he's using it for subd modeling mostly, which maybe isn't that heavy. From the talk I got that he uses the Octane standalone, and is swapping out object files. The plugin is really powerful, and he could add hair to his models now what a nice combination :D

@mc_axe the default exporters were developed before they added the fast import/export API, I wonder why they were never updated with that.

Is it my importer crashing btw or the default one? If it's mine I wonder could you pm me the file or any other file that crashes it?
softimage resources section updated Jan 5th 2024

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: OBJ+STL import export

Post by rray » 22 Nov 2017, 00:21

just fixed an 1 off error when reading obj which broke polypaint import. Might have caused the crash too. All links are updated
--------
mc_axe's crash was because of a bug in my importer. when the obj files contains a whole scene with some objects that have uvs, and some that don't then i crash. working on a fix
--------
should be fixed now
Last edited by rray on 24 Nov 2017, 02:09, edited 2 times in total.
softimage resources section updated Jan 5th 2024

User avatar
thefoofighter
Posts: 16
Joined: 21 Jan 2019, 16:56
Location: ZA

Re: OBJ+STL import export

Post by thefoofighter » 30 Aug 2019, 00:11

Hey, I don't mean to necro a thread here but just incase someone else has the same issue I had with the plugin I will post my fix here.

I had an error when trying to export an STL file which read:
// ERROR : Object doesn't support this property or method
I fixed it by changing the line 498 from

Code: Select all

bExportBinary = (GetValue("preferences.File Format Options.STL_Format") = 0);
to

Code: Select all

bExportBinary = GetValue("preferences.File Format Options.STL_Format");
Not sure why this caused an issue but no matter, I am relieved to have a workaround

https://github.com/ReinhardC/softimage/issues/1

May help someone someday :)

luceric
Posts: 1251
Joined: 22 Jun 2009, 00:08

Re: OBJ+STL import export

Post by luceric » 30 Aug 2019, 03:28

it was probably meant to be bExportBinary = (GetValue("preferences.File Format Options.STL_Format") == 0);
which, if that's correct, would be the oposite of your fix

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: OBJ+STL import export

Post by rray » 30 Aug 2019, 14:08

Thanks for the heads up (and using the plugin) !
Indeed "==0" as luceric mentioned. Fixed it at some point but didn't upload any new releases after that!

(new release is uploaded now)
Last edited by rray on 30 Aug 2019, 18:11, edited 1 time in total.
Reason: new release
softimage resources section updated Jan 5th 2024

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: OBJ+STL import export

Post by rray » 30 Aug 2019, 18:24

Btw the last version also supports replacing the selected object when importing obj and stl

The selected object stays the same scene object, but internal geometry is switched to the one from the file. This could be useful if the object is used in an ICE trees etc as this would require no changes to the scene.
softimage resources section updated Jan 5th 2024

User avatar
thefoofighter
Posts: 16
Joined: 21 Jan 2019, 16:56
Location: ZA

Re: OBJ+STL import export

Post by thefoofighter » 31 Aug 2019, 22:34

Thank you for the fix :) looks good now. ^:)^

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: OBJ+STL import export

Post by rray » 11 Jan 2020, 23:08

Just updated this plugin. Point order is kept now when importing OBJ. The importer can be used to import zbrush meshes, rig & pose in XSI, then send back to zbrush as a base mesh without GoZ.

https://github.com/ReinhardC/softimage/releases
softimage resources section updated Jan 5th 2024

User avatar
blaxxun
Posts: 48
Joined: 04 Mar 2014, 13:23
Location: Austria
Contact:

Re: OBJ+STL import export

Post by blaxxun » 03 Apr 2020, 10:29

Super addon, danke!
Thanks a lot! :D

opoppopopp
Posts: 168
Joined: 16 Jun 2009, 06:23

Re: OBJ+STL import export

Post by opoppopopp » 31 May 2020, 00:05

rray wrote: 11 Jan 2020, 23:08 Just updated this plugin. Point order is kept now when importing OBJ. The importer can be used to import zbrush meshes, rig & pose in XSI, then send back to zbrush as a base mesh without GoZ.

https://github.com/ReinhardC/softimage/releases
This + PolyPaint support saved my day!
Thank you :-o
BTW. sometimes polypaint not working by default, I have to append that just exported obj, project only colour on it(they are exactly same polygon), and export again, and it work...probably my own fault.

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests