POV-Ray : Newsgroups : povray.binaries.images : City SSC WIP 2 Server Time
14 Nov 2024 14:20:05 EST (-0500)
  City SSC WIP 2 (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: Tek
Subject: City SSC WIP 2
Date: 15 Feb 2004 22:06:41
Message: <403033c1@news.povray.org>
After thee feedback from my last posting, I've decided to enter the city image
in the short code contest. I've managed to find enough room in the 256 bytes of
source to add some fog and a hill in the distance, and to completely change the
colours, I'm really pleased with the result :)

This is probably the final version. What do you think of it?

Oh, and just because I can, here's the full source:
#macro C()function{pigment{crackle#end#local A=C()solid}}#local
B=C()}}isosurface{function{max(2+y*9-A(x*9,0,z*9).x*4,.2-B(x*9,0
,z*9).x)/99}finish{reflection{0,1}}}fog{rgb 1+y/5+z/3distance.7
fog_type 2fog_alt.1}sky_sphere{pigment{agate}}sphere{9*(.6-y),5}

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message


Attachments:
Download 'city2.jpg' (25 KB)

Preview of image 'city2.jpg'
city2.jpg


 

From: Art Flint
Subject: Re: City SSC WIP 2
Date: 15 Feb 2004 23:27:44
Message: <403046c0$1@news.povray.org>
Tek wrote:
> After thee feedback from my last posting, I've decided to enter the city image
> in the short code contest. I've managed to find enough room in the 256 bytes of
> source to add some fog and a hill in the distance, and to completely change the
> colours, I'm really pleased with the result :)
> 
> This is probably the final version. What do you think of it?
> 
> Oh, and just because I can, here's the full source:
> #macro C()function{pigment{crackle#end#local A=C()solid}}#local
> B=C()}}isosurface{function{max(2+y*9-A(x*9,0,z*9).x*4,.2-B(x*9,0
> ,z*9).x)/99}finish{reflection{0,1}}}fog{rgb 1+y/5+z/3distance.7
> fog_type 2fog_alt.1}sky_sphere{pigment{agate}}sphere{9*(.6-y),5}
> 
> 
I have a new wallpaper now. Thanks!


Post a reply to this message

From: Dan P
Subject: Re: City SSC WIP 2
Date: 16 Feb 2004 00:15:28
Message: <403051f0$1@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote in message
news:403033c1@news.povray.org...
> After thee feedback from my last posting, I've decided to enter the city
image
> in the short code contest. I've managed to find enough room in the 256
bytes of
> source to add some fog and a hill in the distance, and to completely
change the
> colours, I'm really pleased with the result :)
>
> This is probably the final version. What do you think of it?
>
> Oh, and just because I can, here's the full source:
> #macro C()function{pigment{crackle#end#local A=C()solid}}#local
> B=C()}}isosurface{function{max(2+y*9-A(x*9,0,z*9).x*4,.2-B(x*9,0
> ,z*9).x)/99}finish{reflection{0,1}}}fog{rgb 1+y/5+z/3distance.7
> fog_type 2fog_alt.1}sky_sphere{pigment{agate}}sphere{9*(.6-y),5}

What do I think, Tek? I think you kicked my entry's ass. :-)
Great job!


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 16 Feb 2004 03:22:52
Message: <40307ddc$1@news.povray.org>
"Dan P" <dan### [at] yahoocom> wrote in message
news:403051f0$1@news.povray.org...
> What do I think, Tek? I think you kicked my entry's ass. :-)
> Great job!

:D
Well in my defence I mostly fluked it!

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

From: Roberto A 
Subject: Re: City SSC WIP 2
Date: 16 Feb 2004 08:10:53
Message: <4030c15d@news.povray.org>
> This is probably the final version. What do you think of it?

Fantastic, specially considering how short the code is.

I don't want to sound picky, but there are some "jaggies" here and there...
is that because of lack of isosurface anti-aliasing?

Regards...

>
> Oh, and just because I can, here's the full source:
> #macro C()function{pigment{crackle#end#local A=C()solid}}#local
> B=C()}}isosurface{function{max(2+y*9-A(x*9,0,z*9).x*4,.2-B(x*9,0
> ,z*9).x)/99}finish{reflection{0,1}}}fog{rgb 1+y/5+z/3distance.7
> fog_type 2fog_alt.1}sky_sphere{pigment{agate}}sphere{9*(.6-y),5}
>
> --
> Tek
> www.evilsuperbrain.com
>
>
>


Post a reply to this message

From: Dan P
Subject: Re: City SSC WIP 2
Date: 16 Feb 2004 10:12:20
Message: <4030ddd4$1@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote in message
news:40307ddc$1@news.povray.org...
> "Dan P" <dan### [at] yahoocom> wrote in message
> news:403051f0$1@news.povray.org...
> > What do I think, Tek? I think you kicked my entry's ass. :-)
> > Great job!
>
> :D
> Well in my defence I mostly fluked it!

Such humility :-) I looked at your isosurface code and picked up my jaw some
minutes later. If I were a bettin' man, I'd bet you taking home the entire
prize for both artistic and technical. Nice job! :-)


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 16 Feb 2004 23:08:30
Message: <403193be$1@news.povray.org>
"Dan P" <dan### [at] yahoocom> wrote in message
news:4030ddd4$1@news.povray.org...
> Such humility :-) I looked at your isosurface code and picked up my jaw some
> minutes later. If I were a bettin' man, I'd bet you taking home the entire
> prize for both artistic and technical. Nice job! :-)

Well the technique for that isosurface was something that took me along time to
figure out, quite some time ago. All I've done here is adapt it to a tiny amount
of code :)

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 16 Feb 2004 23:16:21
Message: <40319595$1@news.povray.org>
"Roberto A." <wol### [at] hot-mailcom> wrote in message
news:4030c15d@news.povray.org...
> I don't want to sound picky, but there are some "jaggies" here and there...
> is that because of lack of isosurface anti-aliasing?

Yeah, it's kind of an aliasing issue...

Basically there's 3 settings that control the appearance of an isosurface
definition: contained_by{}, max_gradient, and accuracy.

Obviously in my 256 bytes of source I don't have room for any of these, so I use
pov's defaults then work round the problems:
- the default contained_by shape is the unit sphere, so I scale my function down
to fit that (that's why the function has x*9,y*9,z*9)
- the default max_gradient is 1, so I adjust the range of values my function
will produce to fit that (by dividing the whole function by 99)
- the default accuracy is 0.001, i.e. 1/1000th the size of the default container
shape. There is nothing I can do to fake this, hence you get those artefacts.

I still have 1 byte spare, so if you can think of a way to adjust the "accuracy"
setting using just 1 byte I'd be most appreciative ;)

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

From: Dave Matthews
Subject: Re: City SSC WIP 2
Date: 17 Feb 2004 10:33:47
Message: <4032345b$1@news.povray.org>
Tek wrote:


> Oh, and just because I can, here's the full source:
> #macro C()function{pigment{crackle#end#local A=C()solid}}#local
> B=C()}}isosurface{function{max(2+y*9-A(x*9,0,z*9).x*4,.2-B(x*9,0
> ,z*9).x)/99}finish{reflection{0,1}}}fog{rgb 1+y/5+z/3distance.7
> fog_type 2fog_alt.1}sky_sphere{pigment{agate}}sphere{9*(.6-y),5}
> 
Please use the proper newsgroup for posting source ( ;-) )  Some of us 
have bandwidth concerns. . . .

Dave Matthews

BTW Thanks for posting it.  As I decipher, maybe I'll figure out some 
tricks for reducing my own code.

Hmm.  How do you know that, for example, some end "}" are unnecessary? 
(I assume that, as usual, I'm missing something in the manual.)


Post a reply to this message

From: Christopher James Huff
Subject: Re: City SSC WIP 2
Date: 17 Feb 2004 19:09:48
Message: <cjameshuff-881346.19102217022004@news.povray.org>
In article <4032345b$1@news.povray.org>,
 Dave Matthews <dma### [at] nospamnet> wrote:

> Hmm.  How do you know that, for example, some end "}" are unnecessary? 
> (I assume that, as usual, I'm missing something in the manual.)

All { braces must have a matching } brace. This scene just puts the 
opening braces in the macro, and the closing braces after the calls to 
that macro. Cleanly indented, the code's a lot easier to understand:

#macro C()
    function {
        pigment {crackle
#end

#local A = C() solid}}

#local B = C() }}

This is equivalent to:

#local A = function {pigment {crackle solid}}

#local B = function {pigment {crackle}}

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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