Not WYSIWYG

I have a colleague using Blender who is exporting a model for my use.

Try as I might I simply cannot get the model to look the same in Unity as it does in Blender.

I’ve adding and removing light sources.
I’ve tried various basic shaders, diffuse, vertex lit etc.

What settings do I need in order to get like for like?

A couple screenshots, a sample .blend and more information would help us help you…

We’re trying to do a like-for-like using a simple shiny texture to ensure lights and darks don’t get washed out.

I’ve attached out blenders screenshot and to unitys shots. Once that shows that file just after import and one where I’ve vainly tried to fiddle with the VertexLit shader properties.

47484--1729--$unityvsml_190.jpg
47484--1730--$unitysm_945.jpg
47484--1731--$screenshotsm_317.jpg

more files …


47485–1733–$colortest_129.blend (112 KB)

Sorry, I posted before you put the screenshots and blend file up. Now I’m confused. What are you trying to achieve? Do you want to map the vase to the cube? If this is just a color test, are you wondering if you can exactly match the color values of a texture in blender to unity? I’d use a diffuse shader for this, and try to exactly match the light setup.

The image above is a raytraced image used a texture on the cube primative shown in the Blender screenshot.

When I use this in Unity I cannot find any combination of shaders/light that will reproduce the Blender screengrab.

The image in Unity does look pretty similar to the image in Blender’s viewport to me… are you trying to match Blender’s viewport, or Blender’s rendered image?

What material settings does Blender use on this object? From the look of it I’d say it uses the texture as some sort of spheremap or reflectionmap. If you want to emulate that, you have two options:

  1. generate a cubemap from the texture (in Import settings, play with generation options) and use one of Reflective shaders, or
  2. write a custom shader that calculates the texture mapping the same way Blender does.

The vertexlit shot you posted is close, just darken it a bit by adjusting the color intensity (just click on the color fields in the shader box, i.e. “Main Color” and move the Light/Dark slider on the right down.

This is just a regular 2D texture mapped to the cube.
As (I believe) Blender uses Open GL I thought I could get a like for like match between the Blender viewport and the Unity game view.

I had to use the VertexLit shader in order to illuminate the object (I’m going for absolute bare minimum here) but the texture washes out - compare the highlights between the Unity game view screenshot and the Blender viewport screenshot.

polytropoi - your right, but I was hoping someone might be able to tell me the extact values.

I would have though that this was an important workflow issue. If you don’t see in Unity what your modeller sees in Blender - how can you collaborate successfully?

materials/shaders and lighting don’t transfer between apps. your modeler shouldn’t be putting reflective shaders (or whatever) on an object or lighting it in blender. that kind of stuff should be done in unity and they should only be worrying about geometry and textures.

if they aren’t using any shaders or lighting in blender, instead of the vertexlit shader you could try using the regular diffuse and adjusting your ambient light in your render settings.

In this test I’ve used another 3D authoring package called Virtools:

I create a cube primative, drag the texture on to it, change the emissive and … you get a faithfull representation of the original texture

Do the same in Unity, assign VertexLit shader and …

47499--1734--$unity1_506.jpg

pete - I agree - and he isn’t! What I’m trying to do is get a faithfull representation of the original texture - as shown above in Virtools.

Have you tried doing the same as in Virtools in Unity? In Virtools you have emissive white, and diffuse color black (that means no extra illumination besides emissive). From your Unity screenshot it looks like you have both set to write.

Besides that, in Unity all lighting values are multipled by two (to allow easy “overbright lights”). So to get full emission with no overbright, you have to set emissive color to 50% gray.

Hi Aras.

I’ve adjusted the values to your suggestions, and it’s started to look good:

I must admit I didn’t notice any difference when changing the Main or Spec color - 50% Emissive made all the difference.

Now how do I get a nice crisp texture :)?

47503--1736--$u3_514.jpg

Perhaps you don’t have any lights in the scene. Diffuse and Specular only take effect when there is some illumination from lights.

I see a warning at the bottom of your screenshot, it says that texture size is not power of two. Thus if it will be used on regular 3D objects, it will be scaled up to next power of two (default setting in import settings).

I’d suggest manually making the texture a power of two size (128, 256, 512, 1024, 2048). It will load faster, be crisper and will allow using DXT compression.

That’s not really how 3D stuff works…you can’t know, when modeling, what sort of lighting and so on you’re going to end up using in the game environment. I’ve done 3D modelling for other people as well as myself, and in both cases I make no attempt whatsoever to “match” anything, because it’s not really possible or desirable. I don’t use lighting or shaders or anything in Blender when making game models. (The fact that Unity and Blender both use OpenGL is irrelevant…that’s just a means for communicating with the graphics card and it’s totally up to the individual programs what the “look” is.)

–Eric

Turn on anisotropic filtering in the texture inspector.