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 

Having a union problem - SOLVED
Goto page 1, 2  Next
 
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
Adar
DeleD PRO user


Joined: 29 Aug 2007
Posts: 233

PostPosted: Tue Feb 19, 2008 10:59 pm    Post subject: Having a union problem - SOLVED Reply with quote

I'm trying to unite 2 a bit complex objects but not too much and I'm getting the following result:
Before:

After:


How can I unite them propely? I have to Confused

Thanks !


Last edited by Adar on Fri Feb 22, 2008 11:35 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Tue Feb 19, 2008 11:28 pm    Post subject: Reply with quote

Absolutely make sure it's not bad geometry, i.e. the model is closed, has no inner polygons (that could come from extruding badly) etc.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
Adar
DeleD PRO user


Joined: 29 Aug 2007
Posts: 233

PostPosted: Wed Feb 20, 2008 12:05 am    Post subject: Reply with quote

Mr.Fletcher wrote:
Absolutely make sure it's not bad geometry, i.e. the model is closed, has no inner polygons (that could come from extruding badly) etc.

Well the object is fine.. it's just not simple geometry
It also happens to me sometimes when trying to unite 2 very simple objects..
Back to top
View user's profile Send private message Send e-mail
Adar
DeleD PRO user


Joined: 29 Aug 2007
Posts: 233

PostPosted: Wed Feb 20, 2008 12:28 am    Post subject: Reply with quote

Here are some more examples:
Before:

After:


Before (Trying to unite the window thing with the house):

After:


Before (Trying to unite the suncover with the bar that's holding it):

After (a few polygons disappeared):
Back to top
View user's profile Send private message Send e-mail
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Wed Feb 20, 2008 6:40 am    Post subject: Reply with quote

I have reported several scenes where problems happen, too. Sometimes, it's an actual bug; other times, it's a T junction or some other problem in my own geometry.
The DeleD CSG tools aren't perfect (just like the 3ds Max or C4 CSG tools aren't perfect, either), but it helps to try to optimize and double- and triple-check your own geometry before blaming DeleD.
And when you blame DeleD, you have to post the actual scene file so that the guys can actually try to debug it.
Back to top
View user's profile Send private message
Jeroen
Site Admin


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

PostPosted: Wed Feb 20, 2008 7:25 am    Post subject: Reply with quote

jwatte wrote:
And when you blame DeleD, you have to post the actual scene file so that the guys can actually try to debug it.


That would be great. CSG routines are pretty hard to debug and we need as many example scenes as we can get.

I hope I will be able to solve this bug for the next release. But due to the complex nature of CSG routines, I can't make promises - but I'll try for sure.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Wed Feb 20, 2008 11:14 am    Post subject: Reply with quote

Adar wrote:
Here are some more examples:
Before:

After:

I tried that, it works perfectly for me.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
Adar
DeleD PRO user


Joined: 29 Aug 2007
Posts: 233

PostPosted: Wed Feb 20, 2008 12:11 pm    Post subject: Reply with quote

Jeroen wrote:
jwatte wrote:
And when you blame DeleD, you have to post the actual scene file so that the guys can actually try to debug it.


That would be great. CSG routines are pretty hard to debug and we need as many example scenes as we can get.

I hope I will be able to solve this bug for the next release. But due to the complex nature of CSG routines, I can't make promises - but I'll try for sure.

Want me to send you all of them to admin at delgine dot com? I also have another 1 plus an optimization bug example.


Last edited by Adar on Sat Feb 23, 2008 4:18 pm; edited 3 times in total
Back to top
View user's profile Send private message Send e-mail
Jeroen
Site Admin


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

PostPosted: Wed Feb 20, 2008 12:12 pm    Post subject: Reply with quote

Adar wrote:

Want me to send you all of them to admin@delgine.com? I also have another 1 plus an optimization bug example.


That would be great, thank you. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Adar
DeleD PRO user


Joined: 29 Aug 2007
Posts: 233

PostPosted: Wed Feb 20, 2008 12:23 pm    Post subject: Reply with quote

Jeroen wrote:
Adar wrote:

Want me to send you all of them to admin@delgine.com? I also have another 1 plus an optimization bug example.


That would be great, thank you. Smile

Done Smile
Back to top
View user's profile Send private message Send e-mail
Jeroen
Site Admin


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

PostPosted: Wed Feb 20, 2008 9:46 pm    Post subject: Reply with quote

Thanks - they're great for improving the CSG routines. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Adar
DeleD PRO user


Joined: 29 Aug 2007
Posts: 233

PostPosted: Wed Feb 20, 2008 11:57 pm    Post subject: Reply with quote

Jeroen wrote:
Thanks - they're great for improving the CSG routines. Smile

Glad I can help !
Back to top
View user's profile Send private message Send e-mail
Jeroen
Site Admin


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

PostPosted: Thu Feb 21, 2008 8:35 pm    Post subject: Reply with quote

I figured out the problem with this model:



The polygons in this model are quads (4 vertices) but not all of them are flat! A polygon is flat when all its vertices are in the same plane. An example of a non-flat polygon: create a rectangle in the topview and then pull one of its vertices upwards. This polygon isn't flat. Now, the CSG routines depend on flat polygons. If polygons aren't flat, the CSG results are unpredictable. This should be in the Help file - WIKI!

To work around this problem, simply triangulate the model before using CSG. Triangles are flat by nature and so CSG routines will not suffer from this particular problem if objects have been triangulated.

In this case, it's the geometry that isn't entirely correct. Other models in the example-pack you sent me have the same problem and triangulating them solved it. Perhaps the CSG tools should triangulate a model by default and then perform the CSG action. This will mean longer processing times and more polygons as a result though.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Adar
DeleD PRO user


Joined: 29 Aug 2007
Posts: 233

PostPosted: Thu Feb 21, 2008 11:54 pm    Post subject: Reply with quote

Jeroen wrote:
The polygons in this model are quads (4 vertices) but not all of them are flat! A polygon is flat when all its vertices are in the same plane. An example of a non-flat polygon: create a rectangle in the topview and then pull one of its vertices upwards. This polygon isn't flat. Now, the CSG routines depend on flat polygons. If polygons aren't flat, the CSG results are unpredictable. This should be in the Help file - WIKI!

To work around this problem, simply triangulate the model before using CSG. Triangles are flat by nature and so CSG routines will not suffer from this particular problem if objects have been triangulated.

In this case, it's the geometry that isn't entirely correct. Other models in the example-pack you sent me have the same problem and triangulating them solved it. Perhaps the CSG tools should triangulate a model by default and then perform the CSG action. This will mean longer processing times and more polygons as a result though.

Actually I figured the tool does whatever it needs in order to unite the objects together.. how about if it would triangulate only the uniting polygons instead of the whole model in case it needs to?
Also:
1.try to unite the fish object with the rope object I sent you and then optimize.. you'll see some polygons get deleted (in double sided faces)
2.try to triangulating the big window object and then optimize, you'll see some polygons deleted (also double sided faces)
3. try to unite the big window object with a bar that holds the suncover after it had been triangulated, then optimize.. some major issues there Razz


Last edited by Adar on Fri Feb 22, 2008 12:25 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Fri Feb 22, 2008 12:01 am    Post subject: Reply with quote

Adar wrote:
how about if it would triangulate only the uniting polygons instead of the whole model in case it needs to?

Testing for this would probably take more time than to triangulate it right away.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
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
Goto page 1, 2  Next
Page 1 of 2

 
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