Steve Z Profile picture
Aug 7 14 tweets 8 min read
Got some LINEWORK comments on my Lantern post
So here's a thread on Linework process & my learnings from this project:

1/12
Linework is a topic Tech-Artists think a lot about—It’s partly why I started this project: ImageImage
2/13
Like w/ any Realtime Shading Feature, the best solutions balance Fidelity, Workflow, & Performance.

The general problem with linework in games comes down to Texture res vs. Memory, and Compression-artifacts/Pixelation—especially if players can get really close to objects.
3/13
Increasing texture-res for each asset, even with optimal UVs, just doesn’t move the needle enough to be practical. It would also have major fidelity issues on low-spec hardware, mobile, etc. So just drawing the lines was a no-go:

ex: Look at them gnarly pixels😱 Image
4/13
I started by exploring #Blender3d's #Greasepencil since it's changing the game rn—but couldn’t find a good process for batch processing & exporting the lines to an engine like #UnrealEngine or #unity3d

The results I got trying to convert it to Geo were dense & not v good😕 ImageImageImage
5/13
Blender’s GP line rendering does more than just rasterize geo, so even if I had good line meshes in-engine, they still wouldn’t be drawn “right.”😥

I'd also have to deal w/ issues like float precision z-fighting & aliasing w/ distance.

So if GP ain't it, what’s next? Image
6/13
I was reminded of an old experiment where I used a Curvature Map to transfer sculpted features to texture in a (mostly) traditional high- to low-poly baking process:

…the issue was skyrocketing texture memory (see the 2nd tweet in this thread😅) Image
7/12
And font rendering uses Distance Fields to interpolate high-res, pixel-free shapes from low-res textures (ex: Unity’s TextMeshPro).

Valve’s whitepaper on SDFs: steamcdn-a.akamaihd.net/apps/valve/200…

So, interpolating crisp lines from a Distance Field texture seems like a solution, BUT…
8/13
…Baking SDFs adds a workflow-tax, meaning extra friction & points of failure in the process.

Bleh…

Ideally artists could just draw lines in Substance, then export them as SDFs automagically, but AFAIK Substance Painter doesn’t do that

…or does it?👀👀👀
9/13
…it doesn’t😅

But in my experience, you don’t really need to. @Substance3D 's ✨Bevel✨ filter works in a pinch & solves the workflow speed bump!
Is it an accurate DistanceField texture? Probs not.
Is it good enough in most cases? Yup.

This works great for solid lines! ImageImageImage
Ignore my garbo UVing on this, y'all ><;
I was testing worst-case UVing & it was a quick prototype haha
10/13
As a rule of thumb, Distance Field textures should be quite small (resolution) & need to be very high quality (uncompressed).
Even moving from “Uncompressed” to “high quality compression” has a big negative impact.

So here are the Texture settings I use: Image
11/13
That DF foundation allowed for a LOT of room for fun stylization & animated effects.

Here's a "water-drop on ink" look I stumbled into✨
Didn't have a use for it, but I'm def saving it for later

...Reminds me of those tear-stained letters in YA novels😭🌹💌 ImageImage
12/13
Together, these interpolated DF lines allow my low-res texture (256x for the Lantern!) to hold up at extremely close range!

And b/c the lines are interpolated in real-time, I added fun extras like variable line-weight & an animated frame-boil effect✨
#UnrealEngine #shader
While the line-quality doesn't quite match @Marcel_Hampel's original style, I'm happy w/ this process & can imagine a ways to improve it further. Those are for future projects tho~✨

Next deep-dive will be Foliage🍂


Thanks for reading—I hope it's useful!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Steve Z

Steve Z Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(