POV-Ray : Newsgroups : povray.binaries.images : Cell Shader: my try : Re: Cell Shader: my try Server Time
16 Aug 2024 04:19:15 EDT (-0400)
  Re: Cell Shader: my try  
From: Jérôme Grimbert
Date: 30 Apr 2002 04:00:01
Message: <3CCE4EFD.571664DA@atosorigin.com>
Vahur Krouverk wrote:
> 
> Nice. Did you 'invented' this shader by yourself? ARM book contains
> examples of such shaders. Unfortunately most advanced of them can't be
> applied to POVMan, as POVMan doesn't support surface derivatives, which
> are necessary for calculation of cel lines with uniform width. As it
> could be seen on this picture and other 'pure-povray' approaches, line
> widths depend from object geometry. Perhaps better results could be
> achieved with specific patch by J. Grimbert, but this requires as well
> surface derivative calculation...

Until YOU are going to provide EACH pov object with a function which
provide the derivative at any point of the object, including at the
surface, but also inside and outside, the only approach would be
to make a kind of guess by casting more rays.
Thus it would require more rewrite of the pov-engine, and a serious
slowdown. (I remind you that some object provide a normal only
for a previously computed intersection... so you cannot 'sample' around
the intersection to get a feeling about the variation of the normal...)

So, the only safe approach would probably be a new function per object, 
It should be easy for sphere, but already with a box the problems
start coming out... What is the derivative on a edge ? on a vertex ?

With CSG, it's even more difficult!
Blob is not funny either!
and Isosurface is probably better handled only by the user:
 user provide both the isosurface formulae and its derivatives!

quartic, quadric and all poly objects are on the contrary rather
simple to get the derivative automatically and easily.
And the same probably goes for superellipsoid (?).

-- 
Non Sine Numine
http://grimbert.cjb.net/
Puis, s'il advient d'un peu triompher, par hasard,






Post a reply to this message

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