[Bf-committers] New Booleans & Smooth Meshes (maybe I need math help, maybe a shading glitch)

Ton Roosendaal ton at blender.org
Mon Dec 20 12:28:54 CET 2004


Hi Ted,

In the past I've been experimenting with formulas too. If you check on  
the first (2.25) code, there's commented out stuff using a combination  
of edge angles multiplied with area size for triangles/quads. I've also  
tried edge lengths I remember...

I've not had time to investigate the topic further, but I do remember  
there's issues with different types of models. Some approaches work  
good in one case, some in others.

Doing a quick test again indeed reveils the current method really lacks  
quality, so its very welcome someone dives into that again. :)

In contrary to your paper however, Blender does use identical code for  
calculating the normals after leaving editmode (store in mesh) or  
recalculating them at rendertime (when a deform happened).

There's also no relation with autosmoothing, that's an entire different  
case.

-Ton-


On 20 Dec, 2004, at 5:04, Ted Schundler wrote:

> So... I was thinking about the uneven faces. Ton's right that they are
> the problem. And they are always a problem in Blender it seems,
> because you can't have an unevenly subdivided mesh produce correct
> vertex normals. That means there is no way to get smooth results after
> boolean operations without making the operations redo the entire mesh
> geometry (which is exactly what this is trying to avoid). So, maybe
> the problem can be fixed somewhere else. I see two possible solutions:
>
> Vertex normal painting - vertex normals can be forced, like normal
> maps meet vertex colors. There are problems with that method if the
> user tries to edit anything later though...
>
> Weighted vertex normal calcuation - there is already some code to do
> this that seems to only get called when autosmoothing is on. However I
> think it could be considerably better. I did some tweaking yesterday.
> A write up of my experiments and reasoning is here:
> http://astro.scu.edu/~ted/oss/blender/smooth/ 
> Calculating%20smooth%20vertex%20normals.pdf
>
> I think the weighted vertex normal calculation is probably the right
> way to go. I'd be interested in any feedback anyone has on it. Also,
> I'd be interested in test meshes anyone has where they have had
> problems with awkward not-quite-smooth shading of smooth surfaces with
> nonuniform features sizes,
>
>
> Ted Schundler
>
>
> On Thu, 16 Dec 2004 10:50:12 -0800, Ted Schundler  
> <tschundler at gmail.com> wrote:
>> Ton:
>> The first reply you got to this is incompletely and accidentally sent
>> just to you.
>>
>> Sorry, I just realized I should have prepared a .blend too after I
>> posted, but was headed for bed. Here you go:
>> http://astro.scu.edu/~ted/oss/blender/boolean/bool_curves2.blend
>> There's a text file open in there explaining what's what. The tests
>> are separated into different layers.
>>
>> As for coding a C/C++ version, that is the plan. But for now I'm doing
>> testing in Python since it's a lot easier to test out ideas. (no
>> recompiling and such) Once that's working to my satisfaction, I'll
>> move to C/C++.
>>
>>
>> Dan:
>> You are right that AutoSmooth is extremely important when it comes to
>> objects that mix smooth and flat faces. Such as if the cut off part of
>> the sohere was filled with flat faces. But here the back side that you
>> don't see is empty, so the mesh ends where it is cut. Then
>> autosmoothing makes no difference.
>>
>> Ted
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list