The 60 Minute Cave part II…

•March 8, 2018 • 5 Comments

Quick post – some time ago I made a post on here about making a simple cave in 3DSMax in an hour over lunch. This evening I did something similar! I’ve been playing with Artomatix, as per my last post and I was pleased with the results of an experiment tonight and thought I’d post the results here. I had a partial scan that hadn’t resolved well  it was wet rock on a very sunny day so large areas of detail were missed or were blurry. I baked out what I had in 3DSMAX, diffuse, normals, AO, height and a shadow map used to help with manual de-lighting in Photoshop. I ran these textures through Artomatix for seam removal and it tiled them quite nicely. After some tweaking, I applied the material to a sphere in Toolbag 3 and tested out some lighting environments, before applying the same material to the inside of a curved cylinder and tiling appropriately, to make the cavernous environment you see below. Not bad for a single material!

 

Advertisements

Seamless Materials from 3D Scans in Artomatix…

•March 2, 2018 • 6 Comments

I’m starting this blog post on Thursday 1st March 2018, the evening when “Storm Emma” and “The Beast from the East” clash over Ireland causing blizzard like conditions and Wintry landscapes not seen in this country since 1982. Public transport is suspended, many people are off or working from home, and the public have been advised to stay indoors until the Red Weather Alert lifts some time Friday evening.

With all this time indoors I’ve had some time to process scans and create materials, and put Artomatix through it’s paces. Based here in Dublin, the Artomatix app is currently in an alpha state, but already functional and promises to automate “the most time consuming, repetitive tasks creating time for artists to focus on what really matters,” – music to my ears. It’s not procedural, like Substance Designer, but uses a different approach, example-based creation. I’ve run a few scans through the software already, mainly for “texture mutation” which creates variations of a texture or multiple textures simultaneously as part of a material, and also for seam removal, making textures tile. These automatic processes can be controlled somewhat by moving jitter sliders and painting ignore masks, handy for removing blurry areas or scan artifacts. This could be really useful for making partial or unsuccessful scans usable as world textures.

The first of this series of materials from scans was some earthen rubble (blogged about previously here ) in a wheelbarrow I shot on my phone one afternoon. The scan itself worked quite well in places but needed a lot of filling in, and of course parts of the wheelbarrow removed. This would usually have to be done manually in Photoshop or Substance Painter. I imported the textures into Artomatix as a material and connected up Texture mutation and Seam Removal nodes and after a few minutes of communicating with the cloud, my textures were ready to preview. Here’s what Artomatix looks like right now, it’s still in alpha so this is likely to change, albedo input on the left, 3D preview on the right and node graph beneath:

artomatix

 

Here are the input textures, and their Artomatix seamless versions:

 

AlbedoBarrowRubble_albedo

 

NormalsBarrowRubble_normal

 

AOBarrowRubble_AO

 

Height (not apples to apples, as I used Knald in the end to generate height from normals)BarrowRubble_height

 

Here is the result, rendered in Toolbag 3

 

 

 

Another variation, same inputs

 

Finally, in realtime on Sketchfab, this one is tiled less than the Toolbag versions:

 

 

PS: Unrelated, but I couldn’t let this frozen weather pass without trying a bit of photogrammetry 😀 Quickly rendered in Toolbag 3 with some SSS for the snow.

screenshot052

screenshot051

 

 

 

Charred For Life…

•February 20, 2018 • Leave a Comment

This charred wood material is based off a burnt damp log I found in the garden, it had been partly used as fuel in a chiminea last summer. It was charred and ashen on one side, the side that was facing the ground, so it had some mud and bugs stuck on and looked great in the light of day – there was an almost iridescent effect on some surfaces of the flatter areas of the burnt “cells”. I tried to recreate it by firstly scanning the burnt end, no fancy setup, just my phone (a Samsung Galaxy S8) and an overcast day. I took about 80 photos and processed in Reality Capture, as usual. I baked down textures in 3dsmax, using Photoshop to clean up and Substance Painter to clone out missing detail. I layered in a hint of rainbow gradients in the albedo and painted a custom metalness map to help simulate the iridescent sheen on reflections. AO and cavity maps were created in Knald, which were useful in roughness and emissive textures later. The material is rendered below in real-time in Marmoset Toolbag 3 on the stock UV sphere.

To achieve the glowing embers look below, I inverted the ambient occlusion map and used it as emissive, tinting it ornage in the Toolbag shader. Some local bloom and post FX finished off the effect.

Texture breakdown below.

His Bark Materials…

•January 30, 2018 • 2 Comments

This year I’m going to try and blog every month. I was doing well for a while but got busier last year and didn’t get to it as often. So, here’s the first post of 2018, some material work. Specifically, phone captured scans of real world tree bark, conformed to be seamless, tileable and usable arbitrarily on game world models. There is some amazing material work being done in Substance Designer these days, and I’d like to incorporate that into my workflow at some point. The bark material below is a proof of concept, a number of 2k textures extracted from a 16k source image and a 20 million polygon model. These were derived from photos taken on my phone and processed in Reality Capture. Textures were baked in Toolbag 3, apart from the albedo which was baked in 3DSMax.  Here is the high poly model, the bark was splintered and raised away in places and it captured well for the most part. There is a lot of potential in this capture and I think a really good use case to give Artomatix a proper try.

petemcnally_3Dscan_treebark02

Here is a breakdown of the textures, eyeballed for metalness PBR:

Here is the result when applied to a sphere in Toolbag 3

petemcnally_barkmaterialtest

Digital Human Experiments…

•November 23, 2017 • 10 Comments

Took me a while to get this update together! This time, I’d like to share an experiment in single camera photogrammetry. I was very inspired by some of James Busby’s recent work on Sketchfab, so much so that I went back to try scanning with another human subject. My Dad dropped by the house one evening and I asked him to sit for me outside, just as the light was fading. I was fairly sure the effort would be wasted due to the failing light, but photogrammetry has surprised me before, so I carried on. I shot about 45 photos in raw, handheld on my phone, a Samsung Galaxy S8. From there, I processed the raw files in a free version of DxO, removing vignetting, chromatic aberration, shadows and highlights where possible, but keeping distortion. Here is the mesh output on normal detail in Reality Capture.

Results out of the box showed some promise. Overall form and volume were there with some detailed areas around the eyes quite well defined. Lots of noise too though, a chunk missing under the chin and nothing at all from the ears back. All in, there was a count of about 45 million triangles.  Generating the albedo texture helped the visuals a lot (see below) but I knew there’d still be cleanup in Mudbox, which has good hole patching for geometry. The relax, smooth and scrape brushes also work well for reducing noise in rough areas.
I used Instant Meshes to retopologise the high poly mesh, it can be a very handy tool to put out an all quad mesh to work with in real-time, here’s how the model looked, I also replaced the eyes with proper spherical eyeballs.
I laid out UVs on the low poly mesh in 3DSmax and baked albedo, thickness and normal maps from there, over then to Knald to generate high frequency detail normals, AO and cavity maps. Substance Painter and Photoshop were used to paint out shadows and highlights and fill in gaps in the textures, and hand paint specular and glossiness maps, to control which parts of the skin would look oily. I used Marmoset Toolbag 3 for look development, check out some of the textures below.
I still needed something to cover the large hole in the back of the mesh, I scanned a fur lined hat and tried to make it fit the head but I wasn’t happy with the results, I had to deform it too much to make it fit (image rendered in Toolbag 3)
I also tried a metal morion helmet I had already made, but it wasn’t great either and hid too much of the model underneath (image rendered in Toolbag 3)
So I ended up modelling a tight fitting wooly hat over the top of the head and textured it traditionally, and I was a lot happier with this. Here is the head model screen grabbed from Sketchfab:
Another (Sketchfab) image including the hat:
And finally the model in real-time, you can orbit by left-clicking and dragging or move the lights by holding alt and left-clicking and dragging. There is a very simple eye movement animation and a roll of the jaw, I’d love to try some more with facial rigging after this but it’s an area I know very little about. Lots learned from this one!

Bonus: Blooper with displacement on the wooly hat 🙂
SmartSelectGIF_2017-11-22-23-06-36

It’s been ages!…

•November 17, 2017 • 4 Comments

Just looked and saw that I haven’t posted since July! That’ll be remedied soon as I’ve been working away in the background on some interesting pieces, here’s a taster, screenshots from Sketchfab where it will be published soon.

 

 

Afternoon De-Lighting…

•July 26, 2017 • 5 Comments

If you’re interested in 3D scanning technology or game art you will likely have heard about the experimental Unity De-Lighting tool recently released, you can find it here. 

“De-lighting” is the process of removing light and shadows from the diffuse texture map created during photogrammetry. This hasn’t been a huge issue in my previous scan work, mainly due to the weather in Ireland where it’s usually cloudy if not raining, which is ideal for outdoor scanning. A few weeks back I was lucky enough to be at the beach on a day that had 15 hours of sunshine, which was awesome for the farmer’s tan, but problematic for some of the scanning I’d planned on doing due to the harshness of the sunlight and heavy shadowing. I’d heard the Unity tool had been released so I figured I’d press on anyway and try it out. I captured about 120 photos of this sea stack, handheld with my DSLR.

seastack

Some of the potential problems are evident above – darkness in the shadowed areas, lens flare from the sun and the contrast between the brightly lit areas on the reverse side and the darker shadowing. Reality Capture breezed through the solve, even on my laptop and created a really nice mesh with just a few problem areas at the top where visibility was reduced. Here are the results, with the mesh decimated to 16 million tris and the texture baked at 16k.

petemcnally_highpoly_stack_3dscan

You can see the shadow baked into the stack and falling across the beach rocks and pebble surrounding it, a good test case for the Unity De-Lighter. I downloaded the latest version of Unity and the De-Lighter package and read up on the requirements. The De-Lighter requires at least the base albedo texture, an object space normals map, a bent normals map and an ambient occlusion map, with optional an optional position map and mask. I wouldn’t usually bake an OS normals map (or bent normals) so I wanted a solution where I could bake as many of the required maps out in one pass as possible, so I settled on XNormal. I decimated the stack model from 16 million tris to 10k and baked the textures at 4k. Here is the output from the bake (the red areas on the albedo are missed hits).

bentnormals]#

Not much difference in this case between the OS normals and bent normals map, it’s quite possible I did something wrong here but it didn’t seem to hurt the end result much. It was easy to add the textures to the Unity De-Lighter and very quick to compute the light cancellation.

delighter

You can scrub back and forth between the original and the light cancelled version.

If there are areas where artifacts occur, you can paint up a mask for those areas and compute again. I’m impressed that it worked so well out of the box with textures that weren’t perfect. I did paint a mask for some of the areas that looked off or where there were obvious repeating detail issues, but this was super quick to do. Later, I fixed up the areas with the missed hits in Substance Painter and adjusted the albedo for PBR and painting a roughness map for wetness on the lower stack. Next I took it into Marmoset Toolbag 3 for testing. Here is the low poly model without textures, I deliberately pushed the decimation further on the higher, out of reach areas:

petemcnally_stack_06

Here are the results in Toolbag 3, I added some beach grass billboards and a detail normal map, click through for 4k stills:

petemcnally_stack_02

petemcnally_stack_03

petemcnally_stack_04

Here is the scene in real-time in Sketchfab, be sure to go full screen and let the HD textures load 🙂