First Question - All objects should have the same height

   297   4   1
User Avatar
Member
4 posts
Joined: 4月 2023
Offline
Hi,

this is my first question in this forum. I am a beginner and made a little sim.
but now i can not find any way to get advance.


I have a problem. All objects should have the same height, even if the size is changed, the height should always remain the same.
Please, can anyone tell me what i have to do?

the file is attached to check my sim

Attachments:
Houdini_Screenshot_a-2024-04-26.jpg (63.5 KB)
Houdini_Screenshot_b-2024-04-26.jpg (121.6 KB)
Houdini_Screenshot_c-2024-04-26.jpg (45.3 KB)
Test_sim_c1.hipnc (210.9 KB)

User Avatar
Member
398 posts
Joined: 11月 2016
Offline
Hi! Instead of setting pscale, set scale, which is a vector with components for x, y and z.

so instead of your last line:

float myscale = fit01(ramp, chf('pscale_min'), chf('pscale_max'));
v@scale = set(myscale, 1, myscale);

Edit: Noticed your y component is probably not the one who should remain unchanged, but you get the idea.
Edited by Tanto - 2024年4月26日 11:56:45
User Avatar
Member
4 posts
Joined: 4月 2023
Offline
Hi Tanto,

thank you very much. You made my day ;->
it worked perfect.

tnx
User Avatar
Member
4 posts
Joined: 4月 2023
Offline
Hello,

the rotation now is looking fine. But is there a way to get a natural or physical rotation like in the example movie?
The rotation is not the same to each object. the rotation beginns on the left and so on. like in a natural way.

is there any help or ideas what to do?

thx
Edited by Daniel75 - 今日 03:09:06

Attachments:
Rotation_example.mp4 (766.6 KB)

User Avatar
Member
4 posts
Joined: 4月 2023
Offline
Hello,

i found some solution:

after transform node i put a Attribute Wrangle with this: (https://www.tokeru.com/cgwiki/JoyOfVex17.html)

float angle;
vector axis;
angle = ch('angle');
angle += @ptnum*ch('offset');
angle += @Time*ch('speed');
axis = chv('axis');
@orient = quaternion(angle, axis);

That did it.

Attachments:
Screenshot 2024-05-09.png (1.2 MB)

  • Quick Links