Chramp causing artifacts in volume masks

   882   1   1
User Avatar
Member
2 posts
Joined: Aug. 2014
Offline
Hello everyone,

I am currently using the chramp() vex function to sample the value of a ramp parameter/channel I have in my HDA.
Unfortunately it causes the original volume I pass in to get artifacts, shown in the attached image.

Before:



After chramp():



I know there is the volume vop ramp however I have no clue how to use this in combination with my multiparm-block list.
I've posted my HIP and HDA file in hopes someone could help me get this to work as it is now without the artifacts!

Thanks for any help!
Edited by mueslip - Oct. 20, 2021 05:04:29

Attachments:
heightfield_mask_generator.hda (6.4 KB)
heightfield_mask_generator.hip (518.0 KB)
no_artifacts.png (1.9 MB)
chramp_artifacts.png (1.9 MB)

User Avatar
Member
2 posts
Joined: Aug. 2014
Offline
Hi guys,

I fixed the issue!

Before using chramp make sure to clamp ur ramp_pos parameter. For some reason some of the values weren't in this range causing no value to be returned from the chramp.

float volume = volumesample(0, attr, @P);
float ramp = chramp(concat("../ramp", itoa(i)), clamp(volume, 0, 1));
  • Quick Links