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
2
Question by jeffcrouse · Jun 07, 2013 at 08:14 PM · audiomovietexturefalloff

Movie texture audio: no falloff

I have imported a video into Unity and am playing it on a plane. I have also attached the audio from the video to a game object in the world and assigned a maxDist of 10. However, when I move the AudioListener >10 away from the source, the sound doesn't fade out. No matter how far I go, the audio remains at the same level. I have many other audio sources in the scene that behave as expected.

Oddly, if I am using the editor and I pause after playing, the audio seems to fix itself. I've tried both mp4s and movs but I can't seem to falloff to work without pausing after play.

What am I missing?

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 Rob Mills Audio · Jun 09, 2013 at 01:29 AM 0
Share

what do you mean by 'the audio seems to fix itself' when you are in the editor?

sounds odd. you sure you're working with a 3d sound ins$$anonymous$$d of a 2d sound?

avatar image jeffcrouse · Jun 09, 2013 at 02:51 AM 0
Share

Here is what happens in the editor:

  1. I hit play.

  2. The audio from my movie begins to play, but it is at full volume. No matter where I move, the audio is at full volume. No rolloff whatsoever

  3. I hit pause.

  4. I unpause

  5. The audio now has the expected rolloff. That is, when I am > 10, I hear no audio, but when I approach it, it gets louder.

I have many other audio sources in the scene that behave as expected in terms of rolloff, and the audio from my movie is set up identically, so it is definitely configured to be 3d. Even if it wasn't 3d, why would pausing and unpausing the game suddenly make it 3D?

avatar image Elie Charest · Jun 18, 2013 at 12:57 AM 0
Share

I'm having the same bug, very annoying. It may be related to the old bug described here:

http://answers.unity3d.com/questions/11334/intermittent-movietexture-audio-track-problem.html

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by kyrnal · Aug 15, 2013 at 12:23 AM

I have ran into the same problem. After trial and error, I found a solution by using a specific combination of codecs. I output both of the files from After Effects.

The video is a Quicktime (.mov) Photo JPEG compression.

The audio is a separate uncompressed .wav.

Apply the audio to an Audio Source as usual, and apply the Movie Texture via a script. The audio syncs, behaves as 3D audio, and the video doesn't flash at the end.

 using UnityEngine;
 using System.Collections;
 
 public class playMovie : MonoBehaviour {
     
     public MovieTexture movTexture;
 
     void Start () {
         renderer.material.mainTexture = movTexture;
     }
         
     void Update () {
         if (!movTexture.isPlaying){
             movTexture.Play ();
             movTexture.loop = true;
             audio.Play ();
             audio.loop = true;
         }
     }
 }

Comment
Add comment · Show 1 · 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 hoperin · Mar 15, 2014 at 02:51 PM 0
Share

Thank you for the code! I found as well that the only way to get it to work properly was to divorce my audio from my video, but syncing was an issue!

avatar image
-1

Answer by Rob Mills Audio · Jun 09, 2013 at 01:57 AM

select the gameobject that has the audio attached.

In 3D sound settings, there is a volume rolloff graph that depicts the volume curve as you approach or move away from the gameobject. If you move away from the object, you will see the red volume line moving down the curve (or line if linear) to the bottom right. But if this line doesn't reach the very bottom of the graph (volume = 0), then the sound will never be actually muted when exceeding max distance. Check these values.

One quick way to check is to select a linear rolloff method and listen.

Comment
Add comment · Show 2 · 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 jeffcrouse · Jun 09, 2013 at 02:56 AM 0
Share

Hey Rob -- thanks so much for your replies. And yes -- I did change the rolloff graph so that it goes down to 0 at distance 10. I only want these audio sources to be audible within a very small radius. I start with logarithmic rolloff, but then drag the last handle down to 0.

I am also aware of the red line that depicts the AudioListener, and I have watched it as it moves back and forth on the graph, but it is not accurate.

But as I said above, when it comes to the audio from movies, there is no discernible rolloff whatsoever, no matter how far away I go.

avatar image Rob Mills Audio · Jun 09, 2013 at 06:21 AM 0
Share

That is very strange indeed. Is there a way you can split the audio file from the video in case there is a formatting issue? Or does the audio and video have to be synced up in such a way that this cannot work? I'm stumped. sorry

avatar image
0

Answer by hoperin · Mar 15, 2014 at 06:35 PM

I was running into the same problems and found, like Kyrnal, that using a seperate file rather than the video's audio was the only way to make it work. So I'm in the long process of batch converting all the mp4s into mp3s. This is really a pretty big bug (if bug it is), and a huge hassle. I couldn't find any other threads with a better solution than this one. ;c

Comment
Add comment · 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

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

19 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

I want to play a MovieTexture inside a GUITexture but I can't hear the sound. Why 2 Answers

Intermittent MovieTexture Audio Track Problem 1 Answer

MovieTexture - Black Video with Audio 0 Answers

Syncing separate video and audio 0 Answers

Unity 4.1 Movie Texture issue 0 Answers


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