have an OBJ with a Hole?

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

have an OBJ with a Hole? // SDK, Plug-in & 3rd Party Area

1  2  3  |  

Post by jamesmc // Feb 27, 2009, 5:28am

jamesmc
Total Posts: 2566
Here's a beautiful geodesic sphere that has been booleaned. Beautiful in the sense that the mesh reacts from geodesic to a modified look after taking a subtracted boolean.
Note: From Hexagon

Post by frootee // Feb 27, 2009, 7:04am

frootee
Total Posts: 2667
pic
thanks james. this one turned out better than the cube.

But there are still some issues. Not sure what's going on as of yet, but we'll get it. :D

Post by Asem // Feb 27, 2009, 7:15am

Asem
Total Posts: 255
I'm not sure if this will help but I remember source code that I used when loading a .obj file .The coder used a mod 3 condition to determine if the indices were in triplets (for triangles) and otherwise for quads (since it should be one or the other). I'm not sure since I haven't read the spec completely (I need to write an importer myself for a different project).

Post by frootee // Feb 27, 2009, 7:30am

frootee
Total Posts: 2667
pic
thanks Asem.


The issue is, each face in the file has to be triangulated.

But, some of the triangles are not appearing. So if you have a square face, you'd expect 2 triangles. But in some instances there is only one triangle. The other triangle is simply not there.


EDIT:

But using the Model side File->Load works ok.

Post by jamesmc // Feb 27, 2009, 7:52am

jamesmc
Total Posts: 2566
A cube from Hexagon with a "thickness" algorithm added after a cylinder was boolean subtracted. Shown in tS with model side OBJ LUUV import.

Post by RAYMAN // Feb 27, 2009, 7:53am

RAYMAN
Total Posts: 1496
pic
Heres one from me its got ngons and lots of holes and is a shell !

Post by jamesmc // Feb 27, 2009, 8:04am

jamesmc
Total Posts: 2566
Cube booleaned from Cube (CubefromCube). Shown in LUUV OBJ import.

Post by frootee // Feb 27, 2009, 8:06am

frootee
Total Posts: 2667
pic
thanks guys.

I am using Professorkaos's Vertex lister to analyze the data.


I used james's cube object, and imported using the WS OBJ importer, and the Model side standard File->Load option.


I have the same number of faces and vertices, but the vertex data is different. That's a no brainer eh?


SO.... we have:


the right number of faces.

The right number of vertices.

And the vertices have the wrong coordinates.


I ran into this earlier I think.

Post by RAYMAN // Feb 27, 2009, 8:09am

RAYMAN
Total Posts: 1496
pic
Heres another one with many holes from Sketchup Pro with the obj exporter..

Post by jamesmc // Feb 27, 2009, 8:11am

jamesmc
Total Posts: 2566
thanks guys.
I am using Professorkaos's Vertex lister to analyze the data.

I used james's cube object, and imported using the WS OBJ importer, and the Model side standard File->Load option.

I have the same number of faces and vertices, but the vertex data is different. That's a no brainer eh?

SO.... we have:

the right number of faces.
The right number of vertices.
And the vertices have the wrong coordinates.

I ran into this earlier I think.

Not being a programmer, but I noticed that model side uses a "normalized location" when it imports data.

Would this make a difference on the WorkSpace side if it imported to other than normalized location?

Post by RAYMAN // Feb 27, 2009, 8:21am

RAYMAN
Total Posts: 1496
pic
Heres something big to import......lots of polys from Sketchup with the obj

importer with colors....

Post by frootee // Feb 27, 2009, 8:27am

frootee
Total Posts: 2667
pic
Hm could be James. I'll look into it.


Thank you Rayman!

Post by frootee // Feb 28, 2009, 3:57pm

frootee
Total Posts: 2667
pic
Ok here's Rayman's building, converted to RsObj.

The plugin does not work with materials yet.


I do not see any missing triangles but please feel free to look for them.


thanks!


Froo

Post by frootee // Mar 3, 2009, 9:54am

frootee
Total Posts: 2667
pic
Thank you everyone for donating some test meshes.

I had an issue with the importer but it's been resolved. I had a problem with the scope of 2 variables. They were hanging around longer than I intended, so some of their data was getting reused, for multiple faces. NOT GOOD. BAD.


I reran some of the meshes through the OBJ Importer. Here are the results. Currently no material support is available but that will change soon, now that I solved this variable scope issue.


James, I am not sure what is going on with the testskptots OBJ file. It got flattened to a pancake. :confused: More like a French crepe.

I'll look into that.

Post by RAYMAN // Mar 3, 2009, 11:18am

RAYMAN
Total Posts: 1496
pic
Frootee I tried your mesh and it does not come in the same as it should

withthe luuv plus it does not transfer to the model side its gone plus it

does not render correctly try it out the way i did...:confused:

Post by frootee // Mar 3, 2009, 11:24am

frootee
Total Posts: 2667
pic
Thanks Rayman.

I think it currently looks funky because I am not including the vertex normal data yet. I was trying to resolve another problem. Thank you for pointing this out.


I need to add some code which exports the ObjMatrix connector on the Transform node. That will allow you to see the object on the Model side. For now, if you want, you can enter the node in the LE, and export the ObjMatrix connector manually. I will get that fixed shortly thanks. :)


It's still got work to do but I finally resolved a bug today. :D

Post by RichLevy // Mar 8, 2009, 12:03pm

RichLevy
Total Posts: 1140
pic
Heres one from me its got ngons and lots of holes and is a shell !


Did you send him a geosphere, I was thinking about it but figured that might just be too cruel :D


Rich

Post by RAYMAN // Mar 8, 2009, 12:50pm

RAYMAN
Total Posts: 1496
pic
No a geoshphere isnt cruel becase its got flat ngons.....

I sent him curved ngons...... thats a problem as it looks like

Post by RichLevy // Mar 8, 2009, 12:57pm

RichLevy
Total Posts: 1140
pic
It would have been if all of the faces had been step extruded thru. Those buildings are a great test though, if they come thru with textures and all faces you should be pretty darn solid.



Rich

Post by frootee // Mar 8, 2009, 1:00pm

frootee
Total Posts: 2667
pic
I tried it; looks pretty good; but the shading needs work. I have the same issue

as with the building.

Post by frootee // Mar 8, 2009, 7:17pm

frootee
Total Posts: 2667
pic
Frootee I tried your mesh and it does not come in the same as it should

withthe luuv plus it does not transfer to the model side its gone plus it

does not render correctly try it out the way i did...:confused:


Hi Rayman.


On workspace side, select the dual building object, and choose Facet Normals.


The building should then look more like the LUUV import.

Please let me know what you find.


Thanks!


Froo

Post by RAYMAN // Mar 8, 2009, 11:52pm

RAYMAN
Total Posts: 1496
pic
Frootee !

Yes it does change it to what I had with the luuv import ....

It looks like it at least..:D

Peter

Post by frootee // Mar 9, 2009, 4:03am

frootee
Total Posts: 2667
pic
Cool thanks for checking.

Clintonman suggested it.

I need to add this to the code to do it for us automatically.

Post by frootee // Mar 10, 2009, 12:29am

frootee
Total Posts: 2667
pic
normal import is done.
next up: materials

Post by stan // Mar 10, 2009, 5:11pm

stan
Total Posts: 1240
pic
way to go Froo :banana:

Post by frootee // Mar 10, 2009, 5:55pm

frootee
Total Posts: 2667
pic
thanks stan! :D


I'm looking forward to your Layerz plugin too! That will be so cool! And it is

a very needed feature in Workspace. :)

Post by jamesmc // Mar 10, 2009, 6:29pm

jamesmc
Total Posts: 2566
You da man froo!

Layerz?

Are we gonna get a PSD compliant layers exporter with it for post processing?
:D

Post by frootee // Mar 11, 2009, 3:53am

frootee
Total Posts: 2667
pic
Thanks James :)

Post by frootee // Mar 11, 2009, 4:55am

frootee
Total Posts: 2667
pic
Rayman,

could you triangulate your double building within sketchup, then export to OBJ and repost here?


Thanks!


Froo

Post by RAYMAN // Mar 11, 2009, 8:13am

RAYMAN
Total Posts: 1496
pic
There is no function in Sketchup to triangulate because the software builds in triangles and exports in triangles ... so no triangulate function.

all you can do is ad or take away softness to the triangled mesh if

you have rounded shapes.:)

sketchup has gota triangulate all function upon export though and I did an export with that function...
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn