POV-Ray : Newsgroups : povray.advanced-users : In a mesh(triangle to smooth_traingle) : Re: In a mesh(triangle to smooth_traingle) Server Time
5 Jul 2024 15:07:28 EDT (-0400)
  Re: In a mesh(triangle to smooth_traingle)  
From: Alain
Date: 15 Feb 2008 16:42:05
Message: <47b6072d$1@news.povray.org>
here_I_am nous apporta ses lumieres en ce 2008/02/15 07:57:
> stbenge <stb### [at] hotmailcom> wrote:
>> here_I_am wrote:
>>> Hey everybody!
>>>
>>> I am in the middle of a project, where i have to do smooth shading from a scene
>>> file of 15000 triangles which have thge data as triangles rather that having in
>>> smooth_traingle.And since the number of triangles is very large I simple can't
>>> calculate vnormalize(vcross(v1-v2,v3-v2)) manually and implement to
>>> smooth_triangle for every triangle
>>>
>>> And I am not sure how to implement this thing with a function or something.
>>> SO plz help me out here.
>>>
>>> Thanks.
>> These guys mean well, but they go off on a slight tangent sometimes :)
>>
>> You want something easy, right? I've got two solutions for you:
>>
>> 1) PoseRay
>> You can import a basic mesh (even POV format, evidently), add smoothing
>> to it, and export it to POV.
>> http://mysite.verizon.net/sfg0000/
>>
>> 2) POV-Sub
>> Download POV-Sub for POV-Ray version 3.6. You can apply smoothing to
>> your mesh directly in POV, without actually subdividing it.
>> http://www.cise.ufl.edu/~xwu/Pov-Sub/
>>
>> Good luck!
>>
>> Sam
> 
> 
> Hey thanks everybody...PoseRay worked well for me. :)
> 
> But I have this little doubt...actually I did modified my scene file in
> Java.What I did was...I had all the vertices for all the triangles so I
> calculated normal for each triangle..and used the same normal for all the
> vertices for this semantics.... smooth_triangle{ v1,n,v2,n,v3,n}
> I thought this should have been worked but it didn't..So could you please
> explain this to me..why this didnt worked??
> 
> 
> 
> 
The way you put it, all the normals are the same, resulting in a flat aspect.

It should be:
smooth_triangle{ v1,n1,v2,n2,v3,n3}

-- 
Alain
-------------------------------------------------
I love you not because of who you are, but because of who I am when I am with you..


Post a reply to this message

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