[Plugin] OBJexporter v3.0 20130131

Re: [Plugin] OBJexporter v2.6 20120222

Postby NukeCreations » Wed Oct 03, 2012 11:19 pm

Thanks for the link, really helped!
0

NukeCreations 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Mon Oct 08, 2012 10:26 am

Here is v2.7 viewtopic.php?p=294844#p294844

Alpha now set as d= and Tr= for cross-platform compatibility.
Coords' d.p. increased for accuracy.
Option to Export 'Selection Only', if there is a selection.
Active_entities exported, allowing just the contents of a group/component being edited to be exported; or the whole model if the context is model.entities.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby andybot » Mon Oct 08, 2012 10:58 am

Thanks TIG!! Great to know you continue development on this one. This is a supremely useful tool for me. Many thanks.

Andy
0
my blog featuring recent projects
User avatar
andybot 
Premium Member
Premium Member
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby Judith » Mon Oct 08, 2012 4:58 pm

Hello,
I'm using Google SketchUp to do my final year project of computer science.
I'm using the plugin objexporter to translate Google SketchUp format. to Obj, but when testing with some models I have found that depending on the composition of the model is called a method or another plugin. In the case of 3dwarehouse http://sketchup.google.com/3dwarehouse/ ... revstart=0 model to run the plugin calls a method objexporter deprecated (Sketchup :: group) and the program ends without performing conversion. Is there a version that fixes this problem?

Thank You.
0

Judith 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Mon Oct 08, 2012 7:05 pm

It is not an error.
There is a known fault in the API as it assumes that there can only ever be one instance of a group in the model. However it is possible to have more that one. The group.copy method ought to make the copy and auto-uniquify it, but some rogue scripts have messed with group.copy so some tools use alternative methods to duplicate groups and then use .make_unique on them - this works fine... but puts a spurious error message up in the Ruby Console.
But I am surprised you get these errors...
If you get other errors please post them.

It can take a while to export a complex form, so be patient - the Task Manager will show SketchUp is still working even if its screen whites-out and it is 'not responding'...

I am going to try your model - Saint Basils in Red Square is hardly a simple thing to start with !

I got no errors...
One of the issues I can see is that there are some textured-materials that have been mapped in a distorted way. Because OBJ format only uses 3 UVmapping points/normals the images have to be distorted to map then satisfactorily by three-points, this produces many files for these faces [>1440] These can be too many for some renderers [like Octane] that take in OBJ format. BUT it imports fine back into an empty SKP, into Blender etc so the OBJ file is [relatively] fine... The texture on the round arches on the center tower are distorted :?
If I use the Pro OBJexporter it's similar - there's about half the texture image files [it reuses very similar ones...], but the over all appearance is similar... :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby small08 » Mon Oct 08, 2012 11:11 pm

This will go well with the new http://vivec3d.com/3d-ivy-generator-2012/ update. Now uses all cores!
0

small08 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby Judith » Tue Oct 09, 2012 8:39 am

Thanks for your answer TIG. I tested with the model and if the conversion does take long though. The problem I commented in the previous post I came up with a model downloaded earlier. I attached so that you can try. In that case, does not convert google sketchup and reports with an error message. In ruby console the message (sketchup :: group deprecated method).

In my final year project of computer science,run google sketchup from a program created by me. With some models perform well the conversion (a. Obj), but appears white screen error.. To what can this be? I need to check whether the execution was successful and that message makes the result may not be correct because the conversion has been performed and the error message has gone.

Thank you so much!
0

Judith 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Tue Oct 09, 2012 10:05 am

I looked at your latest Catedral SKP and see that there are several reversed faces, and single plane parts where the back face will not render properly as the back faces are not UVmapped, even if the renderer/importer used applied the front color to the back.
View it in Monochrome mode with the reversed faces in the Style set contracting as this example.
CatedralREVD[MONOCHROME].PNG
My FixReversedFaceMaterials tool helps you 'flip' such faces whilst keeping the UVmapping of any textures on the now-front face to match...

Don't get too hung up about the 'error' - actually it's a 'warning' and the process completes fine - make_unique should never be needed on a group BUT it is needed so the API's warning is just wrong - it has been like that for years !

You refer to the 'white screen error' - this is NOT an error - when SketchUp does intensive processing [can even occur with it's native tools!] it becomes 'unresponsive' and it 'whites-out' BUT it is still processing - as the Task Manager will show... If you ask SketchUp to process millions of facets, materials etc you must expect it to take a while to finish. My OBJexporter is written in Ruby which is hardly an efficient tool. The Pro equivalent OBJexporter is a binary app that executes faster, but still takes a long time to finish. The latest version of my OBJexporter lets you export a selection so this could be much quicker when testing SKP for export to OBJ...

If you want to check that the OBJexport has finished - within the SKP using Ruby you can check to see that the active tool has changed to 'Select' ? Otherwise from the outside you need to see that SketchUp has stopped using any significant amount of processing memory etc...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby sicksickisck » Tue Oct 23, 2012 2:14 pm

smoothing groups ??!! export
0
User avatar
sicksickisck 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Tue Oct 23, 2012 5:20 pm

sicksickisck wrote:smoothing groups ??!! export
Cryptic. :roll:
It does create 'smooth surface' normal maps, if the object's faces are themselves 'smoothed'.
However, hidden lines keep sharp change of plane.
Most rendering apps know how to use/display such 'smoothed surfaces'...
In what app are you using the OBJ file?
Does that app have 'settings'?
Can you post a small example zipped SKP/OBJ/MTL/Textures set etc showing what you think is the issue...

Note that importing any OBJ back into SketchUp will ignore the facets 'smoothing' - unlike most 3rd-party renderings apps etc...

It works for me... :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby sujunwei » Thu Oct 25, 2012 5:47 am

very brilliant job.
Is it possible to export obj file with all faces grouped based on their materials. for instance, all faces with color-0 are placed together, and then another color, and ...
something like
g pb-GRP-2609-Color_000
usemtl Color_000
v...
vn ...
vt...
f...

g pb-GRP-2670-Color_000
usemtl Color_000
v...
vn ...
vt...
f...

#//all other faces with Color_000 ...
#then another color, color_001 for instance, and all the faces with color _001 are placed together

g pb-GRP-2639-Color_001
usemtl Color_001
v...
vn ...
vt...
f...

#//other colors ...

That can be useful for some applications, for instance, using snappyHexMesh in OpenFOAM for general CFD(computational fluid dynamics) applications.
There should not be too much job it think, but it will facultate a large group of openfoam users. Would it be possible for you to add such a functionality in your next release? Thank you very much.
Best Regards, Junwei
0

sujunwei 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby tulacong » Tue Nov 06, 2012 4:46 am

thank TIG....very goog
0

tulacong 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby MidgeUre » Tue Nov 20, 2012 1:44 am

Thank you very much.
0
User avatar
MidgeUre 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby T_Osborn » Sat Nov 24, 2012 9:19 pm

Is it inevitable, technically speaking, that SU geometry Group and Component associations are lost when exporting to an OBJ file? What I tried to do was open a SU model (interior room scene) in Blender so as to try and work with Blender's rendering features. Discreet objects within the SU outliner--entertainment center cabinet, wall(s), floor, mouldings, plantation shutters--were no longer discreet objects in Blender's outliner. In Blender's outliner there was only a very long list of 'meshes'. The model/scene itself displayed properly in Blender's viewport. If I placed the cursor over what had been the 'cabinet' in SU, then clicked to select, only a single mesh among the many comprising the cabinet would be selected. There was no practical way to determine which among the hundreds of meshes in the outliner were those that comprised the cabinet exclusively, and so I could not select it individually so as to make material assignments (color, sheen, and all that).
0

T_Osborn 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Sat Nov 24, 2012 9:49 pm

Much as with the Pro OBJ Exporter the geometry [mesh] is broken down by 'loose/group/component/image' and then within each of those subdivided 'by material'. So if you have a box-component with a different colored 'lid', then the component's mesh is inside a single 'container' [named after the original object], and its two meshes are made with their respective materials. Nested objects' container naming reflects those containers...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby T_Osborn » Sat Nov 24, 2012 10:58 pm

TIG wrote:Much as with the Pro OBJ Exporter the geometry [mesh] is broken down by 'loose/group/component/image' and then within each of those subdivided 'by material'....


OK, I can see something of this now in Blender's outliner. After expanding the size of the outliner window, I do see that each mesh is identified as part of a component or group, or with the component name ('crown moulding') and material name. I just needed more screen space to reveal all of the text. I'm embarrassed, but Blender's interface is difficult for a modeling noob after a little time spent in SU.

I think I can more effectively combine the relevant meshes into the singular objects they were meant to be, but it still will be tedious.
0

T_Osborn 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby andybot » Sun Nov 25, 2012 2:40 am

T_Osborn wrote:
TIG wrote:Much as with the Pro OBJ Exporter the geometry [mesh] is broken down by 'loose/group/component/image' and then within each of those subdivided 'by material'....


OK, I can see something of this now in Blender's outliner. After expanding the size of the outliner window, I do see that each mesh is identified as part of a component or group, or with the component name ('crown moulding') and material name. I just needed more screen space to reveal all of the text. I'm embarrassed, but Blender's interface is difficult for a modeling noob after a little time spent in SU.

I think I can more effectively combine the relevant meshes into the singular objects they were meant to be, but it still will be tedious.


That's correct, the OBJ exporter organizes the model by material, so everything with a material, even if it's in different components or groups will come in as one "mesh" into Blender. If you want your component and group heirarchy to be maintained, the best way is to use the 3DS exporter that's available in the pro SU version.

Andy
0
my blog featuring recent projects
User avatar
andybot 
Premium Member
Premium Member
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby Lana » Sat Dec 08, 2012 7:16 am

God bless you . Thank you. :ecstatic:
0
User avatar
Lana 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby bomastudio » Tue Dec 18, 2012 4:56 pm

TIG: thank you for all the plugin you share with all of us!!!! :ecstatic:

A question: this plugin (well, OBJ format) can export cameras positions?
Thanx.
0
User avatar
bomastudio 
PluginStore Author
PluginStore Author
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Tue Dec 18, 2012 5:00 pm

No, OBJ format is for geometry only [faces] and their associated materials/textures.
Some formats like DXF include data on the camera.
There are some tools in the API to get a scene's view camera data, but after that it depends on the program into which you want to import that data, on how it can be suitably structured...
What did you have in mind ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby bomastudio » Tue Dec 18, 2012 5:12 pm

Well I need to bypass the Octane exporter (as I use Ubuntu/Lubuntu+wine+SkecthUp) and the webdialogs doesn't work no more (with SU6 webdialog worked....). So exporting in OBJ format I can solve model+texture troubles, but I need to export also the scenes (cameras).
0
User avatar
bomastudio 
PluginStore Author
PluginStore Author
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Tue Dec 18, 2012 5:22 pm

So this is an Octane based query... only peripheral to Sketchup.
There are already two tools available on the Octane Sketchup forum for licensed users.
You need 'OctaneOCMbatchExporter.rb' - the tools allow you to batch-export your scenes' cameras and suns/shadows settings into Octane OCM files, which can then be loaded and used as 'nodes' in the matching OCS file, that you have made from the SKP exporter via OBJ/MTL files etc.
That forum's thread is named "Batch Cameras / Suns OCM Exporter v1.0"
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby bomastudio » Tue Dec 18, 2012 7:01 pm

TIG, you are definitively the best source of info about SU!!!! thanx, how would I do without you? :D :D
0
User avatar
bomastudio 
PluginStore Author
PluginStore Author
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby eubz » Tue Dec 25, 2012 5:31 am

nice. i love this exporter.
0

eubz 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby sceptile » Sat Jan 12, 2013 11:23 pm

says the file can amage my computer?
0

sceptile 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Sun Jan 13, 2013 12:26 am

sceptile wrote:says the file can amage my computer?
Let us assume you mean 'damage'...
Who, what where, when, why and how ?
Yours might win this week's prize for the most useless error report / query... :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby sceptile » Sun Jan 13, 2013 8:27 am

and i cant find the plug in folder i have sketchup 8 free where is it? thanks
0

sceptile 
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Sun Jan 13, 2013 11:29 am

sceptile wrote:and i cant find the plug in folder i have sketchup 8 free where is it? thanks
Your questions get little clearer, and also show that maybe you aren't yet ready for using scripts...
There are extensive Sketchup Help files available to you.
For example under the Sketchup main menus Help > Learn About Plugins... opens a link which tells you exactly how to install Plugins etc...

Also you have not yet explained the '[d]amage' statement that you made earlier... :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby TIG » Sun Jan 13, 2013 11:29 am

TIG wrote:
sceptile wrote:and i cant find the plug in folder i have sketchup 8 free where is it? thanks
Your questions get little clearer, and also show that maybe you aren't yet ready for using scripts...
There are extensive Sketchup Help files available to you.
For example under the Sketchup main menus Help > Learn About Plugins... opens a link which tells you exactly how to install Plugins etc... Giving the full paths for PC and MAC,

Also you have not yet explained the '[d]amage' statement that you made earlier... :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] OBJexporter v2.7 20121008

Postby Sound » Fri Jan 25, 2013 7:50 pm

Hello TIG, thank you for writing such an useful plugin. I look forward for using it in a 3D printing workflow but I noticed two problems - the first one being more serious.

1. Draw a cube and export it as OBJ. It contains 16 triangle facets, but I would expect 12. If you inspect the generated OBJ you'll notice that it generated a tetrahedron inside the cube by triangulating the internal space. Hence the four more facets. I think this problem needs to be addressed. What do you think about it?

2. Resulting OBJ files contain lots of duplicate vertices. I think this is because you don't reuse vertices but you generate new ones all time. However this corrupts the topology of the generated OBJ file. If you open it with, say, Netfabb Studio Basic (a popular free utility for 3D printing) it will report all faces as unconnected. I don't know whether SketchUp API associates a unique ID with each vertex; in case it doesn't I think you could just build your own dictionary based on coordinates and check whether you already wrote that vertex and if so, just reuse its index when defining the new facet.

Thank you for your work, and I really hope you can fix these two things.
0

Sound 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: DDD13, multials and 6 guests

Visit our sponsors: