mass of the rigidbody

Discussions about rigidbody simulation in Realflow 4
aphroditea
Posts: 7
Joined: Sun Dec 30, 2007 6:32 am

mass of the rigidbody

Postby aphroditea » Wed Jul 22, 2009 9:27 am

hi,everyone,here i'm working on a project that to break apart a wall.

first,i teared it apart about 500 parts in maya,and then import the sd file into the rf and make them into rbd. the rf4 assigns each of the parts different mass randomly,but the value of mass are quite different,eg: some for 0.1 and the other for 100.


here is the question how could i make the mass not so big different? eg: one is 5, and the second is 7,and the third is 10 etc.


help apprecitated!!!!!!


User avatar
tmdag
Posts: 1023
Joined: Thu Jun 28, 2007 2:22 pm
Location: New Zealand
Contact:

mass of the rigidbody

Postby tmdag » Wed Jul 22, 2009 11:54 am

for eg. rand() :)
"Do not feed the trolls"
Albert 'tmdag' Szostkiewicz
FX Technical Director
Weta Digital

lukeiamyourfather
Posts: 2880
Joined: Mon Oct 15, 2007 4:09 pm
Contact:

mass of the rigidbody

Postby lukeiamyourfather » Wed Jul 22, 2009 3:57 pm

There are a few different types of random number generators in Python. The one you probably want is this one.

Code: Select all

import random

lowNumber = 5
highNumber = 10

randomNumber = random.uniform(lowNumber, highNumber)

There might be typos, didn't test it in anything but you get the idea. Look at the documentation for the random module on the Python site for the whole story. Cheers!

lukeiamyourfather
Posts: 2880
Joined: Mon Oct 15, 2007 4:09 pm
Contact:

mass of the rigidbody

Postby lukeiamyourfather » Wed Jul 22, 2009 4:12 pm

I read your post a second time. RealFlow assigns mass based on the volume of the bounding box for each piece. So if their mass is really small its probably a really small piece. Maybe that helps more? Cheers!

aphroditea
Posts: 7
Joined: Sun Dec 30, 2007 6:32 am

mass of the rigidbody

Postby aphroditea » Thu Jul 23, 2009 2:45 am

thanks all of u guys, i have another try!!!!!:D:D


Return to “RF4: Rigidbody simulation”

Who is online

Users browsing this forum: No registered users and 1 guest