Hi,
I did some testing with xGen Archives and used the distance driven level of detail function. I took the standard se-expr that comes with xGen in the LOD slot:
$lowDistance=30.0000;#0.0,50.0
$mediumDistance=10.0000;#0.0,50.0
d=length(cam-P);
ret=0;
if( d>$lowDistance ){ret=2;}
else if( d>$mediumDistance ){ret=1;}
ret
This expression picks a certain level of detail based on the distance to the render cam. To get the position of the render cam it uses the command "cam". This works very well in the viewport and is updating correctly as you move the render cam, but when you render it with VRay it doesn't work. Instead of using the camera position it uses the coordinates [0.0, 0.0, 0.0], no matter where the render cam is placed.
It looks like VRay isn't able to interpret the "cam" command. Or is it something I'm doing wrong?
Cheers!
Oliver Kling
I did some testing with xGen Archives and used the distance driven level of detail function. I took the standard se-expr that comes with xGen in the LOD slot:
$lowDistance=30.0000;#0.0,50.0
$mediumDistance=10.0000;#0.0,50.0
d=length(cam-P);
ret=0;
if( d>$lowDistance ){ret=2;}
else if( d>$mediumDistance ){ret=1;}
ret
This expression picks a certain level of detail based on the distance to the render cam. To get the position of the render cam it uses the command "cam". This works very well in the viewport and is updating correctly as you move the render cam, but when you render it with VRay it doesn't work. Instead of using the camera position it uses the coordinates [0.0, 0.0, 0.0], no matter where the render cam is placed.
It looks like VRay isn't able to interpret the "cam" command. Or is it something I'm doing wrong?
Cheers!
Oliver Kling
Comment