POV-Ray : Newsgroups : povray.general : Smooth normals for mesh2 objects : Re: Smooth normals for mesh2 objects Server Time
29 Jul 2024 00:37:24 EDT (-0400)
  Re: Smooth normals for mesh2 objects  
From: clipka
Date: 6 Dec 2013 11:44:14
Message: <52a1fede$1@news.povray.org>
Am 06.12.2013 14:26, schrieb David Given:
> Is there a way to get Povray to automatically calculate smoothed normals
> for a mesh2?
>
> I'm generating huge meshes from an external procedural terrain
> generator. The generator assumes that the renderer doesn't need explicit
> normals, so not only does it not write them but it lacks the
> functionality internally to go from a vertex to the facets containing
> the vertex. So adding support for calculating smoothed normals is going
> to be non-trivial.

POV-Ray has essentially the same problem: While it does know which 
vertices belong to a given facet, it would need an exhaustive search of 
the facets list to figure out which faces meet at a given vertex.

One thing you might do is first render the non-smoothed mesh in an 
orthographic scene with a gradient pattern applied, giving you a height 
map image; you can then feed that image into a smoothed height field.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.