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 

Deled 1.81 Pro and csg subtract mess
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
jones605562000
Member


Joined: 05 Apr 2008
Posts: 7

PostPosted: Tue Apr 08, 2008 3:12 pm    Post subject: Deled 1.81 Pro and csg subtract mess Reply with quote

I have tried to design a simple house. I used csg subtract to cut holes out for the doorway and the windows. The results are in the image below:



I have holes in my wall around the window in the right square of the editor and several extra lines ( faces?, polygons?) in the top left view and the bottom right view. All the extra lines run diagonally. I am not sure what is happening, if i am not doing something that needs to be done or if there is a problem with the software. To subtract I just make a cube the size I need, then select the model first, cube second and subtract.
this is starting to get really frustrating because this has happened several times. I can fix those problems/areas manually but would prefer to have the csg do clean cuts.

any help will be appreciated.
thanks
_________________
Always 1 step behind technology
Back to top
View user's profile Send private message
elementrix
DeleD PRO user


Joined: 11 May 2006
Posts: 1300
Location: The Netherlands

PostPosted: Tue Apr 08, 2008 3:32 pm    Post subject: Reply with quote

what if you click on "optimize" when you have the whole object selected.
There seems to be a weird geometry at some place's, is it one object or several?
_________________
Chickens RULE | www.elementrix.nl
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Tue Apr 08, 2008 5:19 pm    Post subject: Reply with quote

If CSG fails, it's mostly because of bad geometry, though the CSG commands don't work perfectly. Try optimizing the object first, weld all vertices that share the same position and be sure there are no holes in either mesh. Also don't worry about the extra edges in the walls, they are just a result of the triangulation by the CSG routines. You can merge the two triangles if they annoy you.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
jones605562000
Member


Joined: 05 Apr 2008
Posts: 7

PostPosted: Tue Apr 08, 2008 10:48 pm    Post subject: Thank you for responding so quickly Reply with quote

I will try optimizing and welding the vertices and merging the whole object before i cut holes in it. This object was made by subtracting one cube from another so that all the outside walls are part of the same object. the inner walls are seperate objects. on each wall I made sure that some of that wall would be around the area I subtracted out, no subtraction against outside edges of the walls.

The walls are 16 units thick by the way. Don't know if that makes a difference or not, maybe too small an area?
_________________
Always 1 step behind technology
Back to top
View user's profile Send private message
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Wed Apr 09, 2008 6:28 am    Post subject: Reply with quote

The thickness should not have any importance. You should also check whether a face of the cube aligns with a face of the other object, the CSG doesn't like that.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
jones605562000
Member


Joined: 05 Apr 2008
Posts: 7

PostPosted: Wed Apr 09, 2008 3:55 pm    Post subject: Some improvement but still a problem Reply with quote

Sorry to have to bother everyone again.

By welding vertices and optimizing I was able to create 10 openings
before having another problem. I also made sure that my objects snap
was set to vertices before subtracting holes.

In the following picture is the problem created by the 11th subtract.
The far right window with the white showing through on the right hand
side and highlighted in red on the other views is what created the
problem. The problem is 1 or 2 extra faces highlighted in blue that seems
to have cut through some of the other faces.



The next image is one of those faces highlighted with the face mode and
textured. The face seems to go right through the middle of the walls.



These faces are hard to remove and they make it difficult to do
regular textures on the model because they do divide up the original
faces into random sections.

Is their a limit to how many times you can us the subtract in a row?
I created all the walls first then cut the holes.
_________________
Always 1 step behind technology
Back to top
View user's profile Send private message
Jeroen
Site Admin


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

PostPosted: Wed Apr 09, 2008 5:51 pm    Post subject: Reply with quote

I am trying to reproduce this case but sofar, things work as expected. My testmodel does not have innerwalls though, so that's what I am going to try now.

Perhaps you can post your original model (without the holes, only the walls) somewhere? Or maybe you can recreate the model from scratch, saving it between each CSG operation to a different file. If the error happens again, send the previous saved file to my emailaddress. That would greatly help us to solve any problem that might exist.

Btw, do you have auto-optimize on (settable in the CSG tab on the Option screen)?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jones605562000
Member


Joined: 05 Apr 2008
Posts: 7

PostPosted: Wed Apr 09, 2008 8:03 pm    Post subject: Rebuilding Reply with quote

I will rebuild the model and save after each csg operation.
I just checked and the auto optimize setting is on.
I will Post the results when done.

Thanks for taking the time to figure this out for me.
_________________
Always 1 step behind technology
Back to top
View user's profile Send private message
Jeroen
Site Admin


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

PostPosted: Wed Apr 09, 2008 8:11 pm    Post subject: Reply with quote

Sure thing! If we can fix bugs like this, we will certainly do so. It's great to see you willing to help us out here. Thanks. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jones605562000
Member


Joined: 05 Apr 2008
Posts: 7

PostPosted: Wed Apr 09, 2008 9:35 pm    Post subject: It happened again! Reply with quote

I rebuilt the model. Here's The steps that I took To build it.

1. I built 2 cubes so that I could subtract one from the other to create
an open end box.

2. I then scaled the box larger and made sure that it snap was set to vertex.

3. then by using cubes I drew out all the walls.

4. I scaled all the walls simultaneously to the right height.

5. At this point I saved the file. http://www.geocities.com/jones605562000/test_NMO.dxs.txt
Right click and save to download. Rename the file without the .txt
Geocities won't let me upload anything but htm,jpg, or text.

6. I then selected everything and merged all the objects, followed by optimize. http://www.geocities.com/jones605562000/test_MO.dxs.txt
same instructions as above for file download.

7. I made another cube and did a csg subtract. This is the result.
http://www.geocities.com/jones605562000/error.dxs.txt


I didn't even make it past 1 subtract this time.

I hope that all this helps. Thanks
[/url]
_________________
Always 1 step behind technology
Back to top
View user's profile Send private message
Jeroen
Site Admin


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

PostPosted: Thu Apr 10, 2008 6:09 am    Post subject: Reply with quote

Excellent, I'll get into this a.s.a.p.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Thu Apr 10, 2008 8:18 pm    Post subject: Reply with quote

There HAS to be some robust way of doing CSG. Why isn't there an open source library for that already?

For example, I could see how you could do the following:

1) Create a filling tetrahedralization of each of the parameter meshes, building up connectivity information (each face is either connected, or an outside face).
2) Do tetra/tetra polytope clipping between all overlapping tetrahedrons, retaining connectivity information.
3) Union all remaining polyhedra to build a mesh of the outside faces.

This mechanism may leave additional flat, two-sided faces in cases where objects exactly butt up, but that's probably OK. It's the case where your basic geometry connectivity gets messed up that you want to avoid at all costs.
Back to top
View user's profile Send private message
trucker2000
DeleD PRO user


Joined: 11 May 2005
Posts: 1839
Location: Sacramento, California

PostPosted: Thu Apr 10, 2008 8:51 pm    Post subject: Reply with quote

I run into this problem all the time while doing csg subtraction of boxes. (same way as was done above) so to work around it, I make my building out of several wall sections. Once I'm done, I weld everything together. That fixes most of the problems I have exporting to torque. Smile
It's something you can do until this gets fixed.
Sorry to not have reported this before Jeroen. I thought it was just the way csg worked. Embarassed
_________________
Some day I will grow up and be a real modeler.
"Never give up! Never surrender!!"
Sys specs:
asus
8 gigs ram
Invidia gtx560 video card
Windows 8 (worst op sys Ever)
Back to top
View user's profile Send private message Visit poster's website
jones605562000
Member


Joined: 05 Apr 2008
Posts: 7

PostPosted: Fri Apr 11, 2008 8:08 am    Post subject: Regarding substitute method. Reply with quote

Thanks for the work around Trucker2000, that helps a lot to making a workable model.

That got me curious as to why single objects had no problem with the csg subtract, but more complex objects made up of several objects did seem to have a problem. I built 2 walls so that I made a corner but didn't merg them together. I just made them touch each other. I cut 4 holes out of each wall and didn't have any problems.

I then started again with that same setup, 2 walls making a corner.
I merged them together and optimized them. I cut 4 holes out of the first wall with out any problems. As soon as I cut out a hole in the second wall I ended up with the hole being cut in the 3d view. There were no faces on the inside edges of that hole. Also, that hole didn't show op in the other views. Same as the window in the top right section of the first picture that I posted. The same thing happened with 2 merged objects that were not optimized.

I thinking that the csg subtract routines don't like objects that have been merged. Maybe this little test I did will help figure out what is happening.
_________________
Always 1 step behind technology
Back to top
View user's profile Send private message
Jeroen
Site Admin


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

PostPosted: Sat Apr 12, 2008 8:51 am    Post subject: Reply with quote

I have examined the model you sent me, jones. CSG isn't working properly on that model because of bad geometry that exists within the model. CSG depends heavily on geometry being setup properly. Take a look at these screenshots showing bad geometry:





The highlighted polygon is totally inside the object. This might cause CSG routines to error, especially when the object is complex.

A method to create good geometry is something like this:

Create a cube and select a polygon


Extrude it a little bit without keeping the original polygon


Select another polygon


Extrude it again


Optimize the result


Using this method, you can create a level like this (unoptimized):


You might wonder how those extra inner-walls were created. I'm sorry for the bad quality of the pictures, but I think the idea is clear.

Select two opposing edges


Split them 3 times and go to vertex mode


Connect the newly created vertices


Select the new polygon


And extrude it. Again, without keeping the original polygon


Using CSG on a model created like this will give better results. You just have to make sure that there are no polygons inside the model anywhere. Also avoid overlapping polygons. And, like trucker already said, welding vertices whereever possible and using optimize is generally a good idea too. Following those rules should help out a great deal.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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