 Hello, everyone, and welcome to the 7.30 to 8.00 AM session of the 2017 Open Simulator Community Conference. As a reminder to our in-world and web audience, you can view the full conference schedule at conference.opensimulator.org. You can also tweet us your questions or comments to at OpenSimCC or use the hashtag, hashtag OSCC17. This session, we're happy to introduce, is called OAR Converter, Using Open Simulator and Unity as a shared development environment for social virtual reality environments. Our speaker today is Austin Tate. His avatar name is I Austin. Austin is a professor of knowledge-based systems at the University of Edinburgh and is the Director of Artificial Intelligence Applications Institute at the University. He is the Coordinator of the Virtual University of Edinburgh View, a virtual education and research institute bringing together those interested in the use of virtual worlds for teaching, research, and outreach. His research involves artificial intelligence, planning technologies, and collaborative systems for emergency response, especially using virtual worlds. I would like to welcome Austin Tate. Hello, everyone. Thanks for coming into this session. I'm broadcasting from Edinburgh in Scotland. I'm going to describe today a tool called OAR Converter, the Open Simulator Archive Converter. It's a tool that we've been using to bring material across from builds in OpenSim into Unity so that we can then use them in various other environments that are also multi-user, single-shared kind of environments where people can go into the world and interact very much like we do in Second Life and OpenSim. So I hope you find some of what I'm going to say useful. But the important thing to note is that there is a blog page, a website, which accompanies this talk, and it's got a lot of material that I'm talking about today and all the URLs and links. I'll give that link at the end, but you'll find it anyway if you do a web search. So anything that you're interested in, for downloads, links, for examples, you'll find on that web page when we get going. So let me first explain that I didn't create this tool. I've been involved in testing it and helping refine a lot of how it works and making use of it in a number of different downstream contexts, but the tool was originally created by Fumikazu Ezechi, who was a professor at the Tokyo University of Information Sciences, and he created that there with a number of his colleagues. The tool has been around a little while and I started using it soon after he first, Fumikazu created it, and at the time, it was still pretty rough, rough around the edges. It worked, but there was a lot of other issues to do with it and you still like to do a lot of work on translating it. So let's get into the talk and you'll see a little bit about why I think this is a useful tool and one that I believe several of us could be interested in, make use of, and you'll see what it's meant to do. The Orconverter's purpose is obviously just to convert an OpenSim archive file. So a lot of you know about those archive files, the very useful ways of archiving regions so you can move them between different OpenSimulator grids or save them and restore them if anything's gone wrong and things of that kind. So it's a backup mechanism, but it's also a portability transfer mechanism. And it saves pretty much everything on the region, scripts and particle effects, all sorts of information about the way the environment works as well as the 3D models that you create and the actual 3D content. So with that Orconverter, we've already got an externalized resource. It's largely an XML set of XML files and flattened methods for all the 3D models. In order that you can bring them out, put them into a big zip file. It's a tar.gzip file formally. And that file that can then be used for various purposes. So that becomes the input to the tool I'm gonna be talking about today. And in particular, this tool was created to create the collada, the .dae type files that are used in Unity 3D. In order that we could use Unity as a further development environment, but using OpenSim content in Unity to take it and reposition it and reuse it elsewhere. As I mentioned, that software was developed by Fumikazue Seki. Now Fumikazue's avatar name is Fumihaxe. So if you see Fumihaxe in Second Life or OpenSim, that is Fumikazue Seki. This converter can run in Linux and on Windows. Source code was made available. When I first used it, you had to really have a lot of permissions to be able to use it in Linux and to be able to set it up. And there's really a more of a Linux tool that happened to work in Windows if you got all the setup right. But it was still pretty technical. But for convenience, after Fumih and myself spoke about this quite a bit, Fumih created a Windows UI that makes available the tool in a ready-to-run package. What I'm going to be talking about today is mostly that Windows tool. The tool itself is pretty straightforward. We're talking about going, oh, the root, I should say, the workflow is pretty straightforward. We're going to go from OpenSim to an or file. So you use save or the save or console command to be able to save a region. Once you've got that or file, you're going to run the or converter in two pieces. And I'm going to explain that a little bit more in detail. But you're basically loading in the or file and then creating the output collada DAE type file. That is then going to be input to Unity, but it's going to be done through a specially written shader, as it's called. A shader is a way of modifying content as it's brought into Unity or as it's displayed. And a specialized shader has been written to take the types of files created and bring them into Unity for processing. And I'll explain more about that process in a second. The tool itself when it's running is pretty straightforward. This is the Windows UI version is what I'm describing. Basically, you're going to go into the file menu, open the or file, and then once you open it, it's going to place it all into a directory that basically unpacks that or file in a way that can be used within the or converter. And then you're going to make the conversion. Now there's many, many parameters and settings that you can use to adjust the way it works. There's all sorts of options in the tool for viewing parts of the 3D model and even producing things like STL files which you can use for 3D printing, elements of what you've brought out from OpenSim. So this is a pretty flexible tool. It's got lots of different capabilities. You can do all sorts of X, Y and Z shifts of the content as well. A lot of that you'll find when we're just using Unity isn't needed, but this could be useful for other people or wanting to use this material in different environments. So that's what the interface looks like. And then this is a bit of a dense slide I'm looking at now, but it's some notes on a quick start of how this works. Now just quickly go through it because it gives you a feeling for how this would work. And remember I said this quick start and some of the other notes I'm providing here is on the blog page that I'm gonna summarize at the end, the webpage you can use. So first of all, you're gonna place your OpenSim or file in a directory somewhere and using the defaults, if you just load the or file and do the conversion, you'll find that your or unpacked and the converted collada DAE files in that same directory where your or was placed just with prefixes or underbar and DAE underbar. So once we've got that or file read in and we've got our or underbar, unpacked material, you just select the file menu again and then say convert data and it's gonna convert the whole thing. It runs pretty quick, but it may take a couple of minutes if you've got tens of thousands of objects, but that's gonna then create your DAE underbar with a name and your converted content will be in that. And all the collada objects, all of the textures that are needed for this are all gonna be in that area. And in particular, it separates the solid objects in the region that you've converted from the phantom objects. So we're going to have solid and phantom objects separated and that's gonna be interesting and useful later on when we import it into Unity. The import to Unity is also pretty straightforward. The important thing is to make sure that you use a special shader that's made available in Unity before you take any content in. So anybody who's talked to me about this tool, if they've forgotten to do that, that's usually where they get basically a bit of a mess as things come in, the textures will all be wrong. And the shader is included in the R converter. In the R converter distribution, but you've got to put it into an area that starts in Unity with the file name that starts editor. It can actually be at any level where an editor appears, but typically editor is at the top level of your Unity project. So as long as you put this specialized shader, the name of it is select or shader.cs. So it's a C sharp script. And once you put that into that editor, you can then start importing your material. You can actually just literally drag and drop the whole of the Collada, both the solid Collada file, DAE files and the Phantom ones. You can literally just drop them into the project and it will all be there and you can make use of it. But I find it's more convenient to make yourself an empty game object, an empty Unity game object at the location, zero, zero, zero, and put that into your project before you start. And then you can drag and drop into that and it's useful later on because you can then move entire regions about, especially if you want to compose a Unity scene with multiple OpenSim regions. I'll give you an example of that later on that we've made use of. I use that quite a bit these days. But basically once you've got this empty game object, I typically place my solid OpenSim content into one converted objects into one subdirectory of that and my Phantoms into another one. That lets me then manipulate those separately if I want to. All you then do is literally drag and drop the entire DAE folder onto that area, dropping it in my case onto that empty game object. And within a minute or two, all of that will then appear in your project pretty much instantly. The idea in, the terrain is brought across as you'll see in a minute, it breaks it up into a number of parts because of the limitations in Unity on 64,000 triangles, polygons in any object that comes in and the terrain tends to be a bit bigger than that. But except for breaking that up into parts, the terrain and the objects will all be brought across. The water layer is not brought across. So typically what you do is add a water layer also at 0000 using standard Unity assets. And pretty much that's it. But there are a few issues that may arise. So first of all, you should take care that you do have that or that select or shader.cs file these, but the specialized shader that I mentioned, you should make sure that that's in before you start. If you see anything wrong, it's best to go back, start again, having put that in. You'll get a warning for the terrain being imported, set for the most simplified kinds of terrains. Typically the terrain will be broken open into multiple 64K areas. Typically you'll get three areas. But that's not a problem. They all lay alongside one another and you can even adjust them all separately if you need to. Now during all conversion, you may have seen a number of errors being reported on texture conversions. I find most of these don't cause any visual issues, but it's because all converter is trying a number of different JPEG 2K library converters and some still can't be converted even with all of the options that Fumiya Seko tries. So it tries a number, watching for failures and tries as many as needed until it gets success. And in some one or two cases, you still can get, go through all of those different JPEG 2 conversion libraries and find that they don't convert. I see sometimes when I'm starting up my open sim regions, some of these JPEG 2 conversion, JPEG 2 texture issues. So it is just because we've got so many variants, I think of JPEG 2 in a lot of the various versions we've used over the years. Now bearing in mind though, the open sim converter, the all converter doesn't bring across any active scripting, particle systems for smoke and fire and so on, or very specialized light sources. You need to add these again into your project. But it's pretty good at bringing across most texture visual effects and preserving those. It does use legacy unity shaders and that can be a little bit of an issue if you're going into certain environments. And you can convert that later on by looking at those legacy textures and converting them to a standard unity texture. But the legacy textures is what's used in the current version of the system. I'm just gonna show you an image of a unity editor with a converted region already brought across just to give you an idea of what this looks like in the unity editor. But there's nothing fancy about it. It's basically just all the little parts that have come from the converter dropped in. The first conversions that were done and that we tested the all converter on was the buildings that we've got in our open sim areas for the Tokyo University Information Sciences group. They have their building. And the picture I'm showing is of the conversion with open sim on the left and the unity version after conversion on the right. And the top one is the Tokyo University Information Sciences Institute and the bottom one is the open virtual collaboration environment in open sim and then convert it to the right. And if you can see those images and if you can't look at the webpage later you'll see there's a pretty direct comparison between the conversions. You don't lose much on the 3D conversions at all. It brings across the trees, the foliage and everything like that as well. You can actually in the unity editor immediately visit the all converted region just by using one of the third person controllers. If you use the standard unity Ethan asset, for instance you can literally walk straight into that environment. But the all converter also includes a free unity Japan character, like an anime style character called Unity Chan. So you can pick that up if you want but the Ethan one or any other third party any other third person controller you use works fine. And you can just walk into that area and make a look at it before you even produce it. This is what I'm showing a picture of just the Ethan unity character. Now you can walk around, check it's all working check the collisions work as you expect with walls and things of that kind. During the testing and the work I did with working with Fumi we did a lot of conversions of some quite large areas. Some of these open sim regions that we tested had anything up to 10,000 primitives in them or mesh and not existing collage mesh content in them. So open VC I mentioned the Tokyo entity I mentioned but I also have some science fiction areas with Gerry Anderson style science fiction areas and an oil rig that's from Robert Gordon's university up in Aberdeen, which is quite a complex build. There's the castle there and an Edinburgh region. So quite a lot we use for testing and for refining it. We had some problems initially with things like some of the plants and so on didn't look quite like they did. And a lot of that was then were then tidied up during testing and testing the tool. One thing you may be interested in is a particular use of this tool then with an existing MMO or one of the MMOs that's now arriving. Adam Frisbee last night who was one of the original OpenSim developers was talking about SignSpace last night which is an MMO that uses Unity as its build environment but then provides a massive open online environment with multiple regions that people can then enter into. And we've converted quite a lot of OpenSim content through to Unity and then published it into SignSpace. In fact, Adam Frisbee has done some work to make this process a little bit more efficient. One of the problems with our converter is that it's a little bit profligate with its use of textures because of the way it tries to encode information about the other visual properties of textures on particular prims. For instance, the glows and the shininess and other properties of that kind. It tends to use more materials than it really needs to in describing all the various textures that go on to and material properties that go on to the converted objects. So what Adam's done is provide within the Unity editor is provided a tidy up tool which you can find in one of the menus that's added by the SignSpace development work, development tools inside Unity. So SignSpace adds these menu entries and one of them is to do an all material cleanup and it can significantly reduce the number of repeated textures without causing any visual degradation at all. And in particular, we've brought across 12 of our regions from the Virtue University of Edinburgh which appear in an OpenSim build on our OpenView grid. We brought the 12 regions all across all separate 256 by 256 grids. This is not one mega region. It's just a number of regions. That's the way we've continued to use it. And we brought them all across separately, put them into these empty game objects I mentioned at 0000 initially and then simply shifted them all by 256 meters in an X and a Y direction. And that's let us lay out the whole 12 region grid and then simply publish it out to OpenSim. And I'm showing a picture here of the open virtual collaboration environment with a couple of SignSpace test avatars. And so you can immediately see that you can just go into SignSpace, enter that region and you've immediately got voice and social elements where you can interact together in the environment. The build as it looks as you enter SignSpace, you can see the 256 tiles still in that image I've used but that's the Virtual University of Edinburgh's OpenView grid with an open virtual collaboration environment and various portals all put onto SignSpace using all converter from OpenSim to Unity to SignSpace. And you can, as many of you probably know, you can use the Controls Alt Studio Firestorm based viewer to look at OpenSim content, although as Frank mentioned earlier on in one of his talks in this conference, you can't really get the frame rates for that. But SignSpace is actually implementing virtual reality viewers and Oculus viewers that can be used in SignSpace. So this is another way that you can use virtual reality to see this content when it's been converted and brought across. The license itself has been made as flexible as you can imagine. It basically lets you do anything you'd like with the tool so long as you don't use the names of those who created it or the name of our converter to promote or endorse your own products. Other than that, it's a very flexible license that lets you pretty much do anything you like with it. As I promised, there is a web page. The web page is blog.inf.ed.ac.uk slash 88 slash OAR hyphen C-O-N-V slash. So basically you can find that, I'm sure by using web search as well. But that page will give you all of the links to the downloads and other information and also give you some of this quick start information that I've been discussing. So hope you found that talk useful. Thank you. And thank you. Austin, we did have a couple of questions come up. Let me go back here and see Grimasa says, can DEA step be brought to Blender directly? Not directly. So one of the problems with Unity Collada Import is that it takes a slightly different, it's almost like an illegal version of Collada. So Fumi, when he did the tool, made sure that he produced Collada that could be imported into Unity. Fumi himself is very aware that there's a number of things that could be done to expand the tool and make it more useful for a number of users, including import to Blender and indeed FBX export, which some of us have been starting to get interested in because of FBX being a potentially, although it's a proprietary format from Autodesk, it has been using a number of new environments like high fidelity and Sansa now. So you can imagine that we're interested in a route. I'm gonna put up a further slide. This is about, it's a development path that we're using at Edinburgh for some of the experiments and moving about between these tools. And there are different things you could do. For instance, from Unity, there's a new FBX export tool. And I've done a little bit of experimentation with that, but not a lot. And it could be that that could be a route by which once Collada is inside Unity, you can get FBX out, which might give a route to Blender. But there isn't a direct route to Blender right now because the Collada will be treated as illegal. A lot will import, but not all of it. Okay. And Austin, will you be at a booth for a little bit for further questions? Yeah, yeah, I'll go over there and after we've just given this talk a minute about, the booth is number five. So if any of you are interested in just chatting, but if you can also email me or IM me as my avatar if I don't happen to be online, I will be coming back later on for the Hypergrid Safari because we're visiting one of the OS Grid regions that we run during Thursday's Hypergrid Safari. So, but you can find me around or email me. The contact points were on that previous slide. Okay. Well, thank you very much for joining us. It was really interesting. I think a lot of people are gonna be trying this out. You're welcome. Thank you. Okay. Our next session will begin at 8 a.m. and is entitled Creating Case Study Educational Simulations for In and Out of World Use. I wanna encourage everybody to visit the OSCC 17 poster expo in the OSCC Expo 3 region to find the company information on presentations and explore the Hypergrid to our resources. You can also go to OSCC Expo 2. Thanks again for everybody and we'll be back in a little bit.