Jump to content

How to control density with ramp, and ramp rotation?


xanter

Recommended Posts

Hi!

My goal is to have control over volume density with ramp that is 45degree rotated , so to have ability set higher density at areas near corner of the object.

I will upload scene file and screenshot , I was trying all day today but without success , I had managed what I wanted but it was done without ramp control , I need ramp control and ramp rotation ability.

 

If you can tell me how to do that without opening that file it is also greatly appreciated , I uploaded scene in case you want to look inside my beginner skills.. 

thank you in advance !

 

 

 

isoramp.jpg

 

test.hipnc

Edited by xanter
Link to comment
Share on other sites

vex vex vex )))) hate it , I mean I'm sure something is possible to do in VOPs without going deeper into coding 

VOP has tons of nodes and ramp node but I can't and I'm fighting that goal all day today.

Thank you a lot for file anyway!

 

meanwhile , I will try VOPs again  ..  ph... my head is cracking by pieces. I'm new at H so not surprised I'm having a bad day with it ) 

Edited by xanter
Link to comment
Share on other sites

You can do the same in VOP, it is only about the xyzdist() function, which is doing all the work in the background. The only thing is, that you need a second input curve. If interested, here is a VOP version.

Probably there simpler more straightforward solutions.

 

test_VOP_xyzdist.hipnc

Edited by Aizatulin
  • Like 1
Link to comment
Share on other sites

any chance to do that without including additional object like line? I mean just with ramp node in VOPs and rotate it after custom ramp is done. (I need a custom ramp)

The thing is I want ramp over density control becasue it's not 100% gradient from 0 to 1 , I need 1 density till the center of a box and then from center to peak corner it increases to 2 lets say  

again thank you for help.

Link to comment
Share on other sites

The ramp is just a function, which takes a float value. In my version it is the u-value of the position on the curve, where the point has its closest distance to. For example, if this is the center of a line (where the point has its closest distance) the

u-value is 0.5, The rotational effect comes from the input value (which comes from the curve) and not from the ramp.

Another approach can be just rotating the box (outside) and after this applying the ramp function and then rotate the box back. You can just use the vop from your example. I'm strongly biased to VEX (it is much faster and easier to use - but this

just my personal opinion).

Here is another file (1 line VEX to capture input and set detail attribute)

 

 

 

test_VOP_rotate.hipnc

Edited by Aizatulin
Link to comment
Share on other sites

4 hours ago, vicvvsh said:

Hi,

this is just a concept of how to use ramp for rotation control, but i think a float parameter is more convenient.

 

test_01.hipnc

that is amazing and what I was expecting, we have rotation control , now the thing here is to control the density with ramp.

you named second ramp node "density_" , but it has no affect on density of volume . 

 

P.S

I thought it has no affect to ramp but looks like it's a bug , I'm changinf density in name parrameter and it works 

so you have to change a name and get it back again in order to see changes in density ramp , I need to report it I guess.

 

Does your houdini version density ramp updates instantly while changing ramp curve ?

 

thank you for your file it solves my task, bless you! 

Edited by xanter
Link to comment
Share on other sites

1 hour ago, xanter said:

you named second ramp node "density_" , but it has no affect on density of volume .

I named ramp that i added as "rot_ramp" (actually as "rot_amp" but that was a typo)

1 hour ago, xanter said:

Does your houdini version density ramp updates instantly while changing ramp curve ?

Yes it does, it works as should be, H 18.0.524

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...