POV-Ray : Newsgroups : povray.unofficial.patches : PoVMan Q: Shaders and displace warp? : Re: PoVMan Q: Shaders and displace warp? Server Time
1 Sep 2024 14:29:33 EDT (-0400)
  Re: PoVMan Q: Shaders and displace warp?  
From: Michael Andrews
Date: 2 Apr 2001 12:50:58
Message: <3AC8AE93.8AAE8680@reading.ac.uk>
Hi Vahur,

I had a look at the code over the weekend as well.

The problem is that although the three calls to Compute_Pigment in
lighting.c were changed to call Compute_Pigment2, complex pigments,
rainbows, skyspheres, fog, isosurface pigment function, media and
displace_warp (whew! I think that's all - this is from memory) still
call Compute_Pigment.

So, what I did was make a modified compile where I updated all the
instances of Compute_Pigment and Do_Average_Pigments (and a couple of
other functions I can't remember) to have the same extra parameters as
Compute_Pigment2, added the shader execution to the switch in
Compute_Pigment and changed references to Compute_Pigment2 back to
Compute_Pigment. I think that was all. Then you could use shaders
anywhere a normal pigment could be used. Of course, in many of the
calling places there is no knowledge of the normals or the incoming ray
so most of the calls have NULLs in the extra slots.

What I would like to do is work back up the function calling chain to
add the ray and normal information where it is available, so all the
physical effects should get the ray, surface applied warps also get
normal, etc. This should be possible in most cases I think (note all the
functions which call Compute_Pigment, add the extra parameters to the
function call, find the functions which call them, continue up the
chain). Quite a long process though.

Anyway, that's my progress so far.

Bye for now,
	Mike Andrews.

Vahur Krouverk wrote:
> 
> Michael Andrews wrote:
> >
> >
> > The PoV code parses OK and the render window appears (I'm using wpovman
> > 0.71.3), but I then get a message "Rendering error. Pigment type 3 not
> > yet implemented" and the renderer stops. What I don't know is if this
> > message is given by the shader or by the displace warp code.
> 
> This message comes from pigment calculation routine (Compute_Pigment
> function).
> 
> > Any ideas out there as to why this doesn't work? If it would help I
> > could post the shader file as well ...
> 
> I've repeated this behaviour, so provided information is sufficient.
> When I have time, then I'll look at it. I've not tested shaders in
> complex textures, so this might be quite easily oversight from my part.
> 
> With regards,
> Vahur


Post a reply to this message

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