POV-Ray : Newsgroups : povray.binaries.utilities : PLY to MESH2 : PLY to MESH2 Server Time
25 Apr 2024 16:33:23 EDT (-0400)
  PLY to MESH2  
From: Le Forgeron
Date: 13 Mar 2011 08:48:40
Message: <4d7cbd28@news.povray.org>
Greetings,

please find attached a source to convert any ply to mesh2.
(I fixed the reading of binary ply with opposite endianess)

Converting the original lucy.ply provide a file of 1 166 436 392 bytes.
(and the include file then works!)

compilation:
 gcc -o ply2mesh2 -I. ply_io.c ply_to_mesh2.c -lm

usage:
 ./ply2mesh2 <input.ply >output.inc



Sample scene:


#declare dra=
#include "lucy.inc"

object { dra texture { pigment { color rgb <0.6,0.6,0.6> } finish {
ambient 0.3 diffuse 0.7 } } scale 1/160 rotate -90*x}
object { dra texture { pigment { color rgb <0.6,0.6,0.6> } finish {
ambient 0.3 diffuse 0.7 } } scale 1/160 rotate -90*x scale <-1,1,1>}
camera { location <0,10,-30>
  up y
		right x
	look_at 0
	angle 40
}

light_source { <-80,200,-200>,1 }


Post a reply to this message

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