Kat’s Pre-Toolbox : Substance Painter

I’ve been having a play with a package called Substance Painter from Allegorithmic.

For a little while I’ve been looking at some of the texture creation packages that have come along recently – if you’re into 3D stuff you’ve probably taken a look at Quixel’s suite of tools. I must admit those look pretty good and the whole suite is certainly cheaper than Substance Painter. The wrinkle is that Quixel all runs as a Photoshop plugin, and I don’t use Photoshop (I know I’ve mentioned Photoshop in my past posts but I was using it in its “placeholder” role for another graphics editor – everyone knows what Photoshop does). This means the price for the Quixel suite is Photoshop + Quixel, which really starts to add up.

Substance Painter is $149 for an indie license, which doesn’t stack up too badly against Quixel.

Substance Painter is a combination 3D painting app combined with some powerful procedural texture generation that mixes up inputs like curvature, ambient occlusion and normals to create weathered metal, chipped paint and realistically used looking surfaces. It’s designed to produce content for current-gen PBR (Physically Based Rendering) game engines like CryTek and Unity5 but it can produce effective textures for SL as well, though you do have to jump through a few hoops.

SubstPainter_Native

In the picture above the complex “distressed” surface has been created almost entirely by dragging and dropping the so-called “Smart Materials” into the layer stack and then just having a little fiddle with the settings. As you can see the curvature of the mesh affects the texture, showing the paint rubbing off around the sharper edges.

The application also allows you to paint directly onto the surface, which isn’t anything new in itself, but Surface Painter’s brushes can include multiple channels that affect the surface colour, glossiness, bump and “metalness” at the same time.

Making it work with SL

So, how does it translate into SL?

SubstPainter_SL

As you can see from the above image, not too badly. SL’s rendering of metals isn’t great but it works well enough.

Surface Painter is designed around a very different texturing workflow than SL – there’s every chance that the “Next Generation Platform” will use something more like a current-gen PBR renderer, but we won’t know for a while. Because of this its default maps that it generates are things like “Roughness” and “Metalness” – not what you need for SL at all.

All is not lost, however. The application supports different export settings that are optimised for different game engines. You can also design your own, allowing you to put together one that produces exactly what you want for SL. The options available for output include derived maps like Specular and Glossiness – now we’re cooking with SL gas!

You can put together an export configuration that will automatically build perfect textures for SL – Diffuse with Emissive in the alpha channel; Normals with Glossiness in the alpha channel and Specular with Metallic in the alpha layer for Environmental Intensity.

SubstPainter_ExportConfig

Once configured like this Substance Painter can output three maps ready for immediate upload to SL.

 

I haven’t actually forked over my hard-earned cash for Substance Painter yet – I’m still only a few days into the demo – but it’s a fun and powerful tool to play with and I may well end up buying it. Time will tell.

Advertisements

Conrad Props Download

As I mentioned before I wanted to make as much of the USCSS Conrad build as possible available for others to use. I’ve trawled through all the bits and pieces and pulled out everything I think is re-usable outside the build.

I’ve put together a zip file of 39 upload-ready meshes along with associated assets like normal maps and textures.

!PreviewAll

All these are released under a CC BY 4.0 license, so feel free to use them for anything you like so long as you give me some credit 🙂

Download here : http://sta.sh/01j5da2qutdq

Long absence and a USCSS Conrad Post-mortem

It’s been a while since I updated this blog and I haven’t been in SL much either. A combination of things have been keeping me away – relatives in and out of hospital and some personal issues that kept me away.

It’s not all done with yet, and I may still not be back on a regular basis for a while, but I hope things are tending more towards the calm now, so fingers crossed.

 

The last thing I was working on was the USCSS Conrad build. It was a fun project but as it grew it became very clear that a build like this needs to be quite meticulously planned in advance rather than just thrown together in an extended manic episode. I may make a better planned attempt at it later but for now it’s a question of picking over the things I’ve learned and hoping you can learn something from them too 😉

Part of the reason I began building the Conrad was to have a bit of a play with SL’s Advanced Lighting Model. I wanted to explore what could be done with projector lights, scripted lighting and a few other things.

 

Setting the environment

Controlling environmental light in SL isn’t an easy thing – everyone can set their lighting settings to whatever they like, but I wanted the Conrad to be dark and to only have the light that I wanted in there.

The solution I was running with in the end used a small HUD that used RLV to set the user’s environment to a completely blacked out one and prevent them from selecting another while they were inside the build. Access to the Conrad would be by donning the HUD and being teleported to the entrance.

This allowed me, for RLV users anyway, to control the environment and trap the players in the darkness – something I felt was important. If they could turn the lights on at any time it’d lose a lot of impact. There would have been a “bailout” option that would teleport the player out of the build and release the environmental controls.

To give the players some control they would have been given a torch. I played around with this in a number of ways and eventually settled on a two part torch solution. There would be a simple prop torch that the avatar would hold in their hand and an invisible prim that attached to the avatar’s eyeball that would actually project the light into the scene. This allowed the torchlight to follow the avatar’s gaze in mouselook or to follow the movements of their mouse when in third person view.

Conrad Torch

Scripted Lighting

There’s a scene in Alien where Dallas visits Mother, the ship’s main computer. As he enters the computer core the fluorescent lights come on, flickering then stabilising, with that characteristic ticking noise. I always liked that look of the environment blinking into life around the character.

The very first part of the Conrad that I built was a corridor with a door at one end. When you clicked on the door to open it the lights in the corridor would flicker on, illuminating the previously dark corridor. I thought it made a good introduction to the scene.

Conrad Main Door

The lighting clusters are scripted to listen for a message from the door saying that it’s either opening or closing. When they receive this message they enter a randomly timed sequence of flickering on and off before settling. The script affects the projector light component, the “full bright” and glow settings of the fluorescent tubes. The projector texture is one I made in Lightwave depicting the light cast from a similar lighting assembly – it’s mentioned in a previous post.

There’s various other scripted lighting events around the Conrad build that add some reactivity to the environment, but they mostly follow a similar scheme to the one above.

One that doesn’t is in the main lounge area. The lighting here is completely dark except for some light cast into the scene from four screens set up near the ceiling. One of the screens is broken and dark, two display information about the ship’s condition and one is flickering.

CONRAD Lounge

This screen is scripted on a loop to just flicker on and off endlessly. The picture is warning about a biohazard alert and projecting its flashing light onto the door that leads the player down into the lower decks. I was trying to use this to begin to set a gradually more dangerous feel as the player moves down through the ship.

Animated Lighting

In a previous post I talked about making the classic cliche light-shining-through-a-fan. I covered that pretty thoroughly there, but I figured that while I was making animated GIFs I ought to toss one of that in here.

Conrad Cargo Bay

 

So, where now for the Conrad? I’m probably going to tear it down, strip out the useful and re-usable scripts, make some notes on my mistakes (of which there are many), and wait for the mood to take me with another idea where I can use these techniques. I’m going to try to package up as many of the props and textures as I can and distribute those for free so anyone can use them in their builds – watch this space.

Freebies : Football textures

This was a prop I made for the Conrad build but unlike most of the other things I’ve made it’s just textures that can be applied to a standard SL spherical prim.

Football1_001

When applied to a sphere prim you’ll need to rotate the textures 90 degrees in the texture panel. For some reason SL places the pole at the side of the texture.

The basic textures are the diffuse and normals:

Football diffuse

Football diffuse

Football Normals

Football Normals

I’m also going to include the ambient occlusion layer and the pattern blocking texture so you can mix up your own textures yourself:

Ambient occlusion

Ambient occlusion

Pattern blocking

Pattern blocking

Feel free to use these textures for whatever you like so long as you include a link back to this blog with anything you distribute.

USCSS Conrad 10 : The lower decks

The build for the upper deck of the Conrad is mostly done now – I’m letting it sit for a time while I work on how the story will flow through it. I’ve reconfigured it a little and I’ve had to abandon some areas due to land impact issues – when I’ve finished the build I may come back and fill in what I’ve left out if there’s any room.

For the building work I’ve moved on to the lower deck. The lighting effects are going to be stronger and more animated down there – the upper deck should introduce the players to the way the Conrad uses light without overwhelming them; the lower deck turns it up to eleven.

I’ve been working on various props and effects and some fairly cool looking sets are beginning to come together.

One of the things I definitely wanted to have was dangling chains for the industrial-looking parts of the build. This presented a couple of challenges.

Chains are hideously complex shapes that just eat polygons like mad. Even games like Skyrim resort to using a pre-rendered texture on a single flat poly in places. With a bit of poly-bashing in Lightwave I managed to come up with a satisfactory looking chain that will give me about 120 links for an LI of only two – I’m still fiddling with this and may be able to get it down further with a little luck. In any case it’s enough right now to give me a 10m chain that looks heavy without being too oversized.

The second problem was that the chains need to move. Just hanging still really did nothing for the scene. I fiddled with scripts for quite a while and eventually ended up with a system that used llSetKeyframedMotion to add a gentle swaying to them. Several copies of this, moved to slightly different levels and angles, produced a really nice little cluster of subtle motion.

Prior to tackling the Conrad I’d never used llSetKeyframedMotion before so it’s been a little bit of a learning curve but it’s turning out to be a fantastically useful tool.

Conrad Lower Decks

In the picture above you can see the chains in place in a roughed-out industrial build. What I can’t show you on this blog is the animated lighting in that set (well, not until I get a proper vidcap solution sorted out, but that’s way down my list of priorities at the moment – you’ll just have to wait and see it in-world!). I’ve gone with the old cliche of having light shining into the scene through a ventilation duct with a fan in it. I’ve never understood why anyone would mount a light above a fan like that but I can’t argue with the atmospheric effect it produces.

It took some experimenting to get this effect to look right, though. The obvious solution, and my first attempt at it, was to have a simple light projector shining down from above a mesh fan. This sort of worked but the SL rendering engine is picky about what shadows it renders – if the shadow-casting object is too far away it gets culled from the shadow mapping and all the effects disappear. With the fans mounted on a high ceiling the effect of their shadows rarely made it to the ground.

What I eventually ended up with was a (fairly crude) mesh fan that projected its own shadow map into the scene.

Mesh objects can act as projector lights as well as prims. They will project light along what Lightwave labels as the +Z axis and Blender labels as the +Y axis. This makes it fairly easy to construct a mesh fan that will be able to project a light from its face and a projection texture that will reflect the effect of a light shining from behind the fan.

FanBlades2

Projection texture for the fan

SL is much more reliable when dealing with light projectors – there’s no awkward culling; they project their light over their configured range reliably.

Add this to a small mesh duct that places a poly behind the fan that I can assign a white fullbright texture to with a little glow and you get a convincing effect of light shining into the scene through a fan.

Each fan has a small script that uses llTargetOmega to set them spinning – the projected light spins with the prim that’s projecting it – and the effect is complete.

This technique adds reliable dynamic lighting to a 14m high room – no problems with shadow culling. The effect seen in-world is great, especially when interacting with normal- and specular-mapped objects.

I’d like to add some volumetric lighting effects to this as well but I’m still working on that and I suspect that I won’t be able to make it work effectively in any case. Still, I’m happy enough with what I have so far 🙂