POV-Ray : Newsgroups : povray.binaries.utilities : PLY to MESH2 : Re: PLY to MESH2 Server Time
19 Apr 2024 22:48:31 EDT (-0400)
  Re: PLY to MESH2  
From: Le Forgeron
Date: 13 Mar 2011 08:49:17
Message: <4d7cbd4d$1@news.povray.org>
Le 13/03/2011 13:48, Le_Forgeron nous fit lire :
> Greetings,
> 
> please find attached a source to convert any ply to mesh2.
> (I fixed the reading of binary ply with opposite endianess)
> 

It work better with attached file!

> 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


Attachments:
Download 'plypov.tar.gz' (21 KB)

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