bump with vex builder?

   4398   4   2
User Avatar
Member
19 posts
Joined: July 2005
Offline
hello,

I am trying to make a simple bump map with the VEX Builder, but I can't figure out where the “computenormal” VOP is.
I am trying to translate into VEX Builder the following vex code snipet:

P_temp = P + ( N * bump_value * bump_amt ); // move P along its normal by intensity
N = computenormal( P_temp );

thanks for your help
User Avatar
Member
19 posts
Joined: July 2005
Offline
actually i found the vop called “Shadingnormal”. It seems good except that after i have finished my network in VEX Builder, the vop viewport shows a black surface as if the surface normals where inverted. What did i do wrong?
Thanks for your help
User Avatar
Member
19 posts
Joined: July 2005
Offline
oops, i just found out i switched the N and P input of the “shadingnormal” vop.
it works well now.
User Avatar
Member
74 posts
Joined: July 2005
Offline
To do bump mapping, just use the DisplaceAlongNormal VOP in a SurfaceShader context. (the Bump/BumpMap VOPs are based on it)
You'll find the corresponding code with Right-Click on it/TypeProperties/ inner and outer code.
Bump mapping is displacement mapping where you don't use the computed P.
You need to wire the output N of the DisplaceAlongNormal VOP to the nN of a Lightning model VOP.
( i don't see any relation with the shadingnormal VOP but maybe i don't undersatnd the pb you just had).
User Avatar
Member
2199 posts
Joined: July 2005
Online
It's worth noting as well that not all VEX commands are implimented in VOPs. Computenormal is one of them. For a complete list of VEX functions
go here
$HH\vex\html\quickref.html

Any that aren't made into VOPs yet can easily be added using the inline VOP.

:wink:
The trick is finding just the right hammer for every screw
  • Quick Links