POV-Ray : Newsgroups : povray.unofficial.patches : Help! POV-Man coordinate system problem with bicubic patch : Re: Help! POV-Man coordinate system problem with bicubic patch Server Time
6 Oct 2024 11:10:28 EDT (-0400)
  Re: Help! POV-Man coordinate system problem with bicubic patch  
From: Vahur Krouverk
Date: 29 Jun 2001 12:53:57
Message: <3B3CB32B.7483E915@comtrade.ee>
Eli Ewok Brody wrote:
> 
> Hello all --
> 
> Maybe one of you can help me:
> 
> When importing an sPatch object, it seems to handle coordinates incorrectly.
> I'm writing a renderman shader that depends on the z-component of the
> surface normal. This works find on regular objects, but does not on bicubic
> patches. I get all sorts of strange results. (For instance, one forth of my
> patch union is shaded, and nothing else.)
> 
> Thank you,
> -Eli

It would good to see source code for shader (and POV-Ray scene file with
patches) to provide help.
But here are some questions, which could be considered:
Are these strange results repeatable or do they change with next render
(without  changing shader or POV source code)? If it changes with next
render, then there is defect in source code probably, otherwise it is
shader/scene file problem.
How do you use surface normal? Do you transform it (e.g. to shading
space)? Do you use correct transformation function (normals and vectors
should be transformed by ntransform() and vtransform() accordingly,
transform() function should be used only for points).
Do you take account, that normal could point 'downward' i.e. be
negative? Do you assume, that normals are normalized (they may be and
they may be not)?
Try to render only these patches, which are not shaded and look, what is
the value for normal vector (printf function is handy here).
How are unshaded surfaces oriented?


Post a reply to this message

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