SamuKata
colortwist
colortwist

patreon


Swimsuit shader refresh, part 1/3

After I recently stalled out on the strap rigging, I figured it might be fun (well, as fun as this stuff can be) to try and change gears and work on something else for a while. One of those things happens to be a new character, but in a typical yak shaving fashion, I landed up going back and cleaning up some of the swimsuit stuff and redoing a bunch of shaders first.

One of the things that's been annoying me recently was the lack of textured swimsuit edges. For some reason, I always wanted subtle edges on the swimsuit models so that they didn't look like a totally flat mesh wrapped around the character. For some other reason, I never actually got around to doing anything with those. I modelled them, I partially unwrapped them, and then I promptly forgot about them. It wasn't until I started working on a set of new shaders for the new character that I kinda went "oh hey, I should probably do something about that".

Unfortunately, the new character swimsuit design called for some deviously simple features, which actually took a fair amount of time to implement. Most notably, I wanted something based off the Speedo Quantum Splice design (so sue me, I'm a sucker for simple designs that accentuate the curves), but swimsuits like that tend to have coloured edges along the cutouts- probably because it's all the same chunk of fabric, and the edges are just created by folding that fabric over and sewing it down. While it might be possible to model up something like that in 3D, I landed up going for a more straightforward approach and just modelling the edges as separate geometry.

This worked out reasonably well enough for the rigging, but it started to pose a bit of a problem with the texturing since I knew the edges of my swimsuits would have to have a different material from the rest of the suit. This more or less has to do with the way I setup the procedural weave patterns that drive the cloth shaders, and how I assumed that the areas of the swimsuit covering the largest amount of surface area (read: around the chest) would need a more ruggedized weave pattern in order to look good at a "stretched out" size. Applying two different shaders to two different chunks of geometry isn't anything particularly special. What is slightly more difficult is figuring out a way to synchronize the color of the edges with the underlying fabric surface that makes up the majority of the swimsuit, without having to try and replicate those colours by using something like a linear gradient ramp with a dozen or so knots spread across it.

Thankfully, the rendering engine I use has a little known feature that lets you combine multiple UV maps within a single shader node graph. If you enjoy lots and lots of pain, as I apparently do, then it's possible to create a second set of UVs for the edges and lay them out in such a way that they carefully mirror the borders of the UVs that make up the rest of the swimsuit. This has the wonderful side effect of allowing the shader graph to evaluate the overall edge colours against a totally different texture (in this case, that's the texture driving the color of the swimsuit surface), and have it inherit those colours so that the edges remain in visual lockstep with the rest of the suit.

These renders are the end result. I also landed up back porting most of these changes to the old Sequin suit, so it got some upgrades as well. Likewise, I've been experimenting with another method for adding pre-rendered stitching to various surfaces, which seems to work OK-ish for the time being (though I'm really starting to feel the walls closing in with CINEMA 4D these days). So I guess there's that, too.

Swimsuit shader refresh, part 1/3

Comments

I am all in on the quantum splice

Dan

What can I say, I like 'em big >,>

Love the sheer dimensions of the suits for your designs.

Seritaph


More Creators