hi there,
since there is no vop type for the new pbr lighting models in vops, I was trying this in the inline vop:
$out = bsdf ashikhmin( 1/$rough, 1/$rough,normalize(dPds), normalize(dPdt))
gives me a syntax error
I did declare the output type as bsdf.
thanks in advance
alex
bsdf ashikhmin in inline vex syntax error
3180 3 0- alexlstephan
- Member
- 13 posts
- Joined:
- Offline
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
AlexStephan
hi there,
since there is no vop type for the new pbr lighting models in vops, I was trying this in the inline vop:
$out = bsdf ashikhmin( 1/$rough, 1/$rough,normalize(dPds), normalize(dPdt))
gives me a syntax error
I did declare the output type as bsdf.
thanks in advance
alex
Try:
$out = ashikhmin( 1/$rough, 1/$rough,normalize(dPds), normalize(dPdt));
That's without the “bsdf” in front of the function name, and with a ‘;’ at the end of the line.
- alexlstephan
- Member
- 13 posts
- Joined:
- Offline
thanks mario:
after reading this thread
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=8895&highlight=anisotropic+reflections [sidefx.com]
I tried this in an inline vop
$aniso_bsdf = ashikhmin( 1/$urough, 1/$vrough,normalize(dPds), normalize(dPdt));f += $refl * ({1,1,1} / albedo($aniso_bsdf)) * $aniso_bsdf;$out = f;
I am getting reflections, but not anisotropic ones.
any ideas?
regards
Alex
after reading this thread
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=8895&highlight=anisotropic+reflections [sidefx.com]
I tried this in an inline vop
$aniso_bsdf = ashikhmin( 1/$urough, 1/$vrough,normalize(dPds), normalize(dPdt));f += $refl * ({1,1,1} / albedo($aniso_bsdf)) * $aniso_bsdf;$out = f;
I am getting reflections, but not anisotropic ones.
any ideas?
regards
Alex
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
AlexStephan
thanks mario:
I tried this in an inline vop
$aniso_bsdf = ashikhmin( 1/$urough, 1/$vrough,normalize(dPds), normalize(dPdt));f += $refl * ({1,1,1} / albedo($aniso_bsdf)) * $aniso_bsdf;$out = f;
I am getting reflections, but not anisotropic ones.
any ideas?
A little aside: you can have multiple lines in your inline code – just type Alt-e with the cursor on the code field, and type multiple lines in the editor that pops up. This will make things easier to read/follow.
Does this code compile without errors?
Hard to tell exactly what's going on from your post, but here are a few things I noticed:
1. The local var $aniso_brdf is (possibly) not declared properly – it's missing the type . Either that, or it's a pre-declared input to the inline vop (can't tell from your post). If it is not an input (of type bsdf), then it should be declared (and assigned to) like this:
bsdf $aniso_bsdf = ashikhmin( 1/$urough, 1/$vrough,normalize(dPds), normalize(dPdt));
2. I'm assuming the local var f is an input of type bsdf, else it also hasn't been initialized. You also forgot to add the $ in front of it.
3. Ditto with $refl – I'm assuming it's an input of type vector or float.
Last but not least, make sure the values you're passing for urough and vrough are different from each other, else there is no anisotropy.
Other than that, it should be working fine. (I've tried a similar call over here and it's fine).
-
- Quick Links