POV-Ray : Newsgroups : povray.programming : Help me pls! Turning list of points into triangle mesh? : Re: Help me pls! Turning list of points into triangle mesh? Server Time
28 Jul 2024 18:16:14 EDT (-0400)
  Re: Help me pls! Turning list of points into triangle mesh?  
From: Remco de Korte
Date: 29 Aug 1999 04:51:36
Message: <37C8F591.DE8779F6@xs4all.nl>
Cliff Bowman wrote:
> 
> Hi - I'm trying to write a converter for Wavefront .OBJ file to uvPOV.
> It's going quite well so far but... there are a few oddities to some
> OBJ files which I've yet to find "the best" solution to.
> 
> For example.
> 
> Some .OBJ faces comprise more than 4 points. I've successfully tested
> turning 4 points into 2 triangles, and this seems to work well. Does
> anyone know how to reliably turn faces with more points into triangle
> meshes? Or has anyone happened on a procedure which "happens to work"
> (like my 1,2,3 - 3,4,1 procedure for 4-point faces)?
> 
> Other issues revolve around .OBJ files containing degenerate triangles
> (sorted. Silly, but sorted) and having normals for only SOME of the
> verteces of a triangle - at the moment I'm fudging this by using a
> standard triangle (instead of a smooth triangle) for any triangle
> which doesn't have a full set of normals.
> 
> Any help would be greatly appreciate :)
> 
> Cheers,
> 
> Cliff Bowman
> Why not pay my 3D Dr Who site a visit at http://www.who3d.cwc.net/

I don't know if this'll alway work but I would calculate a 'middle'-point (M)
(adding up aal points in the object and dividing them by the amount of points)
then step through the row of points connecting two consecutive points to this M
(creating a triangle. 
Sounds like a fun experimenting thing...

Remco


Post a reply to this message

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