Jump to content

silly challenge


Recommended Posts

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

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!!!

Link to comment
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

Link to comment
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~

Link to comment
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

Link to comment
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!

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...