|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I would like to generate a df3 file directly from a pov script,
generating it from pigments, a bit like Gilles' makecloud macro. But I
had a look at the documentation, and it seems that you can only output
text to a file.
So I was wondering if there was a trick to do it, and if not, if it's
going to be implemented in some next POVray version.
JC
PS: I know I can generate images with povray and make a df3 file with
some utility, but I already have too much utilities installed and I'd
like to do it in one step.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 22 Aug 2003 10:35:17 +0200, "JC (Exether)" <no### [at] spamfr> wrote:
> I would like to generate a df3 file directly from a pov script,
> generating it from pigments, a bit like Gilles' makecloud macro. But I
> had a look at the documentation, and it seems that you can only output
> text to a file.
> So I was wondering if there was a trick to do it, and if not, if it's
> going to be implemented in some next POVray version.
It was discussed a few times. It is not possible to make binary files.
> JC
> PS: I know I can generate images with povray and make a df3 file with
> some utility, but I already have too much utilities installed and I'd
> like to do it in one step.
See text format called extended density_file format at
http://staff.aist.go.jp/r-suzuki/e/povray/iso/df_body.htm
ABX
Post a reply to this message
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Re: Writing binary files with POV script
Date: 22 Aug 2003 04:51:39
Message: <3F45D99B.9A2BD0BB@gmx.de>
|
|
|
| |
| |
|
|
"JC (Exether)" wrote:
>
> I would like to generate a df3 file directly from a pov script,
> generating it from pigments, a bit like Gilles' makecloud macro. But I
> had a look at the documentation, and it seems that you can only output
> text to a file.
http://staff.aist.go.jp/r-suzuki/e/povray/iso/df_body.htm
This patch can read text density files.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 17 Jun. 2003 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ABX <abx### [at] abxartpl> wrote:
> It was discussed a few times. It is not possible to make binary files.
The reason for this is that due to how POV-Ray (well, actually C)
internally works, you can't write the byte value 0 to a file (any other
value is writable).
In order to be able to write any byte values (including 0) to a file,
a specialized function would have to be added. Perhaps someone could make
a patch...
(The reason why 0 is not writable is because in C's string-handling
functions it marks the end of the string. The writing C function will
stop at that point and will not write the 0 nor anything which comes
after it. In order to write raw binary data, a different C function
needs to be used (which is not a string function). There's no feature
in the POV-Ray scripting language which would use such function and
thus this is not possible currently.)
--
#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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
By the way, in theory it could be possible to write a DF3 file from
POV-Ray as long as it doesn't contain any 0 byte... :)
--
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
JC (Exether) wrote:
>
> I would like to generate a df3 file directly from a pov script,
> generating it from pigments, a bit like Gilles' makecloud macro. But I
> had a look at the documentation, and it seems that you can only output
> text to a file.
>
> So I was wondering if there was a trick to do it, and if not, if it's
> going to be implemented in some next POVray version.
>
> JC
> PS: I know I can generate images with povray and make a df3 file with
> some utility, but I already have too much utilities installed and I'd
> like to do it in one step.
I suppose that you could use chr() to write the bytes to the file.
Regards,
John
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
How about this:
Use the existing file output functions to write
a hex-ASCII version of your file, and then, in
a POV INI file, use the Post_Scene_Command or
Post_Frame_Command directive to execute a
converter app to turn the text into binary form.
Ray Gardener
Daylon Graphics Ltd.
"Heightfield modeling perfected"
http://www.daylongraphics.com
"JC (Exether)" <no### [at] spamfr> wrote in message
news:3f45d5c6$1@news.povray.org...
> I would like to generate a df3 file directly from a pov script,
> generating it from pigments, a bit like Gilles' makecloud macro. But I
> had a look at the documentation, and it seems that you can only output
> text to a file.
>
> So I was wondering if there was a trick to do it, and if not, if it's
> going to be implemented in some next POVray version.
>
> JC
> PS: I know I can generate images with povray and make a df3 file with
> some utility, but I already have too much utilities installed and I'd
> like to do it in one step.
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ray Gardener" <ray### [at] daylongraphicscom> wrote in
news:3f465ced$1@news.povray.org:
> How about this:
>
> Use the existing file output functions to write
> a hex-ASCII version of your file, and then, in
> a POV INI file, use the Post_Scene_Command or
> Post_Frame_Command directive to execute a
> converter app to turn the text into binary form.
>
> Ray Gardener
> Daylon Graphics Ltd.
> "Heightfield modeling perfected"
> http://www.daylongraphics.com
>
>
>
>
> "JC (Exether)" <no### [at] spamfr> wrote in message
> news:3f45d5c6$1@news.povray.org...
>> I would like to generate a df3 file directly from a pov script,
>> generating it from pigments, a bit like Gilles' makecloud macro. But I
>> had a look at the documentation, and it seems that you can only output
>> text to a file.
>>
>> So I was wondering if there was a trick to do it, and if not, if it's
>> going to be implemented in some next POVray version.
>>
>> JC
>> PS: I know I can generate images with povray and make a df3 file with
>> some utility, but I already have too much utilities installed and I'd
>> like to do it in one step.
>>
Being from the Unix arena, there is always a way even when it seems
impossible. Bright idea Ray!
--
(MIKA) Marc Champagne
marcch.AT.videotron.DOT.ca
Montreal, CANADA
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 22 Aug 2003 10:35:17 +0200, "JC (Exether)" <no### [at] spamfr> wrote:
>I would like to generate a df3 file directly from a pov script,
>generating it from pigments, a bit like Gilles' makecloud macro. But I
>had a look at the documentation, and it seems that you can only output
>text to a file.
For years I've been wishing that binary file read/write commands
would be added to povray (I once has a pov-script that was
rendering audio data to a text file. I ended up writing it as
something like a uuencoded file and then having a separate
program to in turn convert that text file to the wave file).
However, it might is best that vinary I/O not be added.
Consider the ability to have a pov-script that in turn writes
a (binary) .exe file containing a virus? Or what is to stop
povray from overwriting the system password file, or
command.com?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
nospam wrote:
> However, it might is best that vinary I/O not be added.
> Consider the ability to have a pov-script that in turn writes
> a (binary) .exe file containing a virus? Or what is to stop
> povray from overwriting the system password file, or
> command.com?
The very same thing that prevents the text I/O feature of POV
from overwriting command.com with a text file: the inherent
pure-hearted goodness of the POV community. ;)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |