Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by MountDoomTeam · Sep 26, 2012 at 04:36 PM · physicsconstraint

Constraining physics for a buckyball -like simulation.

I would like to take some spheres to represent atoms,

and put 60 of them cosntrained in the boundary radius of a sphere,

and let them push each other around to rearrange themseles like a buckyball..

It could make intersting game objects as you could make the radius of the sphere just a bit stronger than the atomic force so when you interact with it it looks interesting.

here is a flash simulation. http://paulbourke.net/geometry/spherepoints/

What is the best way to do it?

Thanks!

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MountDoomTeam · Sep 26, 2012 at 04:59 PM 1
Share

no chance of using unity physics then, alternating frames between rigidbody is on and off and bringing things back to the sphere boundary?

making physical things with constraints is great for game programmers, like that they can make mace weapons on chains of particles, and general bouncy around weapons and dudes on bungee chords and grapple hooks.

avatar image MountDoomTeam · Sep 26, 2012 at 05:36 PM 1
Share

I think i asked my question wrong. i want to make a buckyball molecule! see this page: http://paulbourke.net/geometry/spherepoints/

avatar image MountDoomTeam · Sep 26, 2012 at 06:08 PM 1
Share

Thanks alot Fattie! there is a small problem for the moment by using an inner and outer collider... the collider is made to stop things bouncing into it, but it doesnt stop things bouncing out of it... you cant put cubes in an ordinary sphere because they will fall out, so i have to figure a way to reverse/ turn inside out the collider of the outer sphere. i didnt find how to do that? thanks!

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Fattie · Sep 27, 2012 at 06:29 AM

Hi Zoom !

Thanks again for this great question.

Sorry I only thought of this now.

  1. have the inner sphere as a point collider (I mean a primitive sphere collider), no problem

  2. have gravity off

  3. now check this out. write a one line script that continually applies force, TOWARDS THE CENTER OF THE SPHERE

attach that script to the small balls.

it's so obvious, sorry I only thought of it now

they will jiggle around in a really interesting way. You will have to very carefully set the distances meters and masses kilograms and force Newtons to realistic levels - I'm sure you're expert at that

the result will be fantastic. I can't wait to see this. I'm gonna do it myself now too!

  1. Also consider, try both physical force as mentioned in 3, and also try it with a script that just basically "restrains it" by hand to the surface (much like the restrain buttons on the rigidbody inspector panel. generally you don't move an obkect which is physical but here you could

  2. note further that you could carefully modify the velocity of the object continuously so it is only on the plane tangent to the surface at any moment

What a great question this is. Thanks!


Another approach ...

I'm gonna mention another approach I would like to try here Zoom. I often try out "offscreen calculation-reality physics".

We could make a flat surface. Add edges to stop the balls rolling out. Put the 60 balls inside this "tray". Use gravity. Let the little bastards bounce around....

All of this happens offscreen, you never see it.

Then .......... map that action to the surface of the sphere. So, all the balls you SEE on ONSCREEN are not real, they are just puppets. Carry over the exact height, spin, velocity etc of the baking tray as the globe tangent.

Of course ... here we'd have to deal with the projection. It could be that some natty projection like a Interrupted sinusoidal does the trick in pratcice. And what to do at the edges. It could be that the "real" tray balls wrap somehow. Another key fact is, you can never, anyway, actually see both sides of the ball at once! So you need only work 40 or so of them at a time, in a way, depending the use.

Bearing that in mind it's possible the "offscreen calculation reality baking tray" could be a terrific solution! :)

Anyway just a reminder that "offscreen working realities" coupled with a completely fake, maquette, on screen reality is often a awesome thing to play with. I love rigs like that. Cheers

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MountDoomTeam · Sep 27, 2012 at 08:15 AM 1
Share

Thanks! that's Verry cool! interesting indeed :) thanks for thinking of that! perhaps it's possible to make a gradient on the ConstantForce so that it pulls from outside the radius and it pushes from inside. and zero constant force for ball pos == radius. Great info's there!

avatar image Fattie · Sep 27, 2012 at 08:25 AM 0
Share

i love it and i love your question.

the site has 65,000 questions and only 4 or 5 of this nature. thanks!

here was a good one ...

http://answers.unity3d.com/questions/299407/character-collision-of-walls-inside-moving-ship.html#answer-299823

avatar image MountDoomTeam · Sep 27, 2012 at 09:09 AM 0
Share

:) you mean to use the geometric coordinates to make vertices of a mesh, like a baking tray for mesh? i know what you mean about offscreen use of algorythms that have great visual appearence. yes a variety of options indeed.

avatar image Fattie · Sep 27, 2012 at 09:17 AM 0
Share

in this case I just meant .. make a flat surface. so, it's not a globe, it's flat.

(you need sides so the balls don't roll out! that's all I meant by a baking tray.... baking trays have sides, err, well often they do!)

do your simulation you describe, but NOT on a globe, just on a FLAT surface.

then, actually just map the positions of the balls to the globe. so the little balls we are seeing on screen (on the globe) are NOT actually real, they are just puppets following the real actual physics simulation which sits offscreen.

sorry about the baking tray confusion :)

avatar image MountDoomTeam · Sep 27, 2012 at 09:46 AM 0
Share

i am thinking of applying it to some future unspecified fungus and material growth simulations.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2D 360 degress platformer example needed 0 Answers

"Padded objects" type collision .. any ideas? 2 Answers

Avoid bouncing when ground move down 1 Answer

Imported 3D models collisions 1 Answer

player enters in the gameObjects and get pushed 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges