|
|
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
|
|