POV-Ray : Newsgroups : povray.binaries.utilities : PLY to MESH2 Server Time
28 Mar 2024 06:32:00 EDT (-0400)
  PLY to MESH2 (Message 1 to 4 of 4)  
From: Le Forgeron
Subject: PLY to MESH2
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

From: Le Forgeron
Subject: Re: PLY to MESH2
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)

From: Stephen
Subject: Re: PLY to MESH2
Date: 13 Mar 2011 10:04:06
Message: <4d7cced6@news.povray.org>
On 13/03/2011 12:48 PM, Le_Forgeron wrote:
> Greetings,
>
> please find attached a source to convert any ply to mesh2.
> (I fixed the reading of binary ply with opposite endianess)
>

That was very good of you :-D


-- 
Regards
     Stephen


Post a reply to this message

From: Jim Holsenback
Subject: Re: PLY to MESH2
Date: 13 Mar 2011 10:21:14
Message: <4d7cd2da$1@news.povray.org>
On 03/13/2011 09:48 AM, Le_Forgeron wrote:
> Greetings,
>
> please find attached a source to convert any ply to mesh2.

wow ... excellent! I'll give it a test drive ... Thanks!


Post a reply to this message

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