커뮤니티 Q&A

Audiokinetic의 커뮤니티 Q&A 포럼에 오신 것을 환영합니다. 이 포럼은 Wwise와 Strata 사용자들이 서로 도움을 주는 곳입니다. Audiokinetic의 직접적인 도움을 얻으려면 지원 티켓 페이지를 사용하세요. 버그를 보고하려면 Audiokinetic 런처에서 Bug Report 옵션을 사용하세요. (Q&A 포럼에 제출된 버그 보고는 거절됩니다. 전용 Bug Report 시스템을 사용하면 보고 내용이 담당자에게 정확히 전달되어 문제 해결 가능성이 크게 높아집니다.)<segment 6493>

빠르고 정확한 답변을 얻으려면 질문을 올릴 때 다음 팁을 참고하세요.

  • 구체적인 내용을 적어주세요: 무엇을 하려는지, 혹은 어떤 특정 문제에 부딪혔는지 설명하세요.
  • 핵심 정보를 포함하세요: Wwise와 게임 엔진 버전, 운영체제 등 관련 정보를 함께 제공하세요.
  • 시도한 방법들을 알려주세요: 문제 해결을 위해 이미 어떤 단계를 시도해봤는지 설명해주세요.
  • 객관적인 사실에 초점을 맞추세요: 문제의 기술적 사실을 중심으로 설명하세요. 문제에 집중할수록 다른 사람들이 더 빠르게 해결책을 찾을 수 있습니다.

0 투표
Because of the very large amount of objects and events to be created in our Wwise project, we would like to generate work units using our own tools. Is this possible? Where can I find the XML schemas?
General Discussion Moderator (Audiokinetic) (490 포인트) 로 부터

2 답변

+2 투표
 
우수 답변
Yes, it is possible to generate work units using your own tools.

You can find the XML schema under:
\Authoring\Data\Schemas\
You should always use the highest schema version available

The unique ShortIDs found in the wwu for each audio objects are a FNV hash where:
 
 - For Events, Game Syncs and Soundbanks, the hash is implicit, and should not be
   declared in the XML. (It is a 32 bit FNV hash of the name of the object)
 
 - For all other objects (WorkUnit, Sound, Container, Bus, etc), it is a 30 bit FNV 
   hash of the GUID bytes.  If you omit it, Wwise will automatically generate it 
   the next time the project is saved.

GUIDs are created as usual using:
C#: Guid id = Guid.NewGuid();
C++: GUID id; CoCreateGuid( &id );

you can find our C++ implementation of the FNV hash algorithm in the SDK:
\SDK\include\AK\Tools\Common\AkFNVHash.h
Moderator (Audiokinetic) (490 포인트) 로 부터
선택됨 Claude B. (Audiokinetic) 로 부터
How are all these different GUIDType ID's generated?
I tried using your C# ShortIDGenerator to generate the ShortID and could not get a result that matched the value Wwise generates when they're missing. I set HashSize to 30, and passed the GUID as a string in various formats. I've tried to generate ShortIDs for an AudioFileSource, Attenuation, and a Sound and none matched what Wwise generated.

I just tried it based on an example from the related post:
<Action Name="Play" ID="{E1C49A0B-74B2-4346-8251-5B65D5BC44AA}" ShortID="723191257" Type="Play" Scope="One" Global="false">
Using that GUID, I couldn't generate a ShortID that matched.

I generated it like this:
            AkUtilities.ShortIDGenerator.HashSize = 30;
            uint shortID = AkUtilities.ShortIDGenerator.Compute("E1C49A0B-74B2-4346-8251-5B65D5BC44AA");
The result was 754384377, when I would expect 723191257.

Has the method changed since this post was written? Am I missing something?

It's notable that it does work for generating the implicit 32bit ShortID based on the names of Events and Game Syncs.

Thanks
+1 투표

Since this is the first hit on Google for "Wwise ShortID", I'll use this to share some important details that aren't mentioned in the SDK.

The input for the FNV function should be the GUID bytes in mixed-endian order. The first three components are little-endian, and the last two are big-endian. In other words, convert the hex pairs in the GUID to an unsigned byte array and sort them this order: 3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15.

Here's a C# implementation that returns the correct ID for both GUIDs and strings. If anyone else is stuck on this, feel free to use it as-is, or as a reference if you need it in another language.

https://github.com/Lolginer/misc/blob/master/WwiseHash.cs

Adam N. (160 포인트) 로 부터
Thank you!  The reasoning for the mixed-endian eludes me, but I appear to be getting valid ShortIDs now.
What I'm wondering about is: MediaID's. How can we generate those without opening Wwise authoring tool? The only way I know of is to use WwiseConsole commands:

move-media-ids-to-single-file
update-media-ids-in-single-file
move-media-ids-to-work-units

This works, but it's incredibly inefficient, especially when you just just want to generate a single mediaID. Is there a formula/hash for how mediaID's are generated?
...