-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio demo #469
Audio demo #469
Conversation
added optional stash sound to snap zones the way this works is that on snap it checks if the pickable object has a audiostreamplayer3d and if then make sure to stop its audio and play the stash sound on the audiostreamplayer3d node of the snapped pickable and if there is no audio node then pass
this adds a area audio node along with a area audio type node what it does in a nutshell, it can play a touch sound when an object enters it since for example all the interactables are extensions of the area3d node, the audio node can work with those as well imagine u got a lightswitch or a button, now u can have sound when u touch it ooh and i made a audio Fx icon
this adds the base scene for the audio demo with the arcade floor material
this adds the pingpong models - ball/ racket/ table along with the token coin adds phymat for pingpong/ basketball adds poses Note: these assets are made by me Digitaln8m4r3 and am licensing these under CC0 Public Domain, will add a license file in the next commits
adds pickable audio nodes adds basketball model with 4 different material/ baseColor variations reorganized my folder under assets
this adds the arcade hoops machine pingpong table with racket and ball added license file to digitaln8m4r3 assets adds public domain audio files from freesound.org added the audio demo to the main menu and removed the footstep demo from the main menu added soundtrack from the starcourt mall by bryan teoh added holodeck small version fixed snap zone stash sound not working fixed typo in pickable_audio.gd
now u can type in what message u want to be displayed on the board when u +score +the game ends +before the game starts
added footstep Note: i might expand this audio demo in future with a jump pad arcade to demonstrate the footstep system in a better way
First impressions is that this looks really good. I really like the demo, it's a good exposition of what you can do with XR tools. Just a nitpicking question, why did you keep the For the snapzone stash sound I would just add the audio player to I would also make the 3 sounds in |
why did you keep the AudioStreamPlayer3D separate? For the snapzone stash sound I would just add the audio player to snap_zone.tscn, if it's unused it just doesn't contribute to the audio. I would also make the 3 sounds in XRToolsPickableAudioType optional, I might not want to specify all 3. I'm also not sure if it's overkill to have this as a resource type instead of just having the sounds be properties of XRToolsPickableAudio On a sidenote, what about the floor material? am asking cuz am not sure how performant it is so maybe u can take a look at it |
this makes the area and pickable audio nodes extend from audiostreamplayer3d and this way removing the need of adding the audiostreamplayer3d node in the first place updated snap_zone.tscn with a audiostreamplayer3d node and removed the check for if one is present or not inside the snap_zone.gd script moved the audio resource files into area and pickable subfolders of the audio_demo/audio folder
to ease the process of adding the audio nodes, now u can just add them as a inherited scene arcade_hoops_ctrl: adjusted the time of point where the token gets queue_free
i was testing the pr and it works fine for me. I think it's a nice addition to the demos. Also find interesting to have the separate XRToolsPickableAudioType so many objects can share same sounds, and also as an example on how to setup this resources. |
lgtm and thanks for takin the time to do this, it adds a lot to the visual appeal so nice that you made this into a res saving shader
thanks to @BastiaanOlij who was able to transfer the arcade floor material into a shader, this now performs way better since the material version i made had quiet a lot going on to achieve the effect. with that being said, i see this demo complete and ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good enough to merge, @Malcolmnixon if you could have a look as well and give your Ok?
since malcolm wasnt added to do a review i guess he just didnt rly noticed this, anyways... as he is not available in the coming weeks and since @BastiaanOlij already approved, i would like to see this merged so i can get to the other things such as the collision hands and twohanded stuff |
Lets go for it, I'm sure we can polish up anything that we need later, thanks for the effort @DigitalN8m4r3 ! |
Audio demo (GodotVR#469)
AudioDemo.mp4
This adds my work on audio in xr
it contains new nodes such as the pickableaudio node and the areaaudio node.
Both can be used to play audio
Snap Zone was edited to allow for playing audio upon snap/ stash
pickable audio plays audio based on the velocity of the rigidbody3d
area audio can be attached to all nodes of type area3d or nodes based on the area3d node, it plays audio upon entering
and can be used for things like buttons..
snap zone can play a audio file if the snap zone contains a audiostreamplayer3d node and if not it will pass, maybe someone else could do this with some more elegance
The Demo is showcasing what can be done with the above
Note:
If you have ever experimented with audio for xr, you will know that there is alot that can be done and that can be done wrong
For now i have set all the pickables to Sleeping and it checks if its not sleeping and then it will run the process.
The pickables audiostreamplayer3D nodes are adjusted strictly to specific values, i spent some time gettin these for my ears right so you can of course try it with the standard settings but i do think that you might favor mine
Final Note:
an audio is only as good as the audio file that is being used, keep that in mind