POV-Ray : Newsgroups : povray.binaries.images : Cell Shader: my try Server Time
16 Aug 2024 04:20:13 EDT (-0400)
  Cell Shader: my try (Message 1 to 10 of 34)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Zeger Knaepen
Subject: Cell Shader: my try
Date: 24 Apr 2002 22:57:33
Message: <3cc7709d@news.povray.org>
Sometimes I wonder why I'm always copying other people's work...
Maybe because I don't need inspiration for that, and inspiration is exactly what
I don't have these days...

Anyway, this is my version of the cell-shader.  It works with
perspective-cameras.

Comments welcome, as always :)

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message


Attachments:
Download 'cellshadertest.jpg' (19 KB)

Preview of image 'cellshadertest.jpg'
cellshadertest.jpg


 

From: Kevin Loney
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 00:00:30
Message: <3cc77f5e$1@news.povray.org>
gah, why can't I get mine to work with a perspective camera :(

I like

--
Kevin
http://www.geocities.com/qsquared_1999/
#macro _(r)#if(r<12)#local
i=asc(substr("oqshilacefg",r,1))-97;disc{<mod(i,7)-3,div(i,7)-1,6>,z,.4pigme
nt{rgb 10}}_(r+1)#end#end _(1)//KL


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 00:01:58
Message: <3cc77fb6$1@news.povray.org>
> gah, why can't I get mine to work with a perspective camera :(
dunno, give me your code, and I'll take a look at it.  Maybe I can give you some
hints...
Your version *is* a shader, right?

> I like
tnx!

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message

From: Slime
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 00:28:47
Message: <3cc785ff$1@news.povray.org>
So, how do these work? Are they functions that take the cross product of the
normal with the vector from the camera? No, that doesn't seem possible...

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

From: Wolfgang Manousek
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 03:02:48
Message: <3cc7aa18@news.povray.org>
well - nice ..

can someone point me to a description of the term cell-shader?

thx
Wolfgang
"Zeger Knaepen" <zeg### [at] studentkuleuvenacbe> wrote in message
news:3cc7709d@news.povray.org...
> Sometimes I wonder why I'm always copying other people's work...
> Maybe because I don't need inspiration for that, and inspiration is
exactly what
> I don't have these days...
>
> Anyway, this is my version of the cell-shader.  It works with
> perspective-cameras.
>
> Comments welcome, as always :)
>
> cu!
> --
> camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local
C=0
> ;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local
C=C+1
> ;#end#end
L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
> <.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK
http://www.povplace.be.tf
>
>
>


Post a reply to this message

From: Rick [Kitty5]
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 05:55:10
Message: <3cc7d27e@news.povray.org>
> Comments welcome, as always :)

nice, hows about the source :)


--
Rick

Kitty5 WebDesign - http://Kitty5.com
POV-Ray News & Resources - http://Povray.co.uk
TEL : +44 (01270) 501101 - FAX : +44 (01270) 251105 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA


Post a reply to this message

From: Hugo
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 06:55:04
Message: <3cc7e088@news.povray.org>
> nice, hows about the source :)

Ditto, but I guess it only runs in PovMan. When Pov3.5 is released, I hope
the next MegaPOV will have those extra features from PovMan, Clothray, MLpov
and whatever is out there.

So, you ran with the glory and left Kevin in the dark corner... Well, what
can I say... Rendertime?

Regards,
Hugo


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 08:25:11
Message: <3cc7f5a7@news.povray.org>
> > nice, hows about the source :)
I'll give it when it's cleaned up :)

> Ditto, but I guess it only runs in PovMan. When Pov3.5 is released, I hope
> the next MegaPOV will have those extra features from PovMan, Clothray, MLpov
> and whatever is out there.
Yep, it's a shader, so it only runs in POVMan...

> So, you ran with the glory and left Kevin in the dark corner... Well, what
> can I say... Rendertime?
Rendertime: 19 seconds on a P3-450MHZ 320MB RAM running W98SE, lowest render
priority, highest GUI-priority.

And I hope I didn't really offend anyone with this copying... :-/

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 08:26:33
Message: <3cc7f5f9@news.povray.org>
> well - nice ..
doesn't sound very enthousiastic, but tnx! :)

> can someone point me to a description of the term cell-shader?
Hmmm, I just tried to copy the effect Kevin seemed to be trying to get.  As I
understand it, a cell-shader is supposed to make 3D-objects look like drawings.

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Cell Shader: my try
Date: 25 Apr 2002 08:27:05
Message: <3cc7f619$1@news.povray.org>
> So, how do these work? Are they functions that take the cross product of the
> normal with the vector from the camera? No, that doesn't seem possible...
Not impossible, not with shaders.

That's exactly how it works.

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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