Exporter wasting polygons?
-
Hi.
I've been using Sketchup Pro for a few years now, and have just started using it for a little bit of game development. Of course, due to this, a low polygon count is preferable.
Here is my issue. This is a simple mesh I made in Sketchup:
Now, when exporting to .3ds, this is how I would expect the mesh to be triangulated: Which would be 26 polygons.However, this is how Sketchup actually triangulates it when exporting: Which is 36 polygons and seems quite wasteful. I tried exporting to Obj and Fbx too with the same results.
Now obviously, the difference between 26 and 36 polygons really doesn't matter, but on a larger scale these extra polygons are going to start adding up.
I'm using Sketchup 6 pro at the moment. I did try Sketchup 7 when it was released, but I just didn't feel comfortable with it for some reason. So I stuck with Sketchup 6 since I was perfectly happy with it. Is this something which is improved upon in Sketchup 7? If it is I would be willing to upgrade to Sketchup 7. If not, does anybody know any free, or commercial exporters for sketchup which do a better job than the default exporters?
Thanks for any help and info.
-
I have the exact same problem and haven't found a solution so far. My problem is when I export my models to 3ds or obj the amount of polys increases so much SU cant cope and crashes, hence some of my best models have never been rendered. My only option is to assemble them bit by bit to max but that takes so long. Here is an example of a typical SU model ill make and assembling something this complicated in another program takes an eternity. If you do find a way to export using a third party app or similar please let me know it will be a lifesaver.
Thanks Liam
-
You could try using a ruby to triangulate the model before you export it: i tihnk there are a few out here, although im not sure if theyre any more efficient than the exporters triangulation.
-
This is a very likely (so to say "perfect") explanation, thanks Toxic...
Jordan; would this also happen if you separated every face into a group (as Toxic says) so the they don't weld with each other?
-
Its also the 'correct' thing to do.
Specifically, if you don't add real geometry at those points (known as "T-junctions"), you'll actually get gaps when rendering because of the way all renderers (realtime or offline) work.
Its an often misunderstood part of geometry conditioning that non-degenerate zero-area triangles are very useful to ensure a topologically sound surface.
Adam
-
I created an identical .skp and opened it in DoubleCAD then exported to .3ds and got exactly the same geometry.
But when I grouped each face and exported to .3ds I got exactly what you call showed as your expected 26 faces.
-- William
-
I suspect your issue may be caused by the following:
Because some of the smaller faces weld to the edges of the larger rectangles it creates additional edge vertexes. The SU geometry engine then no longer sees the large faces as rectangles (4 vertexes) but as multi-vertex polygons which requires a less efficient triangulation of triangles with collinear edges. It would add a lot of overhead for the algorithm to check if a multi-vertex (more than 4) polygon has the shape of a rectangle prior to to calculating triangulation so it employs a generic triangulation for a polygon with any number of sides and of any shape.
You could possibly solve the problem by creating a ruby processor that will iterate through the planar face entities and checks for collinear edges in polygons with more than 4 vertexes. If such a condition is found the processor should create a new face inside a group (to avoid welding with other edges), with only the vertexes that define the shape, (eliminate all collinear vertexes) and then delete the original multi-vertex face.
Theoretically this should solve your problem as the SU exporter will then triangulate between only the desired vertexes.
-
Thanks for all your replies.
I had thought of making each face a separate group, but on top of the impracticability of this, each group was being treated as a separate entity in the 3D engine I was using.
I tried this out with some other 3d modelling packages, and Sketchup was actually doing a just as good, or even better job than all the other software I tried. So with that, along with AdamB's reply, I'll accept this as normal and perfectly fine.
-
I think i understand what you are talking about. From following your advice ive managed to drastically reduce the poly count thanks all
Advertisement