Author Topic: Substance doesn't look correct in Unity.  (Read 3250 times)

Hello all. I've just got done making my first substance and am rather new to the whole process. However, it seems that none of the textures are working properly when I import the .sbsar into unity. Here is an image to demonstrate:



The top left is what it looks like in SD's 3D view, and the bottom left is Unity. My chart seems pretty simple so I'm not sure what could be wrong. I've tried changing the compression and Unity to no avail. Thank you for your time.

Hi,

Did you try your .sbsar in Substance Player?
It should appear in Unity as in Substance Player.

You can post your .sbs on the forum so we can have a look at it.

Cheers,
Nicolas
Head of Product Management

Thanks for the reply. Yes I tried the .sbsar in susbtance player and it worked correctly. So its only not working in Unity. I will attach my .sbs file.

The problem is that by default, Designer and the Player are using a GPU engine (DirectX or OpenGL, depending on your OS) to render the textures whereas Unity uses a CPU engine (because it is not taxing on the graphics card).
The results of both types of engine should be identical for most practical purposes, but there are some corner cases where they may differ, usually because of numerical precision issues.
In your case, the difference is in the way FxMaps node deal with negative opacity when using the "Add/Sub" blend mode. One engine "clamps" the negative values to zero while the other one properly produces creases. One way to solve the inconsistency would be to make the opacity positive in your FxMap and invert the colors of the input pattern instead.
You can switch the engine used for rendering in Designer (in Tools->Switch Engine...) to check periodically if the rendering will be fine in Unity.

This forum thread also discusses some possible causes of differences in rendering:
http://forum.allegorithmic.com/index.php/topic,534.0.html
Last Edit: January 08, 2014, 02:51:09 pm

Ahhh, I figured it had something to do with the fx-map. Thank you for the help I've switched it to render with the CPU engine now. The problem with inverting the grayscale map is now I have these little white borders around my creases where the fx-map is blending the new grayscale.