trouble with displacement shader
- From: "celu" <dbms_sucks@xxxxxxxxx>
- Date: 9 Feb 2006 07:01:40 -0800
hi guys,i've just started with renderman.
im using 3Delight renderer & advanced renderman for reference.
i tried writing a displacement shader that displaces a surface based on
the float value looked up from a texture file(conc.tdl).it should just
emboss the texture on the surface isnt it?,but when i apply this shader
the objects appear to crack and disintegrate?!!
why is this happening?what could be wrong?
any help would be greatly appreciated,thx.
heres the code for the displacement shader
----------------------------------------------------
displacement texturedisplace(float Km = 0.7;
string texname = "conc.tdl")
{
float hump = 0;
normal n = normalize(N);
/* set the displacement to the grayscale
value of the texture map */
if(texname != "")
hump = float texture(texname);
P = P + n * hump * Km;
N = calculatenormal(P);
}
---
.
- Follow-Ups:
- Re: trouble with displacement shader
- From: aghilesk
- Re: trouble with displacement shader
- Prev by Date: Python RunProgram
- Next by Date: Re: How to Enter in the Renderman World !
- Previous by thread: Python RunProgram
- Next by thread: Re: trouble with displacement shader
- Index(es):
Relevant Pages
|