Jump to content
An_pi

uniformly scaling in specific axis

Recommended Posts

Hi guys. Is there a way to scale mesh "uniformly" like we can do with the peak node, but choose the axis. An example could be a flat long box that we wanna scale "uniformly" in the X and Z axis but not in the Y axis.

Share this post


Link to post
Share on other sites

So I came up with this.

vector dir = normalize(-@P);
vector size = getbbox_size(0);
@P = (@P - (dir / size) * chf("distance"));

Don't know if there is a node to do this, but I couldn't find it.

 

Cheers

Share this post


Link to post
Share on other sites
Posted (edited)

not sure it's doing what you  think it's doing

but if you just want non-uniform scale (which is what uniform scale in certain axis sounds like) then use Transform SOP and scale just in X and Z for example

Edited by anim

Share this post


Link to post
Share on other sites
Posted (edited)

Hi @anim

I don't know what to think anymore :D

To be clear. I am trying to make a simple table with 6 legs. I am placing the legs by "shrinking" the underside of the table and using the side points to copy the legs on to.

The solution I posted before does not work, because I have two points in the middle of the table that will scale wrong, so I made a pretty ugly solution with a fit function. It seems to be a very simple task to do, so I am sure that there is a more elegant way?

Here's an example of my ugly solution.

 

table_example.hip

Edited by An_pi

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

×