POV-Ray : Newsgroups : povray.unix : Setting the SYS file type Server Time
21 Dec 2024 10:42:50 EST (-0500)
  Setting the SYS file type (Message 1 to 4 of 4)  
From: Jonathan
Subject: Setting the SYS file type
Date: 14 Jul 2012 08:10:01
Message: <web.50015f76efb7f6d6b4d36cf70@news.povray.org>
Hi, I have a short question, which I can't find the answer to in the
documentation.

How do I specify the SYS file type in Linux?  I'm getting an error message
"Possible Parse Error: This platform has not defined a SYS file type".

I've tried setting 'Output_File_Type=T' in
/usr/local/share/povray-3.7/ini/povray.ini, to which the library path is
pointing, but that doesn't seem to work.

--------
Longer background; skip if you know the answer already!
--------
I compiled 3.7 RC 6 from source yesterday, with the intention of using POVRay in
conjunction with the CAD program CYCAS.  CYCAS has the ability to write a  file
and call povray to render it, but it is failing with the error message above.

Specifically, CYCAS is writing an image_map statement that reads
[code]
pigment { image_map { sys "/home/jonathan/CYCAS3//tex/wood1.tga" map_type 0    }
scale <1.00, 1.00> translate <0.00, 0.00> rotate 90*x }
[/code]

If I edit the file s/ sys / tga / then it will render correctly, but that's
clunky and of course I have no control over how CYCAS writes its povray output
(AIUI, using the sys file type in that way is syntactically legal, but not
recommended)

So, how do I tell Povray 3.7 RC 6 that the SYS file type on this platform [1] is
Targa?

Many thanks

Jonathan

[1]jonathan@Odin:~$ uname -a
Linux Odin 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64
x86_64 x86_64 GNU/Linux
jonathan@Odin:~$ povray --version
povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is
discouraged.
POV-Ray 3.7.0.RC6


Post a reply to this message

From: clipka
Subject: Re: Setting the SYS file type
Date: 14 Jul 2012 09:25:20
Message: <50017340$1@news.povray.org>
Am 14.07.2012 14:05, schrieb Jonathan:

> So, how do I tell Povray 3.7 RC 6 that the SYS file type on this platform [1] is
> Targa?

Only way is to modify the source code.

Locate the file "syspovconfig.h" in the "vfe/unix" directory; add the 
following lines right before the final "#endif // __SYSPOVCONFIG_H__" line:

---------------------------------
#define POV_IS1                             ".tga"
#define POV_IS2                             ".TGA"
#define POV_SYS_FILE_EXTENSION              ".tga"
#define SYS_TO_STANDARD                     TGA
#define SYS_HAS_ALPHA
---------------------------------

Locate the file "syspovconfigfrontend.h" in the same directory, and 
remove the following line:

---------------------------------
#define SYS_HAS_GRAYSCALE		// ...
---------------------------------

Rebuild POV-Ray, and it should work as desired.


You may also want to inform the authors of CYCAS that what they're doing 
there is poor practice, and that they should output "tga" instead of 
"sys". (The "sys" file type is actually a legacy from the days when 
preferred image formats differed widely between platforms, and were 
typically non-portable.)


Post a reply to this message

From: Jonathan
Subject: Re: Setting the SYS file type
Date: 14 Jul 2012 11:35:00
Message: <web.50019150152a7c2ab4d36cf70@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 14.07.2012 14:05, schrieb Jonathan:
>
> > So, how do I tell Povray 3.7 RC 6 that the SYS file type on this platform [1] is
> > Targa?
>
> Only way is to modify the source code.
>
<snip patch instructions>
> Rebuild POV-Ray, and it should work as desired.

Indeed it does, that's fantastic, thank you very much.  I make that only about
four hours between my posting the query and having a working patched
installation. Stunning.

> You may also want to inform the authors of CYCAS that what they're doing
> there is poor practice ...

I'm going to send mail to them now.

Thanks again

Jonathan


Post a reply to this message

From: Peter
Subject: Re: Setting the SYS file type
Date: 11 Jun 2015 06:05:01
Message: <web.55795c5b152a7c2a36ba07360@news.povray.org>
"Jonathan" <jno### [at] blueyondercouk> wrote:
>
> > You may also want to inform the authors of CYCAS that what they're doing
> > there is poor practice ...
>
> I'm going to send mail to them now.

Hi,

Did you get an answer? And if yes, when are they going to change the code?

Thanks, Peter


Post a reply to this message

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