Display of flat surfaces in imported 3DS models

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
quercus
Posts: 5
Joined: Tue Feb 16, 2016 6:35 pm

Display of flat surfaces in imported 3DS models

Post 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).
Attachments
snapshot02-smooth.png
snapshot02-smooth.png (52.96 KiB) Viewed 10637 times
snapshot01-flat.png
snapshot01-flat.png (10.5 KiB) Viewed 10637 times
snapshot03-wireframe.png
snapshot03-wireframe.png (19.74 KiB) Viewed 10637 times
quercus
Posts: 5
Joined: Tue Feb 16, 2016 6:35 pm

Re: Display of flat surfaces in imported 3DS models

Post by quercus »

Here's the project tree, with material properties shown, and the EXE file.
Attachments
project_tree.png
project_tree.png (47.41 KiB) Viewed 10636 times
part.viewer.zip
(52.4 KiB) Downloaded 383 times
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Display of flat surfaces in imported 3DS models

Post 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
quercus
Posts: 5
Joined: Tue Feb 16, 2016 6:35 pm

Re: Display of flat surfaces in imported 3DS models

Post 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!
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Display of flat surfaces in imported 3DS models

Post 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
quercus
Posts: 5
Joined: Tue Feb 16, 2016 6:35 pm

Re: Display of flat surfaces in imported 3DS models

Post 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?
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Display of flat surfaces in imported 3DS models

Post 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.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Display of flat surfaces in imported 3DS models

Post 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
quercus
Posts: 5
Joined: Tue Feb 16, 2016 6:35 pm

Re: Display of flat surfaces in imported 3DS models

Post 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!
Post Reply