Jump to content
3DCoat Forums
Carlosan

Unity - MASTER THREAD

Recommended Posts

This is the Unity Master Thread.

You can throw your questions in here, as this will be a sticky.

 

Get unity3d:
http://unity3d.com/unity/download/

Useful resources and learning materials:
Forums http://forum.unity3d.com/
Semi-official Wiki http://unifycommunity.com/wiki/index.php?title=Main_Page
Q&A http://answers.unity3d.com/index.html
Scripting tutorials http://www.unity3dstudent.com/
Scripting tutorials http://cgcookie.com/unity/

Popular Plugins & tools:
Strumpy Shader Editor: http://forum.unity3d.com/threads/56180

  • Like 2

Share this post


Link to post
Share on other sites
 

Hi, I imported some objects for Per Pixel Painting into 3D-Coat for use in Unity 5.

1. Import Model

2. Choose Workflow in Paint Room under: Textures-->Textures Import/Export Workflow --> Take what you want.

3. Paint Model  :)

4. Export: If you choose Gloss/ Metalness or Roughness/Metalness, you export the Albedo and Normal Map via the Textures --> Export function. For the specular map with glossiness in the alpha channel, you have to switch the workflow (2.) to the first one (Gloss/Color Specular). Then you can export the specular Map (Textures --> Export).

5. Import Unity: Choos the standard shader (specular setup).

 

Hope this helps!

 

P.S. Thanks to digman who pointed me first into the right direction  :)

 

Share this post


Link to post
Share on other sites

If you go to the actual material you are using the normal map with, Unity will have a dialogue box that something is up with the normal map and the option to 'Fix now'. I don't know why it does this but 'fix now' in some way converts it to a normal map that is readable by the Unity engine

  • Like 1

Share this post


Link to post
Share on other sites

Mine look good from 3DC to Unity. Under what circumstances do yours not look like 3DC's?  What do you set your normal value at?

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, here is two pic of difference between 3D-COAT and Unity 5 (reflection doesn't work correctly in unity5)

Normal value in unity is set at 1

 

In the 3D-COAT

 

6b401241654d558aae7fae4ab08009f397e94d88

 

But in the Unity 5 it looks like this

 

50e65fa60b55609dc0227ced65ac46de77553f28

Edited by Silicon Power

Share this post


Link to post
Share on other sites

What PBR workflow are you using? What color space are you in? I can't see much of a difference in terms of normals, it looks like more of a difference with the roughness map and values to me. Also what are you using the standard cubemap for environment lighting? The HDR/ environment lighting often makes a big difference to the final look.

 

Also Unity apparently remaps the smoothness channel so you may need to account for this to get a closer look. I've been using Substance Painter recently but effectively you drop your smoothness/ roughness prior to import to Unity

 

Here's a good thread with some useful discussion on it (based around SP)  https://forum.allegorithmic.com/index.php?topic=4335.0

Edited by arumiat
  • Like 1

Share this post


Link to post
Share on other sites

Thank you arumiat for your help.

I've done another painting and export again and this time the problem was gone! I don't know why!!!

I have one more question! How can I extract 3D-COAT environment maps for use is the unity? (is this possible)?

 

 

 

 

 

Share this post


Link to post
Share on other sites

Here is the link for working with Unity's Standard Shader 

Since 3DC Beta version 4.5.17 we have both Specular and Metallic workflows for Unity.

The web page has Unity 5's specular and metallic charts.

 

WORKING WITH PHYSICALLY-BASED SHADING: A PRACTICAL APPROACH 

 

http://blogs.unity3d.com/2015/02/18/working-with-physically-based-shading-a-practical-approach/

Edited by digman

Share this post


Link to post
Share on other sites

Unfortunately, I didn't make any screenshots when it happened and ever since I ran into that problem I just quit using normal maps on a project, but anyway:

Ever since updating to Unity 5, I get weird artifacts when using normal maps from 3D-Coat. Could I be missing something?

Share this post


Link to post
Share on other sites

Normal maps are working in Unity 5, so no doubt you are

 

Thanks for pointing this out!

So I took another look into this. I created a new object and exported it to Unity 5.

But I still run into some weird problems, especially strange artifacts.

Maybe someone can tell me what I might be doing wrong?

Here are some images showing the problems that appear when using maps from 3D-Coat:

 

post-37695-0-69003000-1431459082_thumb.p

 

Also, some more information: The artifact next to the mouth already showed up in 3D-Coat at some point, but after restarting 3D-Coat it was gone. On the other hand, the artifact on the forehead made its first appearance in Unity.

 

EDIT:

Alright, The artifact on the forehead might appear due to bad topology. I'm not sure, but the quad split into the direction I didn't want it to. Is there a way to tell the quad how to split up? (preferably without triangulation)

 

Also, I can't seem to set the workflow type to metallic or specular when exporting as it is shown here:

http://3d-coat.com/forum/index.php?showtopic=17331&p=119277

The line "Texture export/import workflow" is missing. Does this option only show up in 3D-Coat 4.5? I'm still using 4.1.

Edited by Shu

Share this post


Link to post
Share on other sites

Q. What is the workflow to export PBR maps that are compatible with Unity 5?

A.

In the Paint Room go to Textures>Texture Export/Import Workflow and choose your preference.

Paint your model.

 

For Roughness/Metalness workflow:

Go to Textures>Export>Color/albedo Map (name it with _Albedo)

Go to Textures>Export>Normal Map (TS, Low-Poly Mesh) (name it with _Normal Map)

 

Go to Textures>Texture Export/Import Workflow and choose Gloss/Color Specular

Go to Textures>Export>Specular Color (name it with _Metallic)

(Optional) Go to Textures>Export>Emissive Intensity (name it with _Emission)

 

In Unity, using the Standard Shader:

Drag Color/albedo Map on Albedo channel

Drag Normal Map on Normal Map channel

Drag Specular Color Map on Metallic channel

Drag Emissive Intensity Map on Emission channel and choose emission color.

Share this post


Link to post
Share on other sites

Thank you very much for your answer, carlosan!

This was very helpful and most of the stuff works now as expected.

 

I was even able to shorten the whole procedure:

(The first step will create both a map that can be used for albedo and a normal map at once. Of course, besides exporting the mesh itself.)

1. File -> Export Object and Textures

2. Textures -> Texture Export/Import Workflow -> Gloss/Color Specular

3. Textures -> Export -> Specular Color

4. Textures -> Export -> Emissive Intensity

 

I’m just a little bit confused about emission. If I understand this correctly, Unity’s

Standard Shader“

can’t use an emission color map? Because it seems I can only use an emissive intensity map and set a certain color for the whole map. So basically, I cannot use different emissive colors on the same mesh.

 

Also, I still don’t know why those fragments occurred while testing last time. They just didn’t appear after trying once more.

I still get some shadow casting from the mesh onto itself which doesn’t exactly look awesome due to low-poly geometry, but I guess I’d just have to increase polycount or turn shadows off.

Here is an image with shadows turned on (left) and shadows turned off (right):

post-37695-0-45250300-1436355762_thumb.p

Share this post


Link to post
Share on other sites

Hi,

my model looks good in 3D Coat but it has some strange artifacts in Unity: many quads have become more gray... why is this?

 

This is in 3D Coat

VVmAEw8.png

 

 

This is in Unity Standard shader

 

pY5jn9E.png

 

 

This is in Unity Specular shader (so without normal map)

 

R2kBGOp.png

 

 

And this is in Bumped Diffuse shader (so without specular)

 

EqVCxbM.png

Share this post


Link to post
Share on other sites

 

Requires Unity 5.2.1 or higher.

Requires 3D Coat 4.5.18 or higher.

A plugin that allows to use native 3D-Coat 3b file format with asset created with per-pixel or ptex painting mode.
After adding 3b file to a project, plugin will automatically open it and create a 'prefab' with models and materials, which can be duplicated and tweaked independently.

 

https://www.assetstore.unity3d.com/en/#!/content/49457

  • Like 1

Share this post


Link to post
Share on other sites

Trying to try out the plugin.

Unity 5.3.2f1

 

- I open up a new Unity project.

- Import 3DC plugin from asset store

- save painted .3b file to the Assets folder, hierarchy looks like so:

post-38412-0-05252500-1456180978_thumb.p

 

- but the assets don't load like in the video. The .3b file is read as a texture, and there's another unknown type of file

 

I also get this console error:

post-38412-0-92269900-1456181028_thumb.p

 

Any ideas?

 

Share this post


Link to post
Share on other sites

I have tested plugin: many times have imported 3d models files. Up to 2MB it goes smoothly, but if it's above 2MB I'm having problems with mesh import. Cannot import model to Unity.

 

A fix would be useful and information regarding plugin opportunities    :download:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×