Search - User list
Full Version: Scale Geometry Inwards
Root » Technical Discussion » Scale Geometry Inwards
TheDude123
Hi,
I'm trying to scale odd shaped geometry inwards...evenly from all sides. I've tried the transform node with centroid expression in the pivot, but the centroid method does not produce the results I'm looking for. FIRST IMAGE

The closest I've come is using the "inset" on the polyextrude node (SECOND IMAGE)...but I can't do this with geometry that has resolution/divisions.

Any ideas on how to achieve this specific kind of inward scaling?

Thanks!

See images below.

File attached for reference.
CYTE
I made another solution with a peak node(marked red).
But it won't work in more complicated scenarios.
I guess a super solid solution isn't that trivial.

Cheers
CYTE
howiem
CYTE
I guess a super solid solution isn't that trivial.

That's it in a nutshell. Concave n-gons like your pic can trip up any attempt to inset them, depending on how they're triangulated. The PolyExtrude node does a spectacular job of handling insetting, but it sure ain't trivial
TheDude123
CYTE
I made another solution with a peak node(marked red).
But it won't work in more complicated scenarios.
I guess a super solid solution isn't that trivial.

Cheers
CYTE
Thanks for the file. The geo I'm needing to shrink has more divisions than my example...so this method does not work (as you said). Thanks again for the idea.
CYTE
Could you post your geo? I would like to take a look.
TheDude123
CYTE
Could you post your geo? I would like to take a look.

Sure thing!

File:
CYTE
Ok, I see. Yes, very unusable geo for this kind of operation. I guess you have to do it in another way.
Maybe with bools, or a different approach to the thing you want to achieve in the end.

Cheers
CYTE
BabaJ
but the centroid method does not produce the results I'm looking for.

You should be able use any arbitrary pivot position other than just the centroid.

In this hip I've just set up a range of possible positions - you don't have to lay down as many nodes as I have.
I just did this to show there are a number of pivot positions that could give satisfactory results.

It's just a matter of choosing a position in which the direction of scaling will keep unwanted 'distortions' at a minimum or not at all(which is possible).
TheDude123
BabaJ
but the centroid method does not produce the results I'm looking for.

You should be able use any arbitrary pivot position other than just the centroid.

In this hip I've just set up a range of possible positions - you don't have to lay down as many nodes as I have.
I just did this to show there are a number of pivot positions that could give satisfactory results.

It's just a matter of choosing a position in which the direction of scaling will keep unwanted 'distortions' at a minimum or not at all(which is possible).

Thanks for the file. I took a look and it seems like the issue is still prevalent. If you zero-out the translate on the transform1 node (sending the piece back to it's original position), and take a look at the vertical part in the middle, the geo doesn't really scale inwards like the rest...it just kinda stays in place. That's the issue I'm having...it's like a non-uniform scale. I just want the geo to shrink in on all sides by a given amount...equally. Seems easy when you type it, lol.

Thanks again.
BabaJ
TheDude123
If you zero-out the translate on the transform1 node (sending the piece back to it's original position), and take a look at the vertical part in the middle, the geo doesn't really scale inwards like the rest

It does scale equally inward like the 'rest'.
The 'vertical' part is about the x center of the pivot. So when you 'zero out' like you say it comes back to world center.
Just look at the 'vertical' part in relation to either side of the geo ends - both are scaled down in relation to each other.

If you don't like the vertical part to seem stationary, shift your object to either side of world center - It will still be uniformly scaled down in all directions.

It's not that it isn't scaling down uniformly - It's because you are assuming it should look a certain way, when it won't.

Look at the merge node in the file in wireframe mode so you can see the two together, the original and the scaled down but moved to a different position in relation to the original - Each side is proportionaly smaller to the same degree of the original.

".it just kinda stays in place"....so just have the scaled object translated to another position.

Also in your original post, the second image you have in which you think it is being scaled evenly, when it is not.
Look at the left hand side edge in your image, before and after - It becomes smaller. But look at your vertical edge in the 'middle', before and after - It stays the same size before and after.

So in your second image it does not get scaled down evenly. What does happen evenly is that it is offset evenly(distance is even from original).

If it's an even offset that you want - you have to decide what parts of your geometry you are going to omit/cut.(if you want the rough faces on each side of your geometry to have the same uniform polyface sizes of one side compared to those of the other.
TheDude123
BabaJ
TheDude123
If you zero-out the translate on the transform1 node (sending the piece back to it's original position), and take a look at the vertical part in the middle, the geo doesn't really scale inwards like the rest

It does scale equally inward like the 'rest'.
The 'vertical' part is about the x center of the pivot. So when you 'zero out' like you say it comes back to world center.
Just look at the 'vertical' part in relation to either side of the geo ends - both are scaled down in relation to each other.

If you don't like the vertical part to seem stationary, shift your object to either side of world center - It will still be uniformly scaled down in all directions.

It's not that it isn't scaling down uniformly - It's because you are assuming it should look a certain way, when it won't.

Look at the merge node in the file in wireframe mode so you can see the two together, the original and the scaled down but moved to a different position in relation to the original - Each side is proportionaly smaller to the same degree of the original.

".it just kinda stays in place"....so just have the scaled object translated to another position.

Also in your original post, the second image you have in which you think it is being scaled evenly, when it is not.
Look at the left hand side edge in your image, before and after - It becomes smaller. But look at your vertical edge in the 'middle', before and after - It stays the same size before and after.

So in your second image it does not get scaled down evenly. What does happen evenly is that it is offset evenly(distance is even from original).

If it's an even offset that you want - you have to decide what parts of your geometry you are going to omit/cut.(if you want the rough faces on each side of your geometry to have the same uniform polyface sizes of one side compared to those of the other.

Ahhhh, I see. Thanks for the clarification.

Also, I was using "scale" when I should have been using "offset" in my description.

I'm doing a cracking effect on some geo, and whenever the crack is close to perpendicular to the ground (the vertical part in my example), this issue arises. Then you can't really see the crack on those parts because they are too close together.

Most of the methods I've seen use some sort of transform from centroid or exploded view to move the pieces away from each other and then lerp between that and a rest position later on down the chain.

I tried making the normals of the inside faces face away from each other, but that causes other issues...like points that are close will cross over each other and cause artifacts.

Anyways, thanks for the clarification.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB