SonyWWS / ATF

Authoring Tools Framework (ATF) is a set of C#/.NET components for making tools on Windows. ATF has been in continuous development in Sony Computer Entertainment's (SCE) Worldwide Studios central tools group since early 2005. ATF has been used by most SCE first party studios to make many custom tools such as Naughty Dog’s level editor and shader editor for The Last of Us, Guerrilla Games’ sequence editor for Killzone games (including the Killzone: Shadow Fall PS4 launch title), an animation blending tool at Santa Monica Studio, a level editor at Bend Studio, a visual state machine editor for Quantic Dream, sound editing tools, and many others.
Apache License 2.0
1.89k stars 262 forks source link

Full Class Documentation #9

Closed vorptronica closed 10 years ago

vorptronica commented 10 years ago

I've been trying to get familiar with ATF and haven't yet found any complete docs, even like a DOxygen scan online. I've looked through the Getting Started and DOM pdfs. Also spend a bunch of time on the Wiki and looking through Sample code. But I still can't find any coverage of, say for example, the Sce.Atf.Rendering.OpenGL namespace. Is there a recommended route to getting to know these classes better? Thanks. -Len

Ron2 commented 10 years ago

Hi Len,

For our OpenGL support, I recommend taking a look at the Model Viewer sample application. The documentation for the Model Viewer is probably the best we have that covers OpenGL. https://github.com/SonyWWS/ATF/wiki/Model-Viewer-Programming-Discussion

It seems that searching wikis in GitHub doesn't work at the moment, at least for this repository. So, that would make finding the right wiki page quite difficult. :-( I've filed a request for help with GitHub.

--Ron

vorptronica commented 10 years ago

Thanks Ron. That page looks like it's got some good info. On a related note, the ModelViewer sample crashes whenever I actually try and load a model (even the cube.atgi from UnitTestAtgi\Data). It's the only Sample that doesn't work out of the box correctly as far as I can tell. The only warning is a version mismatch warning (that I don't fully understand) on the Tao GL dll. Any thoughts? Thanks!

-Len

Ron2 commented 10 years ago

Bummer, sorry, Len. I downloaded the zip file from GitHub, compiled, and did some tests. Weirdly, the first time I tried loading bike.atgi or cube.atgi, the app shut down! But after turning on break-on-exceptions in Visual Studio, I can't reproduce the crash. Model Viewer hasn't given us any problems like this in the past, so I don't know what is going on. Can you get a call stack or an exception message?

--Ron

Ron2 commented 10 years ago

A GitHub help person got back to me: "Currently, wikis are not included in GitHub's search functionality. I've added that to our internal feature request list for the team to see, though. We're always looking for ways to improve the GitHub experience."

julianneh commented 10 years ago

Len, what version of Visual Studio are you using? We did actually see an intermittent issue with ModelViewer and Tao about 18 months ago on VS2012. We changed some build settings and were never able to reproduce it again, but maybe your system configuration is different from ours.

-Julianne

vorptronica commented 10 years ago

Thanks for the assistance!

I'm building with VS 2012 (though I haven't updated the project version).

Here's the exception upon model load:

A first chance exception of type 'System.Xml.XmlException' occurred in System.Xml.dll 'ModelViewer.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\lwhite\Desktop_Projects\Coding\ATF-master\bin\Debug.vs2010\Tao.DevIl.dll' The program '[12680] ModelViewer.exe: Managed (v4.0.30319)' has exited with code 1073741855 (0x4000001f).

When building, this is the only warning that comes up:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. 27> ModelViewer.vs2010 -> C:\Users\lwhite\Desktop_Projects\Coding\ATF-master\bin\Debug.vs2010\ModelViewer.exe 29> WpfApp.vs2010 -> C:\Users\lwhite\Desktop_Projects\Coding\ATF-master\bin\Debug.vs2010\WpfApp.exe

On Tue, May 6, 2014 at 7:47 PM, julianneh notifications@github.com wrote:

Len, what version of Visual Studio are you using? We did actually see an intermittent issue with ModelViewer and Tao about 18 months ago on VS2012. We changed some build settings and were never able to reproduce it again, but maybe your system configuration is different from ours.

  • Julianne

— Reply to this email directly or view it on GitHubhttps://github.com/SonyWWS/ATF/issues/9#issuecomment-42384220 .

julianneh commented 10 years ago

Thanks for the details Len. I've managed to reproduce this again. Could you take a look at your ModelViewer project settings and make sure "Enable the Visual Studio hosting process" is unchecked? We turned that off the last time we saw this issue and that seemed to prevent the crash. If you're still seeing it, try turning on "Enable native code debugging". That one seems to prevent the crash even if VS hosting is enabled - which makes this very difficult to track down ;)

Ron2 commented 10 years ago

One of us (Shen) was able to reproduce the problem on his personal computer. The corruption you're seeing, Lee, is likely from a call to Il.ilGetString() in the method GetSupportedExtensions() in the class DevilImageLoader. It looks like we can simply remove the usage of DevilImageLoader, which makes use of an old Tao OpenGL library to load various kinds of images. That Tao OpenGL library has given us trouble before, as Julianne reminded me. If someone asks for it, we could try updating the Tao OpenGL dlls that we use. It looks like that project has migrated to: http://sourceforge.net/projects/taoframework/

Anyway, thank you, Lee, for bringing this problem to our attention. Hopefully it's fixed for you now. This was a frustrating bug that only causes problems for some computers.

vorptronica commented 10 years ago

Thanks for the fix. Interestingly, on my Win7 machine over here, I managed to fix the problem by switching the "Platform target" setting in the project Build properties to "Any CPU". This setting was defaulting to "x86". I assume that's how it is set in the project since I don't remember changing this setting until now. So....architecture mismatch?

Ron2 commented 10 years ago

I don't think it was a simple architecture mismatch. Previously, we found that turning off the "Enable the Visual Studio hosting process" in the project settings fixed a similar memory corruption bug with DevilImageLoader which was an odd random thing. At the time, VS2012 was new, and we thought maybe there was some weird problem with VS2012 that only affected this Tao OpenGL library.