If you’ll remember from last week’s post on avatars, I wrote a bit about the High Fidelity content philosophy — it is yours to create, license, host and share as you see fit! This unique stand we take grants domain and content developers significantly more freedom.
Today, we’ll take a look at some external content sources and bringing this content into your High Fidelity domains! A great example is the Unity Asset Store, which has plenty of 3D models, textures and sounds that you can use in High Fidelity.
The folks at Unity Technologies are fine with Asset Store content in High Fidelity, as long as you stick to the terms of their EULA (which does not restrict content use to Unity based projects) and host these files on your domain’s Asset Server, rather than a public webserver.
In this example, I’ll use the Viking Village demo from the Asset Store, a lovely free scene available here: http://u3d.as/bqF. This asset comes into Unity as a package with all sorts of assets and scenes in place. We’ll just grab the shield’s model from the package for our example.
Most Unity projects do not have their textures embedded within their FBX models, and instead have references to individual files, so you’ll want to hook up embed them yourself in Maya or Blender. Let’s have a look at this shield model from the Viking Village scene. Here you’ll see the model itself, an FBX, in the project pane.
If you drag it into a scene and select it, you’ll see its connections in the mesh renderer component. This model has a couple of different textures.
In Unity’s inspector, find the material’s reference to the texture files it uses. Once you find it, you can right click and choose Show in Explorer to see the actual file. These are the files you’ll embed in the FBX for use in High Fidelity.
By clicking the Albedo box in the material component, you can see the texture file it refers to. Right click it and choose Show in Explorer to get to the file itself, and do this with the model file also. Copy the model and related textures to a new folder, and let’s bring them into Maya.
In Maya 2016 LT, I’ve applied a Stingray PBS shader to the shield and connected the Color, Normal, Metallic & AO maps.
Using the StingrayPBS shader, we’re creating a new shader material in Maya and applying the textures. If you’d like to use collision, you can either find a collision hull mesh for it from the Unity project (if one was included) or just create a new one in Maya. In the case of this shield, I created one from scratch. Remember to keep those colliders convex!
Now we export using Binary FBX 2014/15, Tangents & Binormals checked, as well as Embed Media checked. Bring it into High Fidelity’s Asset Server, add to world, and presto!
I brought this awesome shield to High Fidelity from the Unity Asset Store.
Content which uses physically based rendering (PBR) works best, since there is a 1:1 correlation between High Fidelity and Unity’s metallic PBR material types. Meshes which use older material (designated as Legacy Shader in Unity) or use specular PBR (not metallic) may need a little massage to get things looking identical, but in most cases the differences are marginal. You can apply the same technique to models you get from SketchFab, TurboSquid, CG Trader and other websites, but be aware that their meshes might not be optimized for real time. It’s not uncommon for folks to have problems with models from Sketchup 3D Warehouse. The Unity Asset Store and Sketchfab, however, are full of content that’ll run great in a VR and game engine, so it’s your safest bet.