POV-Ray : Newsgroups : povray.general : #read Annoyance Server Time
3 Aug 2024 20:17:41 EDT (-0400)
  #read Annoyance (Message 2 to 11 of 11)  
<<< Previous 1 Messages Goto Initial 10 Messages
From: Hugo Asm
Subject: Re: #read Annoyance
Date: 8 Jan 2004 11:56:32
Message: <3ffd8bc0@news.povray.org>
> Is there a way for povray to read a standard ASCII file into
> string variables line at a time with out quotes being in the file?

No. Unless you modify the source-code for POV-Ray and make your own binary.
I've requested such a feature before, but it's unclear wether it will make
it into POV.

I think it had something to do with platform-independancy, so it wouldn't
work.

I know it's annoying sometimes.

Regards,
Hugo


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: #read Annoyance
Date: 8 Jan 2004 12:38:25
Message: <3ffd9591$1@news.povray.org>
In article <3ffd8bc0@news.povray.org> , "Hugo Asm" <hua### [at] post3teledk> 
wrote:

> I think it had something to do with platform-independancy, so it wouldn't
> work.

No, it has nothing to do with that at all.

It is simply the way read is designed to be easy to use by the average user
(as it detects the data type and so on).  POV-Ray is a ray-tracer after all,
not a general purpose scripting language.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Peter Popov
Subject: Re: #read Annoyance
Date: 8 Jan 2004 13:13:10
Message: <3b7rvvgi8bdt90o67n0s5uj46b5vhj3ot2@4ax.com>
On Thu, 8 Jan 2004 17:56:31 +0100, "Hugo Asm" <hua### [at] post3teledk>
wrote:

>No. Unless you modify the source-code for POV-Ray and make your own binary.
>I've requested such a feature before, but it's unclear wether it will make
>it into POV.

Unlikely.

>I think it had something to do with platform-independancy, so it wouldn't
>work.

It's more a security issue.

Anyway, a more or less simple way of doing that is to use a
PRE_SCENE_COMMAND that parses the file in question and converts it to
a format that POV-Ray can read. Easier than patching POV anyway :)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: m1j
Subject: Re: #read Annoyance
Date: 8 Jan 2004 14:55:01
Message: <web.3ffdb4441a5e445c4e1f4eb10@news.povray.org>
Thorsten Froehlich wrote:
>In article <3ffd8bc0[at]news.povray.org> , "Hugo Asm" <hua### [at] post3teledk>
>wrote:
>
>> I think it had something to do with platform-independancy, so it wouldn't
>> work.
>
>No, it has nothing to do with that at all.
>
>It is simply the way read is designed to be easy to use by the average user
>(as it detects the data type and so on).  POV-Ray is a ray-tracer after all,
>not a general purpose scripting language.
>
>    Thorsten
>
>____________________________________________________
>Thorsten Froehlich, Duisburg, Germany
>e-mail: tho### [at] trfde
>
>Visit POV-Ray on the web: http://mac.povray.org

POVRay might just be a raytracer but the SDL is a specialized scripting
language directly for the use in 3D graphics. Why else would it include any
programming capability?

It is nice to know the aim was for ease of use but it would still be nice to
be able to use data generated in other programs directly in POVRay with out
having to convert lots of files outside of POVRay. What I was trying to do
was read an OBJ file and build a mesh2 object during render time. This
would give me direct access to the vertices with out having to spend the
time converting.

But alas it seems this is not to be. It must be too far outside the intent
of POVRay.

>


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: #read Annoyance
Date: 8 Jan 2004 15:42:18
Message: <3ffdc0aa@news.povray.org>
In article <web.3ffdb4441a5e445c4e1f4eb10@news.povray.org> , "m1j" 
<mik### [at] hotmailcom> wrote:

> It is nice to know the aim was for ease of use but it would still be nice to
> be able to use data generated in other programs directly in POVRay with out
> having to convert lots of files outside of POVRay. What I was trying to do
> was read an OBJ file and build a mesh2 object during render time. This
> would give me direct access to the vertices with out having to spend the
> time converting.
>
> But alas it seems this is not to be. It must be too far outside the intent
> of POVRay.

Honestly, writing a program that con be compiled or processed by a fast
interpreter do convert the OBJ file into a format #read will handle will
give you a lot of benefits.  One is that parsing complex directives in
POV-Ray takes a lot of time, simply becaus ethe parser of POV-Ray is not
optimised for this at all.  This in turn will gives you a lot more time
actually render...

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Warp
Subject: Re: #read Annoyance
Date: 8 Jan 2004 16:53:55
Message: <3ffdd173@news.povray.org>
Peter Popov <pet### [at] vipbg> wrote:
> >I think it had something to do with platform-independancy, so it wouldn't
> >work.

> It's more a security issue.

  I don't think it has anything to do with security.
  #read was designed to simply read comma-separated SDL items (such as
floats, vectors, strings, etc). Nothing more.

  (There's a funny and sometimes useful side-effect on how it parses the
file, though...)

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: nathen watson
Subject: Re: #read Annoyance
Date: 8 Jan 2004 23:57:45
Message: <3ffe34c9@news.povray.org>
I also think that POV should be able to read in many kinds of file formats.
I also think that POV should be more than a ray tracer. The SDL ot to be
expanded into a kind of general scripting language, on a level comparable
with something like python.


Post a reply to this message

From: Tom Melly
Subject: Re: #read Annoyance
Date: 9 Jan 2004 06:03:25
Message: <3ffe8a7d@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3ffdd173@news.povray.org...
>
>   (There's a funny and sometimes useful side-effect on how it parses the
> file, though...)

Are you going to tell us what it is, or do I have to post another link to
http://tinyurl.com/yuqbc ?


Post a reply to this message

From: Peter Popov
Subject: Re: #read Annoyance
Date: 9 Jan 2004 10:04:25
Message: <tjgtvvgt2rmujjhcgv8tsjo75rr4tha7iu@4ax.com>
On 8 Jan 2004 16:53:55 -0500, Warp <war### [at] tagpovrayorg> wrote:

>  I don't think it has anything to do with security.

Before I/O restrictions were introduced, the main reason to reject a
patch correcting the #read behaviour was that it would make it
possible to read system-critical files such as config.sys


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Warp
Subject: Re: #read Annoyance
Date: 9 Jan 2004 21:18:13
Message: <3fff60e5@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> >   (There's a funny and sometimes useful side-effect on how it parses the
> > file, though...)

> Are you going to tell us what it is, or do I have to post another link to
> http://tinyurl.com/yuqbc ?

  If you put for example a #declare something=something_else statement
in a file which you then #fopen and #read, POV-Ray will parse that #declare
as soon as it finds it exactly as if you had #included the file instead
(so that it contains the #declare alone without the extra data you are
#reading).

  In other words, if you have something like this in your file:

1, 2, 3,
#declare Array = array[4] { <1,2,3>, <4,5,6>, <7,8,9>, <10,11,12> };
4, 5, 6

and then you #read those floats, after you have read the "4" POV-Ray
will have declared Array as an array of vectors containing those values.

  (This feature has been *extremely* useful in the PCM format.)

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

<<< Previous 1 Messages Goto Initial 10 Messages

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