Collision Detection In Blender's Rigid Body Physics | An Advanced Tutorial Based On Python Script

preview_player
Показать описание
In this Blender tutorial, we have discussed how to detect a collision in Rigid Body Physics or during any animation in Blender. We have used a Python script to detect this collision and the script is free for everyone. The download link is given below. You can make use of this script for various scenarios, one such scenario is discussed in this tutorial where we are changing the material of an object based on its collision with another object. Please watch the video for the complete tutorial. If you have any question on this tutorial, please leave your comment below.

==================================================

We have many more tutorials that can help you learn Blender like a professional. You can go through the following playlists for the relevant topics:

👇 𝐁𝐥𝐞𝐧𝐝𝐞𝐫 𝐅𝐨𝐮𝐧𝐝𝐚𝐭𝐢𝐨𝐧 𝐂𝐨𝐮𝐫𝐬𝐞 𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬:
If you are absolutely new to Blender, take this foundation course.

👇 𝐀𝐥𝐥 𝟏𝟐 𝐂𝐥𝐚𝐬𝐬𝐞𝐬 𝐓𝐨𝐠𝐞𝐭𝐡𝐞𝐫 𝐈𝐧 𝐎𝐧𝐞 𝐇𝐨𝐮𝐫:

👇 𝐁𝐥𝐞𝐧𝐝𝐞𝐫 𝐓𝐢𝐩𝐬 𝐀𝐧𝐝 𝐓𝐫𝐢𝐜𝐤𝐬 (𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬):

👇 𝐄𝐚𝐬𝐲 𝐌𝐨𝐝𝐞𝐥𝐬 𝐅𝐨𝐫 𝐁𝐞𝐠𝐢𝐧𝐧𝐞𝐫𝐬 (𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬):

👇 𝐌𝐚𝐭𝐞𝐫𝐢𝐚𝐥𝐬 𝐘𝐨𝐮 𝐍𝐞𝐞𝐝 𝐈𝐧 𝐁𝐥𝐞𝐧𝐝𝐞𝐫 (𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬):

👇 𝐀𝐥𝐥 𝐓𝐞𝐱𝐭 𝐄𝐟𝐟𝐞𝐜𝐭𝐬 𝐈𝐧 𝐁𝐥𝐞𝐧𝐝𝐞𝐫 (𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬):

👇 𝐂𝐚𝐦𝐞𝐫𝐚 𝐌𝐨𝐯𝐞𝐦𝐞𝐧𝐭 & 𝐒𝐞𝐭𝐭𝐢𝐧𝐠𝐬 𝐈𝐧 𝐁𝐥𝐞𝐧𝐝𝐞𝐫:

👇 𝐔𝐬𝐞𝐟𝐮𝐥 𝐋𝐢𝐠𝐡𝐭𝐢𝐧𝐠 𝐒𝐞𝐭𝐮𝐩 𝐈𝐧 𝐁𝐥𝐞𝐧𝐝𝐞𝐫 (𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬):

👇 𝐑𝐢𝐠𝐢𝐝 𝐁𝐨𝐝𝐲 𝐏𝐡𝐲𝐬𝐢𝐜𝐬 & 𝐑𝐢𝐠𝐢𝐝 𝐁𝐨𝐝𝐲 𝐂𝐨𝐧𝐬𝐭𝐫𝐚𝐢𝐧𝐭𝐬:

👇 𝐅𝐢𝐫𝐞 & 𝐒𝐦𝐨𝐤𝐞 𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐈𝐧 𝐁𝐥𝐞𝐧𝐝𝐞𝐫 (𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬):

👇 𝐅𝐥𝐮𝐢𝐝 𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐈𝐧 𝐁𝐥𝐞𝐧𝐝𝐞𝐫 (𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬):

👇 𝐌𝐚𝐬𝐭𝐞𝐫𝐢𝐧𝐠 𝐁𝐥𝐞𝐧𝐝𝐞𝐫 (𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥𝐬):

If you want to watch our own creations in Blender, you can also check out the following channel where we regularly upload videos on Animation, Space Exploration and AI.

#Blender #Animation #RigidBody #Tutorial

Timestamp
00:00 Intro & Python script to detect a collision
01:55 An example application of collision detection
03:24 Another example with hundreds of balls
04:56 Some limitations and possible solutions
Рекомендации по теме
Комментарии
Автор

Never used Blender before but I’m trying to do 3 words landing in each other with a slight bounce for an intro. I’m guessing the rigid body dynamics would work for this? People are suggesting cinema 4d and Houdini also.

bitmap_jack
Автор

Just started to use the platform and got an error trying to use the node:

Python: Traceback (most recent call last):
File "\Text", line 204, in <module>
AttributeError: 'NoneType' object has no attribute 'node_group'

JoãoNunes-cb
Автор

Thanks for sharing, it gave me a whole new experience

ryd
Автор

i'm using v4.0.2 and when i search for the Greater Than node nothing populates. i have to add the math node and manually switch it to greater than from add. I'm trying to add this to the music notes tutorial, and I can not get the Cubes to change colors using the code provided.

MrBeStack
Автор

Hello ! Thank you for all this knowledge ! I am new to Blender and you are very helpfull :)

Unfortunately I have a problem with this collision detection script, I am using Blender 4.1
I tried to run this script to use with your musical marble animation (really nice tutorial too) but it gives me some errors
I put the marble and all the notes in a collection and I select the marble, then I run the script and it says :

Python: Traceback (most recent call last):
File "C:\Users\***\\Marble_music\untitled.blend\Text.001", line 195, in <module>
File "C:\Users\***\Marble_music\untitled.blend\Text.001", line 59, in create_geometry_node_group
IndexError: bpy_prop_collection[index]: index 3 out of range, size 3

Maybe you can help me with that

Thank you and keep making tutorials its a pleasure to follow them ;)

Alex-tnkt
Автор

Sorry Bro, I don't understand the tutorial. because this tutorial is for lots of balls falling, se Meanwhile, I want to change the color of several Single Musical Notes when one ball touches them alternately. Apart from that, I'm not very good at English which means I don't really understand what you're saying. Even though YouTube has a subtitle feature, it doesn't fully understand me.🙏

MacTavish
Автор

Will this allow circle packing? Sphere packing?

flower
Автор

I get error when try to use this Python: Traceback (most recent call last):
File "\Text", line 195, in <module>
File "\Text", line 124, in create_geometry_node_group
TypeError: bpy_struct: item.attr = val: expected a string type, not bool.

Can you help maybe?

MarbleMusicMistery
Автор

I have a question, how do i make y particles have their own colliders?

degoblack
Автор

as AI is entering in every field what is our future in animation

arya_rudra
Автор

Read prefs:
Read blend: "G:\Blender\music ball\music ball_04_rigid.blend"

Error in PyDriver: expression failed: Frame
For target: (type=NodeTree, name="Shader Nodetree", property=default_value, property_index=-1)

Traceback (most recent call last):
File "<bpy driver>", line 1, in <module>
NameError: name 'Frame' is not defined. Did you mean: 'frame'?

thank you very much!it is very good ! i don't know the error?

gohai-oy
Автор

"Hi, how can I change the Plane instead of the Sphere color?"

LongBui-upvk
Автор

thank you, and please the password for the zip file

mustaphamaxlogo
Автор

I think you forgot to actually include the link to the script.

darrennew
visit shbcf.ru