[Bf-committers] Booleans

Theodore Schundler tschundler at scu.edu
Thu Sep 9 22:25:06 CEST 2004



Yes, that's basically what I meant with non destructive - doing them at
render time (or right before). I don't think you'll get cleaner results
that way, but if you want to use it for animation, then its necissary.
My approach to that would be to make it an effect. I suppose the effect
can be designed to do multiple operations on one object in a particular
order. And (I'm not sure how doable it is) ideally the effect would also
be previewable in object mode.
The parenting heirarchy (though I don't think it needs to be a
heirarchy, just ObjectA U ObjectB - ObjectC type of an operation should
work sufficiently) would be defined using that effect.

As I mentioned, the boolean operation I plan to code to be used in a
variety of places - from the GUI, from an effect, and from Python. So if
one wants to use it, to create some sort of CSG heirarchy operation,
that should be no problem.

As for doing it on the pixel level, I don't know that its very
practical. You could produce perfect results with s-meshes and such by
doing all operations treating them as actual curves, and not mesh
approximations of curves. However, that only works for raytracing.
What blender does is render faces (quads & tris) into a zbuffer first.
and it doesn't do it by tracing rays from the camera to a face. It does
a view transformation on the vertex set, and it just renders the faces 
using their X & Y coordinates after the transformation, and using the Z
coordinate of the face to fill it in the zbuffer. Then it figures out
what to shade based on what is in the resulting scene. (sorry if that
isn't exactly right, I haven't really poked around with the render pipe)
So everything must be converted to a mesh first. Even blender's
raytracer does its first pass this way. I suppose the quad & tri
rendering could be made smarter, but it would be at a significant impact
on speed. If the better results are necissary, then you can smooth
subdivide the mesh a bit. (if I get smooth intersection calculation
working, then you may not even need for any extra subdividing the mesh
to get a nice & smooth result)


Ted


>>> DanielPGB_Vasquez at hotmail.com 09/09/04 7:27 AM >>>
Hello Robert and the ML!

Let me jump in this discussion for one quick additional note:
There was a quick discussion about booleans on the .org board some
months ago:
http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=3422&highlight=boolean

The major point about the discussion was finally to point out that I
had come across some software that handled booleans on rendertime.
Shade can do both: rendertime bools and clean definitive (magic?)
on-mesh bools. (they work for polygons too)

This can complete(/compete with) what some call "instanced-booleans"
where the software does the bool operations on-the-fly using instanced
copies of the intersecting objects. This means you move the original
objects (which can get ghosted to clean up the view) and the boolean
result updates... hum... this might be what Theodore Schundler means
by "non-destructive" booleans.

Ciao and continue the good work coders!!
Dani



> Has anyone discussed the possibility of making the Boolean code
capable of
> handling real CSG trees?  IE; add a CSG Object, inside the CSG, add
a
> sphere and an overlapping cyl.  Parent the cyl. to the sphere,
select
> "subtract", and you have a sphere with a round hole.
>
> Later, you can replace the cyl. with a cube, and you now have a
sphere with
> a square hole... Or change the operation to "interfere" and you have
a
> cyl./cube with rounded ends...   Or edit the cyl. and have the hole
change
> shape... etc...
>
> The trees (ideally) can have an arbitrary number of levels, ie; the
cyl.
> could have children that affect it's shape prior to it operating on
the sphere.
>
> Even if you are not going to code CSG's, try to keep this
possibility
> open/easy for the future while working on your new boolean code...
>
> Robert Wenzlaff
> (aka Detective Thorn)

_______________________________________________
Bf-committers mailing list
Bf-committers at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-committers


This message scanned for viruses and SPAM by GWGuardian at SCU (MGW1)


More information about the Bf-committers mailing list