As you can guess from the length of this post, you're walking a long and arduous path, friend
Uru's engine (Plasma), Unity and Blender all have very different ways to handle textures.
In Unity, most people expect each model to just have a single "albedo" texture and that's it - it's also how the Unity FBX importer behaves. But that's not how Uru was made. Let's focus first on Uru and Blender, then we'll see how we translate everything to Unity...
Uru and Blender materials both work with a stack of different "layers" (each with its own texture), with lots of blending options. Each layer draws something new on top of the one under it. This gives the following possibilities:
- smoothly blending between multiple textures (called "stenciling"). This is what you're seeing on the stalagmite in your first screenshot, with the two textures being brown and grey.
- add overlays to existing textures (imagine adding a semitransparent crack texture on top of a stone texture)
- use different UV layers for various textures (to combat stretching, to avoid grid-like patterns...)
- blend between different textures according to distance to simulate the material being more detailed than it really is
- add metallic reflections
- and more combinations which are less often used.
Blender works using the same principle to some extend
(which is why the stalagmite looks fine in Blender), but there are a lot of incompatibilities with how Uru does things. It's simply not possible to correctly mimick Uru materials in Blender.
The Age importer isn't completely stupid though, so it automatically detects materials that completely
failed to import (other materials may not be completely accurate, but purple ones definitely aren't). This is why you're seeing purple and yellow materials:
- Purple materials means some layer combination failed to import (or ZLZ didn't understand it)
- Yellow materials means a layer has a rotation component, which means a UV channel needs to be rotated in order for its texture to show up correctly. The rotation amount is stored as a custom property at the end of the Texture panel in the Property Editor.
- Cyan materials are a combination of purple and yellow materials.
- Dark green materials means the material itself simply couldn't be found, and may be located in another PRP.
(This is taken from the importer's Wiki page
, if you haven't read it yet)
How do you fix purple materials in Blender ? You have to use PrpShop (included with PlasmaShop
) to inspect how the materials are setup, then guess what is the Blender equivalent. Due to the many options available in Uru, there is no guide to this. You'll have to learn through guesswork
But fixing stuff in Blender won't fix it for Unity, obviously.
Unity uses shaders - they are far more flexible, but still tricky to understand. You can set them up using either a graphical node editor (recommended), or write a program in a text file. Once again, you'll have to use PrpShop to figure out what the original material is supposed to look like, and try to recreate the material using Unity's shader editor.
On top of that, if you intend to do any lightmapping, you'll notice Unity uses the second and third UV layer for its lightmaps. This is going to cause even more issues.
Whew. Sorry if it's a lot to take in, I still feel like I barely scratched the surface
It's that complex. You'll have to experiment by yourself. I suggest starting with a very small location like the Nexus instead - starting with the city will just overwhelm you. But feel free to ask more questions, and I'll try to answer them.
VincentJonesVR wrote:EDIT2: I saw that Sirus was working on a direct importer for Unity. Did you ever get that working with multilayer mats?
Yes and no. I cheated. Instead of generating shaders on the fly, I manually wrote text file shaders and pointed the importer to those for each materials.
I wanted to generate the shaders dynamically, but this is absurdly hard to do with Unity.
(That, and I ran into many more issues with the importer in general)
I also manually ported a bunch of Ages to Unity with better results, but gave up - it takes a long time, and I didn't want to bother for Ages that I couldn't release due to copyright issues anyway.
- Show Spoiler