Page 1 of 1

Display of flat surfaces in imported 3DS models

Posted: Tue Feb 16, 2016 7:23 pm
by quercus
I've only just found ZGE, and I am amazed at the results with such small EXE files. Thanks for this!

I am trying to make a small Windows program, which would show, rotate and zoom 3D models of some products. Models are originally in SolidWorks format, exported as SLT, then converted to 3DS format using MeshLab.

The problem is that in ZGE the view shows each flat surface as a combination of many triangles (the view MeshLab calls "smooth").

I would like it to show a uniform flat surface (the view MeshLab calls "flat").

Please see the attached files, e.g. the surface with three holes. I added a wireframe view to clarify the model.

I am not using any textures so far.

Am I doing something wrong? Is there some other property I should check, or is the problem in my models?

Sorry if I ask basic questions (I am new to ZGE, with no experience in 3DS or similar).

Re: Display of flat surfaces in imported 3DS models

Posted: Tue Feb 16, 2016 7:24 pm
by quercus
Here's the project tree, with material properties shown, and the EXE file.

Re: Display of flat surfaces in imported 3DS models

Posted: Tue Feb 16, 2016 8:58 pm
by Kjell
Hi quercus,

This is a know bug in the 3DS importer of ZGameEditor. In order to work around it you need to make sure that hard edges don't share any vertices. So for instance when you have a cube with hard edges, each face needs to have its own vertices .. which means that the corner vertices can't be shared ( see below ).

Image

Most 3D applications have a modifier to split hard edges, so you should be able to do this relatively easily .. but it's pretty annoying that this bug hasn't been squashed yet.

K

Re: Display of flat surfaces in imported 3DS models

Posted: Tue Feb 16, 2016 11:12 pm
by quercus
Hi Kjell,

That was fast.

I understand. I will try to solve it in MeshLab, where I export to 3DS.

I also need to solve the loss of colors (associated with various materials) while converting SolidWorks -> SLT -> MeshLab.

Thank you very much!

Re: Display of flat surfaces in imported 3DS models

Posted: Tue Feb 16, 2016 11:39 pm
by Kjell
Hi quercus,
quercus wrote:I will try to solve it in MeshLab, where I export to 3DS.
In MeshLab you can use the "Cut mesh along crease edges" filter from the "Normals, Curvatures and Orientation" menu. Judging from the screenshots you posted i'd recommend trying a "Crease Angle" of 80 degrees.

K

Re: Display of flat surfaces in imported 3DS models

Posted: Wed Feb 17, 2016 7:31 am
by quercus
Thanks Kjell!

Tried to do that. I get the following message:
Failure of filter: "Cut mesh along crease edges".
Mesh has some not 2 manifold faces, this filter required manifoldness.
Then I tried selecting (Filter->Selection->Select non Manifold Edges and Filter->Selection->Select non Manifold Vertices), but nothing is selected.

Any ideas?

Re: Display of flat surfaces in imported 3DS models

Posted: Wed Feb 17, 2016 8:44 am
by VilleK
Kjell, I guess the original problem is that the normals are wrong? I'm not sure how to solve this properly in the 3ds-importer because 3ds-files does not contain normals. Maybe it is time to make a obj-file imported because that almost seems simpler than trying to recreate normals from 3ds-files.

Re: Display of flat surfaces in imported 3DS models

Posted: Wed Feb 17, 2016 10:40 am
by Kjell
Hej Ville,
VilleK wrote:I'm not sure how to solve this properly in the 3ds-importer because 3ds-files does not contain normals.
The bug i'm referring to is that the importer doesn't deal with hard-edges between smoothing groups properly. A single vertex that is used by multiple faces which don't share smoothing groups should result in multiple vertices with individual normals.
VilleK wrote:Maybe it is time to make a obj-file imported because that almost seems simpler than trying to recreate normals from 3ds-files.
Compared to converting normals ( Maya / Blender etc. ) to smoothing groups ( 3DS ) and then back to normals ( ZGE ) it does make more sense to use a format that supports normals to begin with yes :wink:

K

Re: Display of flat surfaces in imported 3DS models

Posted: Wed Feb 17, 2016 3:57 pm
by quercus
Just to inform you all that Kjell's workaround solved the problem on almost all of my models. The rest will have to be dealt with prior to MeshLab conversion.

Thanks all!