Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Union problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition
View previous topic :: View next topic  
Author Message
Tristan
DeleD PRO user


Joined: 16 Dec 2006
Posts: 56

PostPosted: Sat Dec 30, 2006 9:59 pm    Post subject: Union problem Reply with quote

Well I ge this problem way too often. Where there are surfaces that aren't covered leaving a blank spot. Which is quite annoying, any plans to fix this? It's not like this has any complexity what so ever.


Un-Unioned


As you can see all faces are inside of others.. ect. It's not the first problem I have with the union tool.

http://www.gamingtwilight.com/downloads/testo.dmf
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sun Dec 31, 2006 10:13 am    Post subject: Reply with quote

Thanks for the detailed report and the example file! Jeroen maintains the CSG routines, I'm sure he'll be put it to good use.

As fas as I know, there currently are known problems with coplanar polygons. Looks like that (known, but needs-to-be-fixed) issue covers most of the problems with this scene.
Back to top
View user's profile Send private message Visit poster's website
Tristan
DeleD PRO user


Joined: 16 Dec 2006
Posts: 56

PostPosted: Sun Dec 31, 2006 5:03 pm    Post subject: Reply with quote

Yeah, it NEEDS to be fixed soon, I mean I get this problem wayyy tooo often. Every time anything goes diagonal there's a 99% chance it'll do that. And even non-diagonals do that sometimes... If it stops a user from making models then it should be considered top priority. Smile
Back to top
View user's profile Send private message
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Sun Dec 31, 2006 6:37 pm    Post subject: Reply with quote

Sure thing! Thanks for providing an example scene, I'll get into this a.s.a.p. Smile

First testresults: it looks like the problem is twofold. Having auto-optimize turned off, the Union command somehow fails to create 4 needed polygons. Runnning the Optimize routine mannually after that removes too many polygons because of those 4 missing polygons. If I manually repair the 4 missing polygons first (by using Vertex Fill) and then run the Optimize function again, I get a good result. I'll get into why the Union doesn't produce those particular 4 polygons now.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Mon Jan 01, 2007 1:44 pm    Post subject: Reply with quote

I think I figured out what the problem is. Take a look at the following picture:



I have selected two primitives of the scene and seperated them from the other primitives in the right picture. The two primitives both have a rectangular polygon at the back and a triangular polygon on the front. This is causing the highlighted polygons (which connect the back- and front polygons) to get skewed. Same goes for the polygons on the other side (I didn't highlight those). To be more exact: those polygons are not flat. A polygon is flat when all vertices of the polygon are in the same plane. For example, if you create a polyline consisting out of 4 or more vertices, the polygon is flat. If you move one of the vertices upwards, the polygon isn't flat anymore. This is the case with the highlighted polygons in the picture.

The thing is: CSG routines depend heavily on plane-calculations. Therefor, they need all polygons in the primitive to be flat. If you alter the primitives being show here so that the highlighted polygons truly are flat, Union will work correctly. Optimize will also do its job just fine then too. You could simply create two cubes and scale the bottom polygons inwards a bit. Alternately, simply weld the bottom vertices to achieve a triangular effect or use a pyramid primitive to get to the same result.

The "problem" here is this: we choose to create a modeler that gives the user total freedom about the kind of geometry he/she wishes to create (open/closed, flat/non-flat etcetera). But, non-flat polygons cause the CSG routines to fail so I think we should make our CSG routines more robust by checking for non-flat polygons and other types of geometry that might cause a CSG failure before actually applying the CSG commands. If faulty geometry is detected, CSG should not be applied and, preferably, the offending polygons should be highlighted.

Thanks for pointing out this problem - we will handle this in the next release of DeleD. In the mean time, you can handle possible problems yourself by carefully creating your geometry on which to apply CSG routines on. We'll mention this in the Help file too. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tristan
DeleD PRO user


Joined: 16 Dec 2006
Posts: 56

PostPosted: Mon Jan 01, 2007 5:26 pm    Post subject: Reply with quote

Not only should it highlight it, there should be if there isnt, a tool to fix the problem just by pressing it that would be sweet, so making abnormal polygones wouldn't be a problem and it would ease our burden. Razz
Back to top
View user's profile Send private message
csp
Member


Joined: 06 Jan 2007
Posts: 4
Location: Zürich, Switzerland

PostPosted: Sat Jan 06, 2007 2:26 am    Post subject: Reply with quote

I'm currently trying Deled lite 1.53 and I had some missing little triangles after a union. Union is the only thing I can test in the lite version. So you say its not a problem of all CSG ops ?
Maybe you should add a "Cap Holes" tool as in 3dsmax.

BTW I was making a union with a sphere and a torus that was intersecting the sphere somewhere in the upper part.
Back to top
View user's profile Send private message Visit poster's website
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Sat Jan 06, 2007 4:08 am    Post subject: Reply with quote

A reasonable work-around would be to detect non-flat polygons, and tesselating them before doing the union. Of course, there are two ways to tesselate a quad, and you have to pick one -- but that's better than trying to union a non-flat polygon.
Back to top
View user's profile Send private message
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Sat Jan 06, 2007 12:57 pm    Post subject: Reply with quote

jwatte wrote:
A reasonable work-around would be to detect non-flat polygons, and tesselating them before doing the union. Of course, there are two ways to tesselate a quad, and you have to pick one -- but that's better than trying to union a non-flat polygon.


A problem here might be that the polygon to be tesselated is connected to other polygons. Tesselating that polygon might result in the other polygon(s) becoming non-flat or, at least, deformed in such a way the artist didn't intend. Any thoughts on this one?

@csp: what does the Cap Holes tool in 3dsmax do?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
csp
Member


Joined: 06 Jan 2007
Posts: 4
Location: Zürich, Switzerland

PostPosted: Sat Jan 06, 2007 5:19 pm    Post subject: Reply with quote

cap holes will close little gaps and holes like missing triangles in a mesh. It may use some parameters to detect things that may be "holes".


Flat polygons? Isn't a triangle flat anyway? Does Deled use other polygons than Triangles? well if so, then a triangulation maybe would help.
Back to top
View user's profile Send private message Visit poster's website
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Sun Jan 07, 2007 9:12 pm    Post subject: Reply with quote

Jeroen wrote:
A problem here might be that the polygon to be tesselated is connected to other polygons. Tesselating that polygon might result in the other polygon(s) becoming non-flat


Sorry, I meant "triangulating" the polygon. You do not need to add any vertices.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum