Jump to content
Sign in to follow this  
itriix

cvex and vex volume procedural questions.

Recommended Posts

Hello all,

I'm using a cvex, vex volume procedural, and billowy smoke on a volume. I was just curious how in the cvex, i could have a fade off from the center of camera" outwards...

I essentially have a noisey volume at the moment, all done in the cvex with noise... I'm sure I did it wrong, but I was trying to use a transform vop in the cvex to take the position of the volume, and change it to camera space... and multiply that with the volume... but it's definitely not right. it made two grid like slices through the center of the volume like target cross-hairs.

Well anyways, if someone has a solution, i'd love to hear it!

Cheers,

Jonathan

Edited by itriix

Share this post


Link to post
Share on other sites

for the time being, i took the bounding box in x and y, plugged each to a ramp and multiplied that with the noisey volume. That makes a hole with falloff, in the center bbx and bby of the volume. This only works well for a camera translating in z... still looking for a way to have this all cam based.

Share this post


Link to post
Share on other sites

I beleive P is already in camera space, but you don't want to multiply your density by all of P, only the Z component so extract that and multiply against density.

Share this post


Link to post
Share on other sites

thanks tjeeds, i'll look into that.

in the meantime. i'm getting a result that i do not expect that does not look like my viewport.

using cvex, i'm creating a noisey volume... i want a tunnel that goes through the volume... so for the time being, I took the bounding box in x and the bouding box in y... and then used a ramp on each of them, to take the .5 values to 0... and ramp up to 1 on both sides of .5... i then add the two together and multiply the "noisey volume" by this added bounding box, ramp combination... In my viewport, I get what i want. a noisey volume with a hole in the middle. when i render it though, i keep getting volume where the HOLE is... i've tried making my ramps much more extreme on the bounding box ramping... the viewport shows the hole getting larger, but once again, when I render... it's like it did nothing.

Does anyone have any clue what could be the cause of that?

Thanks,

Jonathan

Share this post


Link to post
Share on other sites

Hello all, i've made a simplified version of what i'm talking about. I'm still quite stuck trying to understand if this is a bug or if i'm just simply doing something wrong.

Hi j. it seems like the problem is coming from the bounding box global variable 'BB' not being properly defined in the rendertime cvex context but working correctly in the sops cvex context.

it works fine if you calculate the 'tunel' another way. here's one way to do it, using the length of p (projected into 2d) and a smoothstep.

volume_atmosphere_tunnel_odforce_bb.hip

post-4364-130349001662_thumb.jpg

Share this post


Link to post
Share on other sites

sweet thanks. so my way is bugged?

any thoughts about how to get the tunnel carved out based on "camera"... center of camera outward?

Cheers,

Jonathan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×