POV-Ray : Newsgroups : povray.general : Reading mesh2 data from file : Re: Reading mesh2 data from file Server Time
30 May 2024 09:35:30 EDT (-0400)
  Re: Reading mesh2 data from file  
From: jr
Date: 3 Jul 2021 02:35:00
Message: <web.60e004a3c54a2bf05e0fed26cde94f1@news.povray.org>

"Kima" <nomail@nomail> wrote:
> Since a mesh is made of thousands or millions of triangles, it is tidy to keep
> the data in separate files and include them in the .pov file whenever necessary.
> I mean something like
> #declare Vertices = read from vertices.txt;
> #declare Faces = read from faces.txt;
> ...
> fopen directive of POV-Ray reads the file into variables,
> #read (FILE_HANDLE_IDENTIFIER,MyString,MyFloat,MyVect)
> I don't know if it works as vertices and faces are thousands/millions of
> vectors.

storing vertex and face coords/points in separate files etc should/would work.
however, have you considered only doing "the work" once?  that is, create an
..inc file from your '*.txt' files instead and simply use that from then on?
have attached an example.

regards, jr.

Post a reply to this message

Download 'cube2_mesh.inc.txt' (1 KB)

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