Using Substance Painter for texturing

Tips and discussion about scenery creation for RailWorks.

Using Substance Painter for texturing

Unread postby cnwfan » Mon Oct 09, 2017 9:28 pm

Came across this tool for texturing Blender models while working through a Unity course. What's interesting about this tool is that you import an fbx version of the model, with all the unwrapping and base materials assigned to the mesh. Using the program, initial maps are baked, and then each model material is textured using a combination of brushes, stencils, or predefined materials. As these materials are applied, not only is the material color changed, but all the associated baked maps (normal, height, roughness, etc) is also changed in real time. While the program is really designed for current game engines (Unreal, Unity), I thought I'd try seeing if I could make it work for our sim. Below is my first success after several failed attempts.

20171008152028_1.jpg


By using a predefined wood material in the program, and adjusting the base color layer, I was able to achieve a weathered wood affect that actually looks somewhat realistic. This was all done in Substance Painter, including the normal and ambient occlusion bakes. Two textures were exported out (color and normal), and then remapped to the Blender model along with using the TrainBump.fx shader. It was then a matter of exporting the model to igs format, hooking everything up in the blueprint, and exporting to my assets folder.

SubstancePainter_100917.jpg


Above is a screen capture of my Substance Painter screen, showing the basic layout. The manufacturer of the software (Allegorthic.com) has a large library of Youtube videos aimed at the beginner, so learning the tool really comes down to watching and practicing (which I did... and am still doing a lot of).

The above model was fairly simple to prepare for Substance Painter, in that I just had to join all the objects together into one large object, unwrap, and assign a single material to the object. However, things get more complex if you have multiple materials on an object, especially if you want multiple materials to appear in a single texture set. I'll be experimenting with this next, as I have a model in development for a fellow RWA member that will need this functionality.

So, it's off to more modeling and texturing, with one more tool in my arsenal. One final thing to note. Substance Painter has native plugins for the Unreal and Unity game engines. Should DTG ever decide to open up Train Sim World content development to the outside world, it would be interesting to see how this program would fit in the content development workflow. From what I've been reading on various forums, more independent developers and 3D content studios are moving away from Photoshop and to a PBR based texturing engine like this. More to come as I learn more.
You do not have the required permissions to view the files attached to this post.
************************
Howard (cnwfan)
Waverly, IA
My Flickr railroad photos: https://www.flickr.com/photos/184697503@N06/
cnwfan
 
Posts: 701
Joined: Mon Apr 25, 2011 4:16 pm
Location: Waverly, IA

Re: Using Substance Painter for texturing

Unread postby Chacal » Fri Oct 13, 2017 10:35 am

So in the workflow for TS, you do this step after texturing and mapping, and before exporting to IGS?
What happens if you have to modify the model or the UV mapping, do you lose all your work in Substance painter?
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6481
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Using Substance Painter for texturing

Unread postby cnwfan » Fri Oct 13, 2017 9:43 pm

Good questions. You would use Substance Painter before exporting the IGS file. It's really used instead of Photoshop / Gimp to create the texture images that eventually are mapped to the model material(s). Other than resaving out the Substance Painter textures to dds format, PhotoShop was not used to create my textures... except for a black and white "stencil" file for the siding name. However, the application of the siding name to the sign boards was done through Substance Painter. These are the steps I followed for the above siding sign.

1. Create model in Blender using 1 to several objects. My model was made up of 4 objects.
2. Mark seams on objects for unwrapping, and test unwrap individual objects. I did this just to see how the uv's laid out, and to check for stretching.
3. Do a Save As in Blender, and save to the final file name. This will be the file that will eventually be exported out as an igs.
4. Join all objects together in the new file. Since the sign was going to be a single material, I wanted the whole object to unwrap onto 1 UV map.
5. Assign a material to the object, but don't fill in the material slots. The material name acts as a placeholder in Substance Painter.
6. Do the final UV unwrap, and adjust the UV islands as desired.
7. Save and export object out as a fbx file.
8.Create new project in Substance Painter and import fbx file. Bake maps and add various Substance Painter materials to the one object material.
9. When finished, save project and export out color texture (which contains ambient occlusion) and normal map. My textures exported out as 2048K size and png format.
10. I renamed my exported textures to shorten the names. Color texture became object name_C, and normal map texture became object name_nm.
11. Open Blender file used to create fbx file. Now fill in material slots for the single material. I used the TrainBump.fx shader in slot 1, so in slot 2 I put the color texture, and the normal map texture when in slot 3.
12. Export object out to igs format.
13. Open png textures in Photoshop, and save in dds format (x.8.8.8 32 bit RGB, no alpha).
14. Copy dds textures and igs file to desired source folder in Railworks.
15. Create blueprint using blueprint editor, preview, and export to Railworks.

To me, this is pretty much the same workflow I would have followed if I had used Photoshop for texture creation. The export out as fbx step is saved, but I still would have had to bake the ambient occlusion in Blender, and create the normal map either in Photoshop, or with MindTex.

You can reimport the model into a Substance Painter project while it's being worked on. I actually did this with the above sign, as my first unwrap was done using the smart unwrap, and I didn't catch that the wood texture was cross grained in certain areas. I went into the Blender model, used the standard unwrap, and adjusted my UV islands so that the wood grain would all be going the same direction. Rexported out the fbx, reimported the fbx into the Substance Painter project, and I was off to the races again. From what I've read and watched, reimporting an fbx can become problematic if you decide to do significant changes to the model or the materials. The model really should be complete before starting the texturing process in Substance Painter.

Hope this helps to explain things a little better. Thanks!
************************
Howard (cnwfan)
Waverly, IA
My Flickr railroad photos: https://www.flickr.com/photos/184697503@N06/
cnwfan
 
Posts: 701
Joined: Mon Apr 25, 2011 4:16 pm
Location: Waverly, IA

Re: Using Substance Painter for texturing

Unread postby cnwfan » Thu Oct 26, 2017 8:15 pm

20171025141109_1.jpg


I've completed my next siding sign with Substance Painter. But this time, I have 4 materials baked onto a single 2048K texture. The process isn't that much different from my single material / single texture siding sign, except for adding a vertex painting step during the modeling process.

CruceroBlender_102517.jpg


Before joining all the objects together in Blender, I vertex painted all the exposed faces with different colors. Each color represents a material that I want to isolate on the texture. Because Substance Painter generates a texture set per model material, I can only have one model material assigned to the entire model. The vertex paint colors are used by Substance Painter to generate a color ID map, which in turn is to create a layer mask for each desired material. With this model, I wanted 4 materials on the texture: aged wood for the post, painted white surface for the sign fronts, brushed aluminum for the sign backs and edges, and finally lightly rusted steel surface for the bolt heads and washers.

Once the vertex painting was completed, I joined all the objects together, created my LOD level, exported to fbx format, and imported the fbx into Substance Painter.

CruceroSubPainterEditor_101617.jpg


Once in Substance Painter, I created my material layers and layer masks. When I exported the textures out of Substance Painter, I just made sure I had a color, normal, and a specular texture for the TrainBumpSpecMask.fx shader I wanted to use. The exported textures were renamed, and the specular texture was added as an alpha layer on the color texture using DXTBmp.

CruceroSubPainterRender_101617.jpg


Finally, the above image is a render from within Substance Painter using the Iray rendering engine. The final model in the sim is close, but it really can't compare to render done in a rendering engine designed to use PBR shaders. Anyways, I hope someone finds this information useful. Thanks... and happy modeling!

BTW: Crucero is a station name on the old Tonopah & Tidewater railroad. This is the location where the T&T crossed the UP LA & Salt Lake route at grade just west of Kelso, CA.
You do not have the required permissions to view the files attached to this post.
************************
Howard (cnwfan)
Waverly, IA
My Flickr railroad photos: https://www.flickr.com/photos/184697503@N06/
cnwfan
 
Posts: 701
Joined: Mon Apr 25, 2011 4:16 pm
Location: Waverly, IA

Re: Using Substance Painter for texturing

Unread postby Chacal » Mon Oct 30, 2017 10:02 am

Thanks! I'll take time to digest this information.
Texturing has always been my weak point.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6481
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada


Return to Scenery Design

Who is online

Users browsing this forum: No registered users and 2 guests

cron