POV-Ray : Newsgroups : povray.binaries.images : Toon shading with POV SDL Server Time
2 Aug 2024 10:19:35 EDT (-0400)
  Toon shading with POV SDL (Message 1 to 10 of 21)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Shay
Subject: Toon shading with POV SDL
Date: 8 Oct 2007 15:42:54
Message: <470a883e$1@news.povray.org>
I did not model this. This monkey model comes with Blender.
This render was done with POV-Ray.
This image has not been resized.
This image has not been post-processed.
This is not a combination of layers.
No image was used to create this render.
A model, some SDL, and ONE render.

  -Shay


Post a reply to this message


Attachments:
Download 'monkey.jpg' (51 KB)

Preview of image 'monkey.jpg'
monkey.jpg


 

From: Shay
Subject: Another model
Date: 8 Oct 2007 19:16:55
Message: <470aba67@news.povray.org>
Shay wrote:

different outline style.
Text file included with the model:
       This file is downloaded from www.cg-files.com
       Mail: sht### [at] yahoocouk


Post a reply to this message


Attachments:
Download 'buddha.jpg' (83 KB)

Preview of image 'buddha.jpg'
buddha.jpg


 

From: FlyerX
Subject: Re: Another model
Date: 8 Oct 2007 20:16:44
Message: <470ac86c$1@news.povray.org>
Shay wrote:
> Shay wrote:
> 
> different outline style.
> Text file included with the model:
>       This file is downloaded from www.cg-files.com
>       Mail: sht### [at] yahoocouk
> 
> ------------------------------------------------------------------------
> 
Looks very nice and clean. I would be grateful if you share the 
technique for the shading. Is the effect produced only by the material 
or did you have to modify the mesh somewhat in POV-Ray too? Is is 
similar to the OpenGL trick to show mesh edges?

In PoseRay I made the POV-Ray cartoon effect by playing with the finish 
of the material but I could never get the material to show the edges.

FlyerX


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Toon shading with POV SDL
Date: 8 Oct 2007 20:55:20
Message: <470ad178@news.povray.org>
Shay wrote:


> A model, some SDL, and ONE render.
> 
>   -Shay

Coolness.  Does your algorithm cast rays at the object and is therefor pixel
dependent?


Post a reply to this message

From: Shay
Subject: Re: Another model
Date: 8 Oct 2007 22:17:51
Message: <470ae4cf@news.povray.org>
FlyerX wrote:

> Looks very nice and clean.

Thank you.

> I would be grateful if you share the technique for the
> shading.

Someone will guess soon.

> Is is 
> similar to the OpenGL trick to show mesh edges?

I don't know anything about OpenGL, so I couldn't tell you.

> In PoseRay I made the POV-Ray cartoon effect by playing with
> the finish of the material

With as many different shades?
I don't know PoseRay. Does it have surface shaders like POV-Man?

  -Shay


Post a reply to this message

From: Shay
Subject: Re: Toon shading with POV SDL
Date: 8 Oct 2007 22:20:07
Message: <470ae557$1@news.povray.org>
Greg M. Johnson wrote:

> Coolness.  Does your algorithm cast rays at the object and is therefor
> pixel dependent?

I don't understand that question completely. This images are antialiased 
properly, unlike the results from a "posterize" filter.

  -Shay


Post a reply to this message

From: FlyerX
Subject: Re: Another model
Date: 9 Oct 2007 01:41:32
Message: <470b148c$1@news.povray.org>
Shay wrote:
> FlyerX wrote:
> 
>> Looks very nice and clean.
> 
> Thank you.
> 
>> I would be grateful if you share the technique for the
>> shading.
> 
> Someone will guess soon.
> 
>> Is is similar to the OpenGL trick to show mesh edges?
> 
> I don't know anything about OpenGL, so I couldn't tell you.
> 
>> In PoseRay I made the POV-Ray cartoon effect by playing with
>> the finish of the material
> 
> With as many different shades?
> I don't know PoseRay. Does it have surface shaders like POV-Man?
> 
>  -Shay

The OpenGL trick is just to draw the back-facing triangles with thick 
edges. In this way at any point where the mesh is turning away from view 
a thick line will show. The effect is rather easy to do and involves 
just a few flag changes.

PoseRay (http://mysite.verizon.net/sfg0000/) is a program I wrote to 
convert 3D meshes in other formats to POV-Ray scenes. One of its options 
is to create a cartoon effect by modifying the finish in the material. 
Right now it only uses one or two levels (user option).

later,

FlyerX


Post a reply to this message

From: Shay
Subject: How I did it.
Date: 9 Oct 2007 11:44:05
Message: <470ba1c5$1@news.povray.org>
FlyerX wrote:
> I would be grateful if you share the 
> technique for the shading.

I'm leaving for work soon, and nobody has guessed, so I'll share how I 
did it.

I wrote a raytracer in POV-Ray, reusing the "trace" function for speed 
and simplicity. To make this an honest render, I used boxes for pixels 
instead of writing pixel data out to a file, but a more serious 
implementation would do the latter to save RAM.

Included anti-aliasing (similar to POV's method 2 with a tweak that 
makes thin lines look better) and shaders. Can do a lot more than 
toon-shading, but my time is very limited. Outlines were produced with 
something similar to the Open-GL method you described, though shader 
outlines would also be possible.

I am considering writing a more advanced raytracer (with an SDL parser) 
in Python in order to explore the feasibility of my proposal for a 
POV-Ray 4.0 shading language (don't expect it to look much like Renderman).

  -Shay


Post a reply to this message

From: Bill Pragnell
Subject: Re: How I did it.
Date: 9 Oct 2007 12:00:00
Message: <web.470ba4fc905a422d731f01d10@news.povray.org>
Shay <Sha### [at] cccc> wrote:
> I'm leaving for work soon, and nobody has guessed, so I'll share how I
> did it.

[snip revelation]

Ah, that explains the different options for outlining. Actually, I had a
suspicion you were casting rays but I never thought you'd gone as far as a
complete raytracer - your playful tone hinted at a simple trick!

I've got a way to toon-shade using just a pigment statement, but it can't do
shadows or outlining. Well, not good outlining :).

Bill


Post a reply to this message

From: William Tracy
Subject: Re: How I did it.
Date: 9 Oct 2007 14:55:45
Message: <470bceb1$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Shay wrote:
> I wrote a raytracer in POV-Ray, reusing the "trace" function for speed
> and simplicity.

Ah, the massive overkill approach. Nice. :-)

BTW, have any of you seen Freestyle?
http://freestyle.sourceforge.net/

- --
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

You know you've been raytracing too long when you can't decide which one
of your kids you're going to sell on the black market so you can afford
the plane ticket to the London PovRay conference coming up.
    -- Ken Tyler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHC86vcCmTzQ++ZncRAl+9AKCevRtZdvnRGQ9hvJuIeKMQrW7WDACaAh2h
XjN67ug+NxDRDMPYsH1+CbM=
=/iLH
-----END PGP SIGNATURE-----


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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