POV-Ray : Newsgroups : povray.binaries.scene-files : interpolate_mesh2 revision one : Re: interpolate_mesh2 revision one Server Time
2 Sep 2024 02:20:01 EDT (-0400)
  Re: interpolate_mesh2 revision one  
From: Kitsune e
Date: 11 May 2003 12:15:05
Message: <web.3ebe75f2f90ffdef398d76920@news.povray.org>
Hugo Asm wrote:
>> I also finished a Python script
>I don't have Python so I can't run the script. But I think, it wouldn't be
>too overwhelming to modify the exporter in Wings3D. We have the source code
>available. I don't know the langauge, but it can't be too hard to remove the
>redundant code so the plugin ONLY output's the raw data. This makes a direct
>connection possible between Wings and POV, at least.
>
>> Also I still think that the mesh can be converted in SDL
>If the mesh2 file doesn't have any double-quotes ( " ) it might be possible
>to do a trick: Have POV-Ray modify the entire file by wrapping  "  signs
>around it. Then the file would be treated as a one large string, when read
>by the #read directive. But maybe the string would be too large? It's the
>only way, but a clumsy method in any case.
>
>It would be better to convince the POV-Team to try a new command in POV -
>just in my humble opinion! I've discussed it briefly with the C++ people in
>charge in the last 3 days but without luck. You might consider contributing
>with your thoughts. I consider this as a general limitation with POV, as it
>can never read files from other software.
>
>> hope this was useful!
>
>Yes, thank you.
>Hugo
>

I thought of something this morning, I got the macro to include all mesh2
data Except textures the texture assignment data in the face_indices.  My
first thought was to simply save the whole face_indices statement as a
string, and paste it into new mesh2 at the end of the macro.  But it needs
to be data, so you would need a way to break the string on commas.  Maybe
the macro can take the string, output it to a temp file, and then read the
data back into itself?

It would be nice if Povray could handle more file reading commands, like
keeping track of where you are in a file, reading lines etc.  Also one or
two more string handling commands.  I think the problem with reading and
writing an arbitrary file used to be the risk of messing up the files on
someone elses computer.  Now though there are built-in script restrictions
which guard against virii or other mallicious code.

It shouldnt be too hard to write in some additional file handling code, as
you would probably just give Povray access to the c library code for
handling files.  Since this would be an advanced feauture you could leave
the syntax fairly close to the origional C equivalent.  Unfortunatly as far
as I have seen the only way to get new commands into Povray is to write a
patch, which then goes into Megapov if it is useful, and then finaly gets
included in the next version of the official engine.

I should be able to "compile" my python code into an executable that can be
run on windows.  I haven't tested out the method for doing this though, and
I don't know how high the file size will grow.  Plus people are rightly
leery of downloading and running strange exicutables.  Raw source code is
smaller, less scary, and more portable then exe, so I tried that first.  I
think I will wait until I have all the bugs worked out to release a exe
though.

Man I need to get a signature...


Post a reply to this message

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