Jump to content

Ramp mask Control on a GRID in VEX


Trilec

Recommended Posts

Hi all,

Im looking to control the colors on a grid ( YZPlane) in  VEX to create a mask (will be used to create a group of the un-masked area),

My approach is to use relpointbbox for the position and 3 chrand's for each side profile, Im looking to see if someone has done something similar.

My current solution (and for those interested) is fairly simple but gives good control.

vector bbox = relpointbbox(0,@P);

float Right = chramp('RightRamp',bbox.y);
float Left = chramp('LeftRamp',bbox.y);
float Top = chramp('TopRamp',bbox.z);
 
//Init to 0
v@Cd = 0;

//Top Ramp
if(bbox.y<Top ) @Cd.g=1;
//Left Ramp
if(bbox.z<Left/2+.5 && bbox.z>.5 ) @Cd.r=1;
//Right Ramp
if(bbox.z > (1-Right)/2  && bbox.z<.5 ) @Cd.b=1;

 

RelboxRamp.jpg.8d34b49106fef274871773a845b4638b.jpg

Edited by Trilec
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...