Not too long ago, I posted a 4-part video tutorial showcasing the interoperability between 3ds Max and Stingray, with a focus on material transfer.
Being a long-time 3ds Max user, I have often struggled to get my materials into Stingray exactly as I designed them in 3ds Max. When I use the Scanline Standard material in 3ds Max, I can get Color and Normal data through to Stingray but I lose info from channels such as Specular, Glossiness or even Opacity. Worse, when I try to use a more current material type such as 3ds Max’s relatively new Physical Material, none of the channels defined in 3ds Max (such as Color, Normal, Roughness, Metalness…) carry over. So I’m left with the undesirable choice of reworking my materials in Stingray.
This got me thinking about the DirectX Shader in 3ds Max and after a bit of experimenting, I found that this is the way to go for a seamless and perfectly compatible exchange.
For my tests, I built a simple scene in 3ds Max made of primitives and extruded shapes. I combined them into a small dock or a section of a pier. All objects were converted to Editable Polys and unwrapped so they can be ready for material application.
Since Stingray is built to deal with Physically-Based Rendering (PBR), I needed a few textures to cater for Color, Normal, Roughness, Metalness, and Occlusion. These are typical textures you usually want to have in Stingray’s real-time engine. There are several methods to create those; some time-consuming, others rely on simpler but more expensive methods, as you’d be then dealing with third-party commercial products.
Commercial products that are often used to create PBR textures (and regularly get high praise) include nDo2 (www.quixel.se), Crazybump (www.crazybump.com) and Bitmap2Material or B2M (www.allegorithmic.com). However, if you’re looking for an inexpensive solution, you may want to try an open-source application named Awesome Bump. I had to google it after I’ve seen a demo of it on YouTube.
Like its commercial competitors, Awesome Bump takes a color image and generates PBR textures for Normal, Roughness, Metal and AO (Ambient Occlusion) among other options. I used it to generate the textures I needed for my dock.
With the textures ready, I only needed to feed them into the right material. Enter the DirectX Shader.
In 3ds Max, I created a DirectX Shader in the Material Editor and made sure to switch it from the default HLSL to Stingray for better compatibility.
Stingray uses a default shader preset, so I only needed to feed the textures I created in the right channels.
I did notice one thing though, in that the DirectX Shader works best in 3ds Max’s viewport if Gamma is disabled. So I made sure Gamma was off throughout my experimentation.
Adding the textures to the right channels was a no-brainer, and sending the information (geometry, materials and textures) to Stingray was flawless, with every texture and every channel accounted for.
I then went on to play a bit further with the DirectX Shader by editing the preset in 3ds Max. I figured I needed a material with emissive properties for the globe at the top of the light post, and that material didn’t really need anything else. So I figured I can edit the shader tree to simplify the preset a bit.
This turned out to be pretty easy as long as you remember to dissociate the shader from the default preset. When you go to edit the shader tree, a red warning reminds you to make a material “Unique” before you start editing it.
So I ended up deleting nodes that define the channels that I didn’t need in this case. I only left the Emissive branch untouched and that simplified the shader tree and its UI in 3ds Max; and more importantly the UI in Stingray once the shader was sent through. Again, the compatibility was flawless.
The real test came when I decided to build a custom shader from scratch, one I could construct node-by-node, to see yet again if it would work equally well in 3ds Max and in Stingray.
Here I went a bit lazy and instead of being original, I decided to borrow a page from Dan Matlack’s book. Dan has already done extensive work on Stingray and I strongly encourage you to visit his YouTube page to learn more about Stingray workflow.
In one of his videos, he creates an animated ocean shader directly in Stingray. I took his procedure and transposed it to 3ds Max, building the shader tree node-by-node followings Dan’s instruction. Lo & behold, other than the UI being slightly different here and there, everything else worked perfectly and the new custom shader transferred to Stingray with no issues whatsoever.
The results were quite conclusive; using the DirectX Shader is key to transferring materials seamlessly from 3ds Max to Stingray. If you would like a more step-by-step, in depth explanation of the workflow I used, you can watch the 4-part tutorial on the 3ds Max Learning Channel or right here on The Area.
If you feel like experimenting on your own and would like to use the scene shown in this article, you can download it here: