Thursday, 5 November 2015

ID Map Creation for Masking within Substance Painter using Zbrush


I wanted to create an ID map for masking within Substance Painter. Frankly Painter should have an easier way to do this built into the program like Zbrush does, but they seem to be improving it often. One method of doing it is to assign a material to each object and then baking it using Maya (or whatever package you are using), but I find this method annoying and time consuming. I don't like dealing with tons of shaders in Maya because then I need a seperate project for substance or it will split it into more parts.

So for this method I'm using Zbrush. Here's what I did...

Start by sending your model to Zbrush with GoZ (*first do all of your UV layout, unless you want to auto-unwrap in Zbrush.)

Next assign a different polygroup to each UV island by hitting the "Auto Group with UV" button:


It might not seem to do anything but if you hit Shit+F you'll see your groups:



Now we want to convert those groups to a texture that we can export. To do this simply hit the "Polypaint from Polygroups" button under the Polypaint menu:


Okay, just about done. Now just need to make a texture from the polypaint. Go down to the texture menu and select "New from Polypaint" under the "create" submenu.


Now we have a texture we just need to save out. In the texture menu you'll find your new texture, select it and hit export and you're done!

If you name it properly then Substance will automatically plug it in. If you want to know how to use it there's loads of documentation out there, here's a link:

https://www.allegorithmic.com/page_element/text_large_media/960


This may be obvious to people, but some may not know how to do it, as I hadn't done it before. If anyone knows how to make actions in Zbrush it would be awesome to get a script that would do all of that in a click, or even for multiple subtools!





Wednesday, 4 November 2015

Allembic Substance Designer to Element 3D Workflow

I'm working on trying to figure out the proper method for workflow between substance painter and Element 3D. It's proving extremely hard to find any documentation on how to get one to the other cleanly, and the manual on video copilot isn't very specific on how it translates with other apps or workflows...

http://www.videocopilot.net/docs/element2/texturing_and_materials/physical_shaders/

I'm very new to the PBR workflow (first time admittedly) but I'm learning that there's two types, the specular/glossy method or the metalness/roughness. Element 3D being the red-headed stepchild that it is threw this terminology out the window and instead uses "glossiness" and "reflectivity", which seems to suggest a hybrid. There's so much terminology that it's extremely difficult to jump in, and equally as hard to google specific things.

My hope was that it matched up to one of the two of these already created workflows, but it doesn't appear to be the case. The glossiness seems to be okay, but the Reflectivity channel must contain a color in order to give the reflection a color (for example copper). This isn't correct PBR mentality because the color of the metal should be contained in the Diffuse, however when you put a diffuse color and then a greyscale reflection map, the color is lost. Here's an example.

Here's what I'm going for that's been created in Substance Painter:

I created this as an example because it has colored metal (copper), metal with less shine, and plastic with little to no shine.

Now to see it in Element 3D we get this:


 The left is the metal/rough pbr workflow. The 'shinyness' didn't come through on the metal/rough. The spec/glossy looks better but is also wrong because it lacks the color and both metals are equally shiny.

The gloss map appears to be essentially correct, but there is not enough contrast.


Okay, lets try using a specular map instead of a reflection map.



Okay, progress! We've gotten the color back in our copper material. Technically this shouldn't be the way it's done, because part of the PBR workflow is to take the color out of the glossiness and roughness channels if I understand correctly. Well my goal isn't to take the piss out of element 3d because I think it's a really cool app, so I'll rant later. Just wish that it conformed to one of the plethora of different systems that seem to be already out there.

It appears that while the name suggests that reflectivity is similar to Metalness, it's actually more like specular. I'll conclude that the model element 3D uses is essentially spec/glossy in that case, yet when applied directly from a spec/glossy export of Substance the contrast isn't enough to give the accurate blurred metal look I'm after. Because of the volume of textures I'm going to be creating I want to avoid using any individual color correction workflow (such as tweaking the levels on the gloss map). 

What if I use the spec map twice instead of gloss/rough?


Okay! This seems to match the look of the original model in substance painter. Using glossiness and specular didn't work off the shelf, and neither did roughness or metallic. Somehow specular/specular works. This seems odd because this is essentially the old approach that they're supposed to have moved on from.  A few more experiments...

Eureka!

Okay I think I solved the problem. The gamma of the glossy map was set to 1.0 while all the other maps were 2.2! I made a new material and double checked and yes it's at 1.0 and everything else is 2. I have no idea why this is. Was it intentional because most maps come in linear or was it a mistake? I haven't a clue. Either way, setting it to 2.2 seems to have solved my issue.


In conclusion:


  • Use the PBR spec/gloss preset from Painter.
  • Put the specular map in the reflectivity channel and the glossy map in the glosiness channel.
  •  Set the gamma of the glossiness map in each material from 1 to 2.2.
  • Make sure the glossiness and reflectivity are at 100% on the shader in Element (the map controls it, and the default reflectivity is 0)
  • Profit.

As stated before I'm new to texturing/substance painter/and PBR so I'd really appreciate any wisdom anyone has to offer!