POV-Ray : Newsgroups : povray.binaries.scene-files : Most convoluted scene of its kind? Server Time
1 Sep 2024 16:14:03 EDT (-0400)
  Most convoluted scene of its kind? (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: Andrew the Orchid
Subject: Most convoluted scene of its kind?
Date: 30 Oct 2004 15:48:16
Message: <4183f000@news.povray.org>
OK, so check out the attachment. If any of you can figure out what it is 
without running it, I'll be impressed... heh!

Pointless? Probably. Effective? Not really. Impressive? You decide.

(Oh yeah - and the lighting sucks!)

Andrew.


Post a reply to this message


Attachments:
Download 'us-ascii' (5 KB)

From: povray
Subject: Re: Most convoluted scene of its kind?
Date: 31 Oct 2004 10:50:03
Message: <132ao0lidlao226ugjc06jt99fj3pepa0g@4ax.com>
On Sat, 30 Oct 2004 20:47:49 +0100, Andrew the Orchid <voi### [at] devnull>
wrote:

>OK, so check out the attachment. If any of you can figure out what it is 
>without running it, I'll be impressed... heh!
>
>Pointless? Probably. Effective? Not really. Impressive? You decide.
>
>(Oh yeah - and the lighting sucks!)
>
>Andrew.

From looking at the code, I'll guess it reads the strings
with a hex-coded file (sort of like uuencode, binhex, or
mime) in them.  This is output as a "pseudo binary" file,
with each one or zero being written as asn ascii zero or
ascii one, separated by commas.  This is turn is read
back in and read through what looks like a fixed huffman
tree decompressor[1] which yeilds a file containing the
actual povray scene file.

Now I'm going to render it and see.  :)

Most impressive coding, regardless of what the final
scene ends up being.  Stuff like this makes me
wish pov-ray had actual "real" binary file I/O.

-- 
[1] I just happend to be reading up on data
compression recently,  nice synchronicity there,
:D



-- 
to all the companies who wait until a large user base becomes
dependant on their freeware, then shafting said happy campers with
mandatory payment for continued usage. I spit on your grave.


Post a reply to this message

From: Andrew the Orchid
Subject: Re: Most convoluted scene of its kind?
Date: 31 Oct 2004 11:28:13
Message: <4185129d@news.povray.org>
> From looking at the code, I'll guess it reads the strings
> with a hex-coded file (sort of like uuencode, binhex, or
> mime) in them.  This is output as a "pseudo binary" file,
> with each one or zero being written as asn ascii zero or
> ascii one, separated by commas.  This is turn is read
> back in and read through what looks like a fixed huffman
> tree decompressor[1] which yeilds a file containing the
> actual povray scene file.

Yups, that is indeed *exactly* what it does.

(Would have used canonical Huffman rather than explicitly storing the 
codebook - but the code to recompute the codebook is larger than the 
codebook itself, so...)

It's not uuencode or BASE-64 or anything... just plain vanila hexdecimal 
8-D Would probably take up less space if I changed it to BASE-64... (Uh, 
I mean, it would *definitely* take up less space... but not sure about 
the decode part!)

> Now I'm going to render it and see.  :)

Heh. Hope you have a fast PC...

Seriously... the hex -> binary decode is almost instant. The Huffman 
decompression takes ~30 seconds or so. And the image itself takes 
*forever*...

> Most impressive coding, regardless of what the final
> scene ends up being.  Stuff like this makes me
> wish pov-ray had actual "real" binary file I/O.

Why thank you.

I'm actually impressed that I can get POV-Ray to dump raw binary. (I 
presume you noticed that I only bothered having encodings for 7-bit 
ASCII?) I could get #write() to produce arbitrary binary, actually... 
Like you say, a pitty that #read() can't pick up a character at a time...

(If it could, those WriteBinary() macros would vanish. Just #write() the 
hex to a file, then read it back and convert to binary in another file - 
then read *that* back like it currently does. Would be nice to dispence 
with the commas also...)

I actually tried to write a version that uses arithmatic coding. In 
fact, it works. Expect... Sometimes - just sometimes - the decoder 
utterly looses synchronisation with the encoder, and I can't figure out 
why. :'(

So there we have it - a 4KB file that produces a 1KB file and renders 
it. Worth it? Nah. Fun? Well, you decide. ;-)

Andrew.


Post a reply to this message

From: Maurice
Subject: Re: Most convoluted scene of its kind?
Date: 31 Oct 2004 12:39:30
Message: <41852352$1@news.povray.org>
Andrew the Orchid wrote:
> OK, so check out the attachment. If any of you can figure out what it is 
> without running it, I'll be impressed... heh!
> 
> Pointless? Probably. Effective? Not really. Impressive? You decide.
> 
> (Oh yeah - and the lighting sucks!)

A very interesting way to create a reflecting sphere on a checkered plane.

-- 
Maurice


Post a reply to this message

From: Andrew the Orchid
Subject: Re: Most convoluted scene of its kind?
Date: 31 Oct 2004 13:22:45
Message: <41852d75@news.povray.org>
> A very interesting way to create a reflecting sphere on a checkered plane.

Thanks.

"Interesting" as in "oh, that's interesting"?
Or "interesting" as in "what the hell?... WHY did you do this???!"

BTW... what do you make of the actual picture? Did you get it to 
complete rendering? (I have not done this yet - it takes too long.)

Andrew.


Post a reply to this message

From: JWV
Subject: Re: Most convoluted scene of its kind?
Date: 1 Nov 2004 09:08:48
Message: <41864370@news.povray.org>
No idea why you did it, or what you did, but since it takes rather long to
render, i thought it would be nice to share the result.

Took 12 mins on a 1.3 GHz centrino.

JWV

"Andrew the Orchid" <voi### [at] devnull> wrote in message
news:4183f000@news.povray.org...
> OK, so check out the attachment. If any of you can figure out what it is
> without running it, I'll be impressed... heh!
>
> Pointless? Probably. Effective? Not really. Impressive? You decide.
>
> (Oh yeah - and the lighting sucks!)
>
> Andrew.
>


----------------------------------------------------------------------------
----


> #macro BinaryWrite(D)
>   #local lp = 1;
>   #while (lp<=strlen(D))
>     #local C = substr(D, lp, 1);
>
>     #switch (asc(C))
>       #case (asc("0")) #write(Dst, "0, 0, 0, 0,\n") #break
>       #case (asc("1")) #write(Dst, "0, 0, 0, 1,\n") #break
>       #case (asc("2")) #write(Dst, "0, 0, 1, 0,\n") #break
>       #case (asc("3")) #write(Dst, "0, 0, 1, 1,\n") #break
>       #case (asc("4")) #write(Dst, "0, 1, 0, 0,\n") #break
>       #case (asc("5")) #write(Dst, "0, 1, 0, 1,\n") #break
>       #case (asc("6")) #write(Dst, "0, 1, 1, 0,\n") #break
>       #case (asc("7")) #write(Dst, "0, 1, 1, 1,\n") #break
>       #case (asc("8")) #write(Dst, "1, 0, 0, 0,\n") #break
>       #case (asc("9")) #write(Dst, "1, 0, 0, 1,\n") #break
>       #case (asc("A")) #write(Dst, "1, 0, 1, 0,\n") #break
>       #case (asc("B")) #write(Dst, "1, 0, 1, 1,\n") #break
>       #case (asc("C")) #write(Dst, "1, 1, 0, 0,\n") #break
>       #case (asc("D")) #write(Dst, "1, 1, 0, 1,\n") #break
>       #case (asc("E")) #write(Dst, "1, 1, 1, 0,\n") #break
>       #case (asc("F")) #write(Dst, "1, 1, 1, 1,\n") #break
>     #end
>
>     #local lp = lp + 1;
>   #end
> #end
>
> #declare FileName = "File2"
>
> #fopen Dst concat(FileName, ".tmp") write
>
BinaryWrite("5246D5A6613EC7292F5B9B870A5118502118283089F14BBA53D6E6E01CF9E6E
3E7ED660C7E381004")
>
BinaryWrite("561728000200E7D8E7004252FC3A08D046811319962CC18F12738FB55700E0A
511850623050C208D")
>
BinaryWrite("4E638FBECC2F4120F8B48AA1229673D2D55652316915424D704D5E1A32C5983
1E24E71F6AAE01C28")
>
BinaryWrite("391850C460A508235398E3EFB30BD048362D22A848A59CF4B555948C5A45509
35C1357868CCB8B08")
>
BinaryWrite("A53E613E71A32AEB807411A08D0208C3467DF439E7DD4FC27FCD598369AFE0A
731C7DF661787288C")
>
BinaryWrite("A234088CFF8B5B5670C9FF84FFFA4696BA6BF44FFF976B631696AAB2A7FFCE3
6947B137A09079FFF")
>
BinaryWrite("B71E60C6D1C768250049FFF1B4F4B18B5654FFFDD0B6529EB737820907040E5
11944681119FF8CFC")
>
BinaryWrite("66332E2C2294F984F9AC4B6B80F23050C4868CFBE873CFBA9F84FF9AB306D35
FC1432940155EA731")
>
BinaryWrite("C7DF661795A9CC71F7D985E88CFF8B5B5670CE091A5AE9AFD119F8CC665C584
529F309F35896D700")
>
BinaryWrite("A3C8C15049519F18E631C133EFA1CF3EEB81AB306D35FC14E638FBECC2DF951
8CFADAFAB5BAE7E13")
>
BinaryWrite("FE36852D33FF09FFF39497BEAD6D3381446A731C7DF661787288D0468241C40
250E3404500E33FFE")
>
BinaryWrite("2A9A72DE3E7FFE13FFFE6B12D4DCFFFFA9CC71F6246A4D9FFFF84FFFFF81504
A35398E3EFB30BD00")
>
BinaryWrite("69FFFFF02A0906D4E638FBECC2F401A7FFFFC0A5128D4E638FBECC2F280D3FF
FF19FFFF094D9BC1E")
>
BinaryWrite("7D967B29AAAD0483467FFFCE52595A09069FFF8CFFFADAFAB03A58765227FE3
3F198CCB8B08A53E6")
>
BinaryWrite("13E6B12DAE01479185005119F18E631C133EFA1CF3EEB81AB306D35FC14E638
FBECC2DF9518CFADA")
>
BinaryWrite("FAB5BAE7E13FE36852D33FF09FFF39497BEAD6D3381446A731C7DF661787411
A0907232840250E34")
>
BinaryWrite("04500E33FFE2A9A72DE3E7FFE13FFFE6B12D4DCFFFFBED2D39897D614320107
CFFFC67FFD6D7D581")
> BinaryWrite("D2C3B069FF8CFC6632")
> #fclose Dst
>
> #declare Codebook= array[128]
> {
>   "*", "*", "*", "*", "*", "*", "*", "*",
>   "*", "*", "*", "*", "*", "1001", "*", "*",
>   "*", "*", "*", "*", "*", "*", "*", "*",
>   "*", "*", "*", "*", "*", "*", "*", "*",
>   "11", "*", "*", "*", "*", "*", "*", "*",
>   "000000010", "000000011", "00000100", "0000101", "001000", "00000101",
"001001", "0000000000",
>   "01000", "001010", "0000110", "000000100", "0000000001", "00000110",
"*", "*",
>   "00000111", "*", "*", "*", "0000111", "*", "0001000", "*",
>   "*", "*", "*", "*", "*", "*", "*", "*",
>   "*", "*", "*", "*", "*", "*", "*", "*",
>   "*", "*", "*", "*", "*", "*", "*", "*",
>   "*", "*", "*", "000000101", "*", "000000110", "*", "0001001",
>   "*", "01001", "001011", "01010", "0001010", "1010", "0001011", "001100",
>   "0001100", "01011", "00001000", "0000000010", "01100", "0001101",
"01101", "01110",
>   "001101", "*", "1011", "001110", "01111", "001111", "000000111",
"00001001",
>   "0001110", "0001111", "0000000011", "10000", "*", "10001", "*", "*"
> };
>
> #declare UnpackedBytes = 1263;
>
> #macro Main()
>   #local Word = "";
>   #local Bytes = 0;
>   #while (Bytes<UnpackedBytes)
>     #read(Src, BitID)
>     #local Bit = str(BitID, 0, 0);
>     #local Word = concat(Word, Bit);
>
>     #local Index = -1;
>     #local lp = 0;
>     #while (lp<128)
>       #if (strcmp(Word, Codebook[lp])=0) #local Index = lp; #local lp =
200; #end
>       #local lp = lp + 1;
>     #end
>
>     #if (Index>=0)
>       #write(Dst, chr(Index))
>       #local Word = "";
>       #local Bytes = Bytes + 1;
>     #end
>   #end
> #end
>
> #fopen Src concat(FileName, ".tmp") read
> #fopen Dst concat(FileName, ".inc") write
> Main()
> #fclose Dst
> #fclose Src
>
> #include concat(FileName, ".inc")
>


Post a reply to this message


Attachments:
Download 'Huffman2.bmp' (15 KB)

From: Maurice
Subject: Re: Most convoluted scene of its kind?
Date: 1 Nov 2004 12:53:26
Message: <41867816$1@news.povray.org>
JWV wrote:
> No idea why you did it, or what you did, but since it takes rather long to
> render, i thought it would be nice to share the result.
> 
> Took 12 mins on a 1.3 GHz centrino.
> 
> JWV
> 

If that one took you 12mins, I wonder what the result is for the 
standard benchmark on that machine.

-- 
Maurice


Post a reply to this message

From: Maurice
Subject: Re: Most convoluted scene of its kind?
Date: 1 Nov 2004 14:56:04
Message: <418694d4@news.povray.org>
Andrew the Orchid wrote:
>> A very interesting way to create a reflecting sphere on a checkered 
>> plane.
> 
> 
> Thanks.
> 
> "Interesting" as in "oh, that's interesting"?
> Or "interesting" as in "what the hell?... WHY did you do this???!"

Both. :-)

> 
> BTW... what do you make of the actual picture? Did you get it to 
> complete rendering? (I have not done this yet - it takes too long.)

I agree. The render takes very long. On my AMD64 3000+, I get about 
3PPS. So, I didn't bother to render it bigger than 160x120 (1h20m). I'm 
not sure what the extra 2 planes are doing. I can see that the plane{+y, 
-0.1} adds some nice ground effect. But it is also the one responsible 
for the slow render. I can't figure out what the plane{+y, +40} is doing 
though. Leaving it out doesn't seem to change anything.

> 
> Andrew.


Post a reply to this message


Attachments:
Download 'hufmann.bmp' (57 KB)

From: JWV
Subject: Re: Most convoluted scene of its kind?
Date: 1 Nov 2004 15:05:32
Message: <4186970c@news.povray.org>
Hi,

How does one start the standard benchmark? When I render the file
benchmark.pov, it shows the image while rendering, and I can set the
resolution of the image. This should not be possible according to the
manual.(1.10.7.1.5  Run Benchmark)

JWV

BTW: was your reply meant as: "wow, 12 mins, thats slow", or "wow, 12 mins,
thats fast"?


"Maurice" <cel### [at] nospamhotmailcom> wrote in message
news:41867816$1@news.povray.org...
> JWV wrote:
> > No idea why you did it, or what you did, but since it takes rather long
to
> > render, i thought it would be nice to share the result.
> >
> > Took 12 mins on a 1.3 GHz centrino.
> >
> > JWV
> >
>
> If that one took you 12mins, I wonder what the result is for the
> standard benchmark on that machine.
>
> -- 
> Maurice


Post a reply to this message

From: Maurice
Subject: Re: Most convoluted scene of its kind?
Date: 1 Nov 2004 15:13:58
Message: <41869906@news.povray.org>
JWV wrote:
> Hi,
> 
> How does one start the standard benchmark? When I render the file
> benchmark.pov, it shows the image while rendering, and I can set the
> resolution of the image. This should not be possible according to the
> manual.(1.10.7.1.5  Run Benchmark)
> 

Assuming you have POVray 3.6. Start the application, then from the 
Render menu select the "Run Benchmark" option.

> JWV
> 
> BTW: was your reply meant as: "wow, 12 mins, thats slow", or "wow, 12 mins,
> thats fast"?
> 

12mins seems awfully fast for a Centrino 1.3GHz. I have an AMD64 3000+ 
and it took me 25mins to render at the same size (+h60 +w80 +a0.3). That 
said, you did ofcourse switch on anti-aliasing?

-- 
Maurice


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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