Can GP LineArt generate lines of absolute thickness? (independent of distance)

Hi all, pretty new to toon stuff, I am trying to make a GP object generate lines that appear the same size in screen space (using the LineArt modifier). I’d like them to become thicker the farther they are from the camera, as if they were actually drawn on screen.

I replicated the famous “solidify” outline trick to account for that in geometry nodes, it was pretty easy but so far it seems impossible to do with LineArt. Am I missing something ?

Thanks for any help,

Hadrien

Sure thing, look for screen space vs world space line thickness or size. Not at my pc right now but those terms should give you the answer you need.

1 Like

Hi, thanks for the suggestion, to be honest I can’t find those. There are similar settings in Freestyle but I’m using GP. Not a definitive choice by any means, I’m just trying to avoid the huge computation overhead that comes with Freestyle… and so far GP LineArt seems promising in that regard.

I did find a way to adjust thickness over distance : using the GP “thickness” modifier, along with a “vertex weight proximity” modifier set to distance from camera. But ! It won’t let me remap the values to something useful… so the lines appear extremely thin. Not sure how to work around that.

Ok, I think I got it. It’s just extremely unwieldy. Having used geonodes for so many months I forgot how clunky the modifier system was. Fiddling with distance mapping properties and stacking two “thickness” modifier -one absolute, the other weighted to a distance vertex group- got me there.

Here it is with LineArt

And with geonodes

The shape is preserved better with geonodes… let’s see if it scales well with actual scenes.

Hopped on my macbook to find it.

This not what you needed?

2 Likes

Hell, you’re right. I wasn’t looking in the right place ! Thanks a lot.

I’ve been trying to figure out how to do this with geonodes.
How did you do it? Help would be really appreciaterd! :slight_smile:

Find the distance from the camera, remap it (greater the distance, bigger the value) and feed it into the strength of your displacement. You can then multiply it with some noise

1 Like

Would this work with orthographic scale?

Orthographic cameras ? I’m not sure how that makes sense, since by definition objects farther away don’t appear smaller with those

I made something similar to a solidify modifier with geometry nodes to get an outline for objects.

But I want to add a feature that when an ortographic cameras “ortographic scale” is changed the outline stays the same thickness. You can achieve something similar with the Grease pencils Line Art modifier when you change the World space to Screen space. But I just can’t use that in this project.

(I’m a complete beginner when it comes to geo nodes)

what I’ve got so far. Have no clue what to do next.

Ah, right ! I tried using the camera transform (object info node, transform output), but it looks like the ortho scale is not taken into account here. It’s just the object transform. So I used the ortho scale as a driver to multiply the thickness, it works but since it relies on a driver it’s not self-contained and you won’t be able to link the setup into other files. Right click on ortho scale, copy as driver, then create a value node, right-click on the value, paste driver, and multiply

I’m 100% sure I didn’t set it up right. because it doesn’t work :smiley: I’m sorry
What did I do wrong?

When I change the ortho scale from the camera it doesn’t update the value node…

What is this 4.668 coming from then ? is it not your camera’s ortho scale?

Open your drivers editor and make sure you targeted the correct property, or recreate the driver

When I copy the driver it adds the value that the ortho scale had. But when I change the ortho scale through the camera the value node doesn’t update.

Driver property:

I’m not sure why but this driver takes in the X location of Cube.001, it is unrelated to the camera ortho scale.

Change the type of variable to “single property”, the ID type to “camera”, finally right-click on ortho scale, “copy data path”, then paste it in the “path” field

2 Likes

It does scale finally! But it’s not perfect.

If I take a screenshot and compare the lines you can see the difference.

Compare what and what ? I don’t know what I am looking at

1 Like

It’s a rotated cube with the geonode applied. You can see the outline.

The one on the left is a render of the object with ortho scale set to 40 and the right is a render of the object with ortho scale set to 5:

And this is an image of the two renders overlapped where I lowered the opacity of the top image to compare the line weights:

It does scale. But it’s not completely precise.