bf-blender / Windows (2004/09/07) Boolean build

User-contributed CVS development builds. Please test and give feedback!

Moderators: jesterKing, stiv

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

bf-blender / Windows (2004/09/07) Boolean build

Post by jesterKing » Tue Sep 07, 2004 11:03 pm

(posting on behalf of Laurence)

http://www.letwory.net/cvsbuilds/boolBlender.zip

Hello, this is a "first edition" of blender featuring an improved set
of boolean operations (available through the 'w' key on 2 highlighted
meshes in object mode). With the following limitations:
* Please note that this binary is a debug binary and therefor will be
slower than the snappy blender you have come to enjoy.
* There is no support at the moment for per vertex properties - so no
UV, Color etc.

Please if you have time could you test the booleans and report on this
forum situations where it goes wrong. If you can reproduce the same
error on the simplest possible input meshes I will be even happier.

I would also appreciate answers to:
* Do you think this version is better than the version in the official
blender release.
* Is it now useful? If not please try to be constructive and I'll try to fix it.

Technical points to note:
* This version uses a much improved split function that reduces
overall the number of polys in the output.
* Renders unto blender quads that belong to blender. If blender thinks
something is a quad then that quad will be preserved if its not split
by anything (even if it's not coplanar!)
* Treats quads properly as quads if it is actually coplanar.

Success,
Laurence.

theeth
Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Post by theeth » Tue Sep 07, 2004 11:11 pm

SDL.DLL is missing from the archive. You'll have to copy from your 2.34 release folder (or from CVS).

Quick look: seems nice as it keeps old quads, but it doesn't join coplanar tris (from the split faces) in quads which is most likely what people are asking for.

A good start nonetheless, and definitly better than the current one (though you still have to run a RemDoubles on the result, not sure if that's a wanted behavior or not).

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

Monkeyboi
Posts: 251
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Post by Monkeyboi » Wed Sep 08, 2004 12:30 am

These booleans are great! A huge improvement. Thankyou.


However, you have to do a remove doubles to remove lots of vertices that get put ontop of each other.

matt_e
Posts: 410
Joined: Mon Oct 14, 2002 4:32 am
Location: Sydney, Australia
Contact:

Post by matt_e » Wed Sep 08, 2004 3:09 am

Just for reference, SpkyElctrc at elysiun.com is working on an improved boolean method in Python, with the aim to translate it to C when it's finished. So far the results are very impressive. Just a heads-up in case these efforts may be helpful for each other.

http://www.elysiun.com/forum/viewtopic.php?t=29200

FourMadMen
Posts: 0
Joined: Tue Jul 13, 2004 5:13 am

Post by FourMadMen » Wed Sep 08, 2004 3:23 am

This is not a huge improvement... It's a massive improvement! Only ran a few quick tests just now but man! I'm very pleased so far, good work! And thanks.

FourMadMen
Posts: 0
Joined: Tue Jul 13, 2004 5:13 am

Post by FourMadMen » Wed Sep 08, 2004 4:21 am

Well I had a chance to do some more testing and will post the results here when I get a chance to make some screen shots. The majority of the problems I've found occur with a strange trebling of verts on a co-planar surface. But like I said, let me get some images post so you can better see what I mean.

ebrain
Posts: 0
Joined: Mon Sep 01, 2003 2:48 pm
Location: Nantes [FRANCE]
Contact:

Post by ebrain » Wed Sep 08, 2004 10:52 am

As my sense, the mesh is clearer than before...but that's all :?
And then, I've done a test render and I've seen a shadow bug (on UNION shadows, with a ray spot). Take a look at this :
Image

So booleans need some more improvements... :roll:
Bye,
---
ebrain
http://www.blender.clan.st

LozarB
Posts: 0
Joined: Tue Sep 07, 2004 5:26 pm

Post by LozarB » Wed Sep 08, 2004 11:17 am

Thanks for your time so far, a few comments:
ebrain wrote:As my sense, the mesh is clearer than before...but that's all :?
And then, I've done a test render and I've seen a shadow bug (on UNION shadows, with a ray spot). Take a look at this :


So booleans need some more improvements... :roll:
Bye,
---
ebrain
http://www.blender.clan.st
Thanks for looking into it. I think you might have to jump in and out of edit mode after doing the boolean, I can't remember who is calculating the surface normals, will experiment with this.

FourMadMen:
Could you possibly send me a blend with the "triple vertex problem"? LozarB@REMOVE@gmail.com

Broken:
Thanks for the info. I briefly looked over his work and it seems very promising, I'll drop him an email, maybe he can use my code as a basis for coding his stuff up in C++ or something.

Monkeyboi:
Yeah this is true, is it really such a pain to do a remove doubles by hand? Otherwise I can maybe call the function in the code. I know blender supports per {polygon,vertex} texture and colors, but I'm not sure about normals, otherwise it might be necessary to duplicate boundary verts. ( I'll look into this)

theeth:
Joining tris into quads is doable. I thought there was a function to do this in blender already?

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Wed Sep 08, 2004 11:57 am

LozarB wrote:Thanks for your time so far, a few comments:
theeth:
Joining tris into quads is doable. I thought there was a function to do this in blender already?
J kay turns tris into Quads but I wouldenrt count on it- it dosent always give desireable results.

theeth
Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Post by theeth » Wed Sep 08, 2004 2:14 pm

LozarB wrote:Joining tris into quads is doable. I thought there was a function to do this in blender already?
Yes, there is one like ideasman said, but I'm not sure it discriminate pairs based on whether they are coplanar or not. Worth checking today if I have the time. If it does, then we'd have to look at other possibles issues (dont join tris if they don't have same material, same smoothing flag, ...).

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

ElBarto
Posts: 0
Joined: Fri Jun 11, 2004 3:24 pm
Location: Berlin
Contact:

Post by ElBarto » Wed Sep 08, 2004 11:15 pm

tried two boxes in different ways of boolean, always getting six vertices to much. So after any boolean function i have to use "Remove Doubles". For the best result i used "Convert to Quads" too.

Anyway this is a very, very huge improvement of the boolean function!!!

Great work!!!

SpookyElectric
Posts: 0
Joined: Thu Aug 19, 2004 11:28 am

Post by SpookyElectric » Thu Sep 09, 2004 2:59 am

hmm...I'm the guy working on the version on Elysiun... I found a windows machine to try out your version, since it is nearly on par with mine, then there's no reason for me to continue my work. But, it looks like I'll be continuting.

This version is nice in that it doesn't subdivide any more faces than it needs to, which was a problem with the old version. However on the faces it does subdivide, it creates more new faces than needed.

For example, base meshes:
http://astro.scu.edu/~ted/oss/blender/b ... Meshes.PNG

Result with this build:
http://astro.scu.edu/~ted/oss/blender/b ... aVerts.png (note all the extra edges from the oners of the outer square to the inner one)

Results with my method:
http://astro.scu.edu/~ted/oss/blender/b ... gaBool.png

You can look into my python version if you want to use it as inspiration for the methodology, and integrate that. Or if not, I'm planing porting mine to C soon

---
edit: oops... didn't have the right URL for the image of what this build does
Last edited by SpookyElectric on Thu Sep 09, 2004 6:13 am, edited 1 time in total.

FourMadMen
Posts: 0
Joined: Tue Jul 13, 2004 5:13 am

Post by FourMadMen » Thu Sep 09, 2004 3:28 am

Sure thing LozarB, I made the test subject somewhat simpler than my earlier tests and as such no "triples" but there were several "doubles". I've included a text window that talks about what I mean (and you've probably already noticed it in your tests).

Here's the blend.

LozarB
Posts: 0
Joined: Tue Sep 07, 2004 5:26 pm

Post by LozarB » Thu Sep 09, 2004 10:19 am

SpookyElectric wrote:hmm...I'm the guy working on the version on Elysiun... I found a windows machine to try out your version, since it is nearly on par with mine, then there's no reason for me to continue my work. But, it looks like I'll be continuting.

<snip depressing screen shots>
Your method indeed looks very nice, I'll try and get your python script working so I can steal^H^H^H^H^Hcompare ideas! If you need some assistance with the implementation or chat over any possible improvements/features/optimizations can always drop me an email to LozarB@DELETEgmail.com. Ooops I guess before I look at your implementation I should ask if you have released it under the GPL or not?

The point is we make something nice for blender, I don't give a charlotte about which code is actually used.

Cheers,
Laurence.

P.s. R U the afore emailed C. Barton??? If not then there is yet another guy working on python bools! Just like London bussess I guess...

SpookyElectric
Posts: 0
Joined: Thu Aug 19, 2004 11:28 am

Post by SpookyElectric » Fri Sep 10, 2004 1:22 am

The script itself is not GPL at the moment, because I don't want forks of my script while I'm in the middle of working on it & then have problems with integrating other people's changes overlapping with changes I made since my last release. It's easier to integrate ideas than code with something small and constantly evolving like this.
So I am very interested in any comments and ideas anyone has from looking at it (how to make it work better, faster, simpler, etc.). Once I get the filling routine worked out (what's in there now is a mess of various different ideas and experiments) hopefully in < 1 week, then the base routine as I see it will be fairly solidified and I'll be open to others playing with the code & integrating patches.
I ultimately plan to move the project to C or C++ for integration into blender once all details of the algorithm are worked out. I'd deffinately be interested in collaborating with you on that aspect, since you already have experience with the internal Blender side of the matter.

I'm not C Barton. He E-Mailed as well. It didn't sound like he was working on a script of his own, but was looking for something that would be potentially usable for realtime cutaways and such. So I plan to make a special special super-fast bounding box & infinite plane optimizations (it's easy, since you can consider it as just a series of 1 dimensional operations by transforming the source mesh so that it's X, Y, and Z align to the bound box axiis) for realtime use via python or in an effect module since it seems others want that too.

Ted

Post Reply