Managing of collision sounds

hello, i didn’t started to include sound in my game yet, but i was already wondering if blender(or a library) can handle well multiple sounds based on collisions and other perturbation activity like a table pulled over while having objects on it. Did someone already have some experience with dealing lot of collision sounds occurring in a close range of time. And if yes, does it render well ?

1 Like

Peace hello @blenderaptor

[1] Your asking Logic Bricks or Python (?)

[2] 3D sound (?) Different sounds (?) Activating / Disabling multiple sounds at the same time (?)

What do mean “render”.
You mean performance (?)

for animation there’s layers and blendIn options to render soft transitions. After having a quick peek on sound actuators i didn’t see such a thing. I didn’t tried to experience sound in my game yet. Just wondering, if i can expect that BGE can cope with complex sound generation without cutting effects and so on. I ask for library because, i don’t want to start to make some logic brick system for each object which could possibly generate sound while hitting in each others. I’m talking about “rendering” just as eevee does for light , i’m asking the same for sound … echo, delay, bouncing . You see ? But i don’t have high hopes as sound is not the main task of Blender

@blenderaptor

Have you tried BGE Python (AUD) module (?)
https://docs.blender.org/api/2.79/aud.html

I have tried the basics & it works fine.

@BluePrintRandom had suggested once to put a sound actuator on an empty with each sound and spawn in the empty each time a sound needs played.

yes, i knew that module. This is all i have for the moment :smiley:

walk = aud.Factory.file(bge.logic.expandPath(“//sounds\walk.ogg”))

But as some-people did for a control system, i was wondering if anyone had made like a ‘template’ , a script to deal with all this combined with collision…

Example : a fork on a table , the table is pulled over … can the sound of the fork could be automatically rendered considering it will slide, then jump from the table, then land on the ground , then bounce 1 or 2 ? Eevee and cycles do automatically the job for the light , what about the sound ? As i said, i don’t expect much … silly question probably

@blenderaptor

For :arrow_down:

Different_Collisions → Different_Sounds :arrow_down:

MATERIAL_Collision → Sound :arrow_down:

[ EXAMPLE ]

Wood_Material_Collision = play (Wood_Sound)
Metal_Material_Collision = play (Metal_Sound)

yes, that’s the way to start… But like that i have to make a sensor for each material … :confused: unless i remove material specification to detect them all, then read the material of the collided object to pick up the right sound - but in this case, the sound specification can be a property as well. But still have the problem of the noise generated by a different move … sliding on wood is not the same than full facial hit … as i said, this is too complex for Blender, i think that nothing has been done in this field yet. Sound is the orphan of CGI

@blenderaptor

Btw.
Here is simple python aud script :arrow_down:
Python_Aud_Demo.blend (103.3 KB)

[1] Play sound with SPACEKEY.
[2] Make sure to make a valid file path to a sound to play it.

Learn coding man, it will solve ALL these problems guaranteed.

Material is really a good example : eevee will render it according to light. But as far as i know, there’s nothing which can “render” a sound

@blenderaptor

Understood.
Looking for a solution now.
So far only :arrow_down:
[1] Multiple scene empties.
[2] Material collision

do you think i’m making my current game with bricks ? Also, the thing i was asking for is not playing a sound (even with options), but more a full sound rendering engine. Like eevee does for light. You won’t have to code for rendering light bouncing … Blender does it for you.

@blenderaptor

This is so far the most realistic (and most complicated) way to do what your asking :arrow_down:

[ PYTHON ]

Object / Name --> Material / Texture --> Sound

@blenderaptor

Yes :wink: :arrow_down:

@blenderaptor

I’m confused :arrow_down:

i prefer propriety since material is only a name when it comes to detecting a collision. Yes, assign a sound to an empty and parent it to the right colliding object … but if i have forks, knifes and spoons all crying together :wink: … That’s really the reason i was asking for a sound rendering engine :wink: . But thx for contribution.

@blenderaptor

So property instead of material (?)

What is the problem then (?)

well, i meant , only bricks… :ghost:

@blenderaptor

Gotcha, bricks only mean actuators & and controllers & not sensors :wink: :heart:

coz a butt and nose have both same material : skin, but still doesnt make same noise when flatten with a :facepunch: