Skip to content

Instantly share code, notes, and snippets.

@TimothyFitz
Created September 3, 2016 16:47
Show Gist options
  • Save TimothyFitz/ecbb1d8c0ea85b8fb0ad2e22e2d2764e to your computer and use it in GitHub Desktop.
Save TimothyFitz/ecbb1d8c0ea85b8fb0ad2e22e2d2764e to your computer and use it in GitHub Desktop.
PROCESS:
Create in Qubicle.
Paint dissimilar things unique colors (each unique color will become a new mask).
Export FBX. Texture, Non-Manifold, As Specified. Scale factor 5
Run generate-masks.py on the material's png file.
Will generate one mask per unique color in the input file, output to material-color.png
Create new Substance Painter project.
Add fbx model.
Set whatever mode from DirectX to OpenGL (documented in Substance's new project settings details, Unity's coordinate system)
Drag masks into Texture Shelf, add just to current project.
For each physical-material aka mask aka layer:
Create new fill layer.
Right click -> Add bitmap mask, choose correct mask (from texture shelf)
Click on "Fill" under the layer (select the mask to show this if hidden)
Filtering -> Nearest
Then click on the fill layer's icon (should be solid color)
Finally, select from Materials list.
(If you want to paint inside the voxels, I think you just create a mask on a regular painting layer nbd)
Output to unity! (TBD, haven't done this yet, should be standard)
Unity needs a reflection probe or an interesting skybox (or both?)
Nothing to do, just noting, Unity should ideally be in HDR mode, but right now we can't with VR enabled (because HDR + Forward rendering = No MSAA. No MSAA is very bad for VR. Deferred rendering also means no MSAA :( )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment