POV-Ray : Newsgroups : povray.binaries.images : City SSC WIP 2 Server Time
15 Oct 2026 15:36:05 EDT (-0400)
  City SSC WIP 2 (Message 1 to 19 of 19)  
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

From: nospam
Subject: Re: City SSC WIP 2
Date: 17 Feb 2004 22:02:25
Message: <4032d448.12822716@localhost>
On Sun, 15 Feb 2004 19:06:02 -0800, "Tek" <tek### [at] evilsuperbraincom>
wrote:

>
>This is probably the final version. What do you think of it?
>
>Oh, and just because I can, here's the full source:

That is really cool.  Could you also post the source for the
first version please?

thank you

Pete


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 01:43:19
Message: <40330987$1@news.povray.org>
"nospam" <Pet### [at] nymaliasnetalmost> wrote in message
news:4032d448.12822716@localhost...
> That is really cool.  Could you also post the source for the
> first version please?

Certainly:

#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)/80}pigment{rgb z+y}finish{reflection{.8 metallic.1}
ambient 0}}sky_sphere{pigment{agate scale 2}}

Enjoy :)

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

From: Dave Matthews
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 12:06:08
Message: <40339b80$1@news.povray.org>
> 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}}
> 
OH.  Clever.  I guess that if I traced it out the whole code, I should 
have seen that.

Thanks

Dave Matthews


Post a reply to this message

From: stephen parkinson
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 12:46:36
Message: <4033a4fc@news.povray.org>
Dave Matthews wrote:
> 
>> 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}}
>>
> OH.  Clever.  I guess that if I traced it out the whole code, I should 
> have seen that.
> 
> Thanks
> 
> Dave Matthews
> 

is there a way of capturing the expanded source ?

similar to gcc -S||-s ??

stephen


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 13:11:49
Message: <4033aae5$1@news.povray.org>
I don't believe so, I think pov's # instructions aren't exactly a strict
pre-processor, though I might be completely wrong!

Though it's pretty easy to expand by hand, this is the more readable version I'm
going to submit with my entry:

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

#local Scale = 1/9;    //scale the isosurface to fit inside the unit sphere (the
default container object).
#local MaxGradient = 99;

isosurface{
    function{
        max(
            2+y/Scale-A(x/Scale,0,z/Scale).x*4,    //solid crackle pigment + y
=> horizontal roofs of buildings
            .2-B(x/Scale,0,z/Scale).x    //crackle pigment => walls of
buildings. .2 is the gap between buildings.
        )/MaxGradient   //adjust range of values to fit default max_gradient ==
1
    }
    finish{reflection{0,1}}
}

fog{
    rgb <1,1.2,1.33>
    distance .7
    fog_type 2
    fog_alt.1
}

sky_sphere{pigment{agate}}

sphere{<5.4,-3.6,5.4>, 5}

-- 
Tek
www.evilsuperbrain.com


"stephen parkinson" <ste### [at] zmemw16demoncouk> wrote in message
news:4033a4fc@news.povray.org...
> Dave Matthews wrote:
> >
> >> 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}}
> >>
> > OH.  Clever.  I guess that if I traced it out the whole code, I should
> > have seen that.
> >
> > Thanks
> >
> > Dave Matthews
> >
>
> is there a way of capturing the expanded source ?
>
> similar to gcc -S||-s ??
>
> stephen


Post a reply to this message

From: Christopher James Huff
Subject: Re: City SSC WIP 2
Date: 18 Feb 2004 13:39:52
Message: <cjameshuff-CEE56D.13402718022004@news.povray.org>
In article <4033a4fc@news.povray.org>,
 stephen parkinson <ste### [at] zmemw16demoncouk> wrote:

> is there a way of capturing the expanded source ?
> 
> similar to gcc -S||-s ??

Nope. Macro expansions are done as the scene is parsed, not as a 
preprocessing step.

-- 
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

From: nospam
Subject: Re: City SSC WIP 2
Date: 23 Feb 2004 17:17:55
Message: <403a57f8.2365970@localhost>
On Tue, 17 Feb 2004 22:43:29 -0800, "Tek" <tek### [at] evilsuperbraincom>
wrote:

>> That is really cool.  Could you also post the source for the
>> first version please?
>
>Certainly:
>

Thank you!


Post a reply to this message

From: Marc Champagne
Subject: Re: City SSC WIP 2
Date: 24 Feb 2004 22:52:37
Message: <Xns9499E8B0E6227POVMIKA@203.29.75.35>
"Tek" <tek### [at] evilsuperbraincom> wrote in
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? 

Just 3 words: Evil, Super, Brain

P.S. 1 more word: Outstanding!

> 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} 

-- 
Marc Champagne
marcch.AT.videoSPAMNOTtron.DOT.ca.invalid
Montreal, Canada


Post a reply to this message

From: Tek
Subject: Re: City SSC WIP 2
Date: 24 Feb 2004 23:46:16
Message: <403c2898$1@news.povray.org>
"Marc Champagne" <marcch.AT.videoSPAMNOTtron.DOT.ca.invalid> wrote in message
news:Xns9499E8B0E6227POVMIKA@203.29.75.35...
> Just 3 words: Evil, Super, Brain
>
> P.S. 1 more word: Outstanding!

:D

Thanks!
-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

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