Jump to content
anakin78z

silly challenge

Recommended Posts

hi everybody...

i'm kinda new to this forum (this is my first posting!!)

i solved the first two challenges... :D

rolling cube and rolling cubes with different velocities and sizes...

i tired out the rotating 90degrees and popping it back again into place...it worked out fine but its gonna look silly if u have texture on it...

so then i tired this new approach....have the cube rotate about its pivot and move it up and down accordingly so that it seems that the edge is always touching the floor...then move the cube ahead with the same speed as the rotation speed...

this approach is working just fine...

there r no key frames and everything is procedural...u can change the size and the velocity on the fly...

i'll be posting the animated file next...( as soon as i make one)

currently working on the third challenge..

this is fun!!!

Share this post


Link to post
Share on other sites

Using oriented bounding boxes would allow you to arbitrarily rotate your cubes in any direction...

you just get the eigenvectors of a covariance matrix, and that'll give you a 3X3 rotation matrix,

then you can get the min/max to figure out the center point,

and voila! a thousand lines of code! :rolleyes:

actually, you already have the rotations, you could just use their dot product trick to get the collision distance...

hmm...

ftp://ftp.cs.unc.edu/pub/users/manocha/PA...ISION/sig96.pdf

Share this post


Link to post
Share on other sites

Awesome link, Ivan!

got my noodle baking...

you could just use their dot product trick to get the collision distance...

that trick is very yummy, but from what I've understood, it just returns a test result, wether you have an overlap or not...

And to actually find where in time the overlap occurs, you'd have to iterate those tests in order to converge on an accurate solution....either that or just accept the first frame of overlap as being the "collision" frame...right?

check this out (if you haven't already):

http://www-rocq.inria.fr/~redon/research.htm

stuff dreams are made of!.....that's the kind of functionnality I don't dare to ask for in houdini....maybe....some day....our kids... ;)

collision detection from mars, anytime soon? :D

cheers.

PS: having a box roll in one direction on a flat plane is cool...but like Jens said, over rolling hills is better :) and what if I want to steer my box around? AIeee....brain...hurts... these are the times one wishes for good RBD in houdini .... ~sigh~

Share this post


Link to post
Share on other sites

that's a cool link sirogi, by the way love your totoro!!!

and for ivan I have a question, if it not to hard to explain... :P

you already have the rotations, you could just use their dot product trick to get the collision distance...

for my understanding dot product returns the cosine of the angle between two normalized vectors.

can you explain to me how can you use it to get the collison distance..

thanks a lot...

cheers

-tuang

Share this post


Link to post
Share on other sites

yeah, totoro is teh best ;)

(these are actually his 2 helpers...)

as for the dot product, it doesn't actually *get* the distance between the bounding boxes, it's part of a bigger solution that these people came up with to check for overlapping bounding boxes, basically it's a trick to check for interference of 2 objects...if you carefully go through -section 5- of the pdf ivan pointed, you should see how the dot product is used in a quite creative way.....

cheers!

Share this post


Link to post
Share on other sites

Thanks sirogi,

I'll try to follow it, hope it not too hard...:P

cheers,

tuang

PS. sirogi have you seen "kiki's delivery service" it's nice too :>

Share this post


Link to post
Share on other sites

Aaaaaargh!!!!!!! Had the friggin thing rolling over a hill..... did I hit Alt+S? Of course not. Did houdini crash on me? Of course it did. Do I have time to recreate it real quick? No way.

Sigh... Maybe tomorrow.

Share this post


Link to post
Share on other sites

it's been a while... I can hardly remember...

check out the bbox expression. That'd be my first hint. :) (although you may approach it tottally differently ;) )

Share this post


Link to post
Share on other sites

I don't know about simple, but the cubes do not slip.

if( ch("./rz")<0 ,ch("./sx")-sin( 90*(ch("./rz")/90-int(ch("./rz")/90)) +45)*(sqrt(2*(.5*ch("./sx"))^2)) , -1*(ch("./sx")-sin(90*(ch("./rz")/90-int(ch("./rz")/90))+135)*(sqrt(2*(.5*ch("./sx"))^2)))+ch("./sx")) + int(ch("./rz")/90)*-ch("./sx")

post-21-1064499533.gif

Share this post


Link to post
Share on other sites

wow krets, hot damn, that's cool

I did the thing a few weeks ago but I got a tiny slippage which I couldnt fix

mebbe I'll steal your code for a animated squashy version I wondered about..

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

×