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

Ton Roosendaal ton at blender.org
Mon Dec 20 13:42:02 CET 2004


Hi,

I forgot to check on your previous mail too, with the sample .blend.
So I've just put back the commented out 2.25 code, which used both  
angle and area to weight.

http://www.blender.org/bf/smooth1.jpg  (current cvs)
http://www.blender.org/bf/smooth2.jpg  (new)
http://www.blender.org/bf/smooth3.jpg  (current cvs)
http://www.blender.org/bf/smooth4.jpg  (new)

The exact weighting factor is angle/sqrt(area). Without the sqrt it  
doesnt look that good, which is easier to see in another test file:

http://www.blender.org/bf/smooth5.jpg  (angle/area)
http://www.blender.org/bf/smooth6.jpg  (angle/sqrt(area))

Converting a MetaBall object to mesh (and do TAB TAB) really gives ugly  
vertexnormals, known issue.

And here's a monkey head without subsurf:

http://www.blender.org/bf/smooth7.jpg  (current cvs)
http://www.blender.org/bf/smooth8.jpg  (angle/sqrt(area))

Now if I knew why this code was commented out... searching back in  
history reveiled it was there in 1.5 Blender, but not in 1.8 anymore.

-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