GSoC 2019 LANPR Updates Here!

Updated weekly report here! https://wiki.blender.org/wiki/User:Yiming/GSoC2019/Week11

2 Likes

Hi, and a single question, when will it be included in the master?

I’m quite positive this will be in 2.81. Now we are going through code reviewing process. Should take some time but there’s no significant issues.

6 Likes

I’ve run across some issues in the latest Graphical build. (blender-2.81.0-git.b535223b2913-windows64 built on 2019-08-11)

In CPU mode lines vary in thickness, often slightly tapering. These thickness/taper changes seem to be based on an edge’s angle, or perhaps position, relative to the camera’s view plane.

This issue can be eliminated by turning off Options>Chained Lines. But should this be happening when chaining taper strength is set to zero? And if this isn’t a bug, I really don’t understand how lines changing thickness based on angle to camera would be useful; it seems like it would often lead to flickering in an animation.

There are also Line Style issues with GPU mode.

  • The same line settings in GPU and CPU yield radically different results.

  • The Main Thickness field has no effect in GPU mode.

  • Contour thickness doesn’t maintain a constant thickness. You’ll probably need to turn off ‘Same Style’ and increase the Contour>Thickness value to see this due to the previously noted Main Thickness issue

  • When ‘Same Style’ is set to off the Intersection Thickness multiplier has no effect

When generating grease Pencil strokes LANPR marked edges are ignored when Mark is enabled.

Thanks for the report! Will look into it.

I don’t understand what you have done with Feature Line modifier.
I said that I would like to be able to define several linestyles per collection like what adding several Feature Line modifiers to an object was providing.
Then, you created a Feature Line tab that removed this ability.
Adding several Feature Line modifiers to one object is useless, now.
Per object or per collection, we can only have one linestyle, now.
So, actually, If user wants one linestyle for contour of an object and another one for crease of same object; he is now, forced to create 2 collections containing same object.

I thought that you will change behavior of those tabs. But you are preparing review for a merge into master ?!!

I think that things could be more simpler.
Instead of a panel into collection and feature line tab defining linestyle and referring to only one layer or on material of a Grease Pencil object.
This panel could refer to a LANPR object.

This object type would not be exactly as a Grease Pencil Object.
It would differ from a Grease Pencil object like a Text Object differs from a Curve Object.
It would be same thing for render engine, offers same modifiers, support same materials but its Object Data tab would be different.
It would be under this tab that user would define a linestyle per layer and a material per layer.
Then, customization would happen from GPmodifiers that are able to be specific to a layer.
This object would not support an Edit, Sculpt or Draw mode.
To modify lines that way, user would have to convert it to Grease Pencil Object.

I think, from a user point of view, that would be more powerful, easy to understand.
Collection and Feature Line tabs would not be require anymore. Collection panel would be made of one setting inside View Layer tab. Feature Line modifier could directly redirect to LANPR object.

Hi,
currently there are errors compiling soc-2019-npr.
What is the right branch to checkout - soc-2019-npr or temp-lanpr-staging?

I’d recommend temp-lanpr-staging. But the UI is now more broken xD

Hi, The UI is again being modified… and the temp branch is only maintained with LANPR’s computation functions. There will probably be some more changes. I’d recommend that you use the version from several days back when soc-2019-lanpr branch is stable to you.

It’s troublesome at the moment for me as well…

Your whole idea is very thoughtful, let me talk with the developers about this :slight_smile:

About multiple styles, “multiple targets for different line types” will be supported but yet broken… I’m fixing other internal parts :sneezing_face:

I’m really pleased your GSOC was successful, is being incorporated into the main branch and I am sure it will be a worthy successor to Freestyle. Congratulations! Excited for 2.81! Hoping Blender NPR will gain traction, with Grease Pencil and LANPR. Perhaps cell/painting style shaders for Cycles for next GSOC?

I’ll probably not participating GSoC but still manage this project afterwards.

Thank you for your contribution of time and skills to Blender. It is greatly appreciated!

Thanks.

Unfortunately, I could not do much with soc-2019-npr from Aug 11, so I was trying to get a more recent one, but I see that heavy work is ongoing, so it seems like I have to postpone this for the moment.

I guess you already know, but perhaps something from my findings is useful to you:

  • no update from camera movement despite update button or auto-update in cpu mode (color/lineThickness work with manual update only)
  • only black outlines when instancing a collection in gpu mode, only works in cpu mode (was this meant by “CPU can compute complex occlusion information and intersection lines.”?). Emitter plane seems to be rendered above instead of below objects.
  • gpu line color does only update manually (auto-update not working), line thickness without effect
  • grease pencil mode not working (no strokes/points added to gpencil object)
  • crash, backtrace:
# Blender 2.81 (sub 1), Commit date: 2019-08-11 03:07, Hash b535223b2913
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.context.object.modifiers["Mirror"].show_expanded = False  # Property
bpy.context.object.modifiers["Skin"].show_expanded = False  # Property
bpy.context.object.modifiers["Subdivision"].show_expanded = False  # Property
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.scene.render.engine = 'BLENDER_LANPR'  # Property
bpy.context.scene.color = (0.8, 0, 0.000465187)  # Property
bpy.context.scene.color = (0.8, 0, 0.000465187)  # Property
bpy.context.scene.auto_update = True  # Property
bpy.context.scene.auto_update = False  # Property
bpy.context.scene.thickness = 3.593  # Property
bpy.context.scene.master_mode = 'DPIX'  # Property
bpy.context.scene.auto_update = True  # Property
bpy.context.scene.auto_update = False  # Property
bpy.context.space_data.context = 'MATERIAL'  # Property
Unable to remove material slot in edit mode  # Error
bpy.ops.object.editmode_toggle()  # Operator
bpy.ops.object.material_slot_remove()  # Operator
bpy.data.screens["Layout"].shading.type = 'MATERIAL'  # Property
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.scene.thickness = 1.539  # Property
bpy.context.scene.color = (1, 0, 0.000513264)  # Property
bpy.context.scene.color = (1, 0.916345, 0.978686)  # Property
bpy.context.scene.color = (1, 1, 1)  # Property

# backtrace
./blender(BLI_system_backtrace+0x33) [0x564fbcbdc223]
./blender(+0xc86e60) [0x564fbc9b2e60]
/lib/x86_64-linux-gnu/libc.so.6(+0x43f60) [0x7f3a34108f60]
./blender(GPU_batch_discard+0x17) [0x564fbe6b7d77]
./blender(ED_lanpr_rebuild_all_command+0xdf) [0x564fbd0951ff]
./blender(+0x2746c5c) [0x564fbe472c5c]
./blender(+0x108b7ea) [0x564fbcdb77ea]
./blender(+0x108bd48) [0x564fbcdb7d48]
./blender(WM_operator_name_call_ptr+0x1a) [0x564fbcdb814a]
./blender(+0x1422a1e) [0x564fbd14ea1e]
./blender(+0x14312e9) [0x564fbd15d2e9]
./blender(+0x108e5d7) [0x564fbcdba5d7]
./blender(+0x109058c) [0x564fbcdbc58c]
./blender(wm_event_do_handlers+0x4d0) [0x564fbcdbcdd0]
./blender(WM_main+0x20) [0x564fbcdb2900]
./blender(main+0x323) [0x564fbc99bfd3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f3a340ebb6b]
./blender(_start+0x2a) [0x564fbc9af40a]

Btw:
If LANPR will replace Freestyle, will it be able to open old Freestyle files?

OK ! Thank you for this enlightenment.

I’ve finally gotten a chance to experiment with using the Grease Pencil using the Aug12 build. I’ve got a few issues:

  1. In both GP and CPU, Adjusting the Geometry or Image Chaining Threshold doesn’t seem to do anything. Are there other factors that would stop things from chaining? My GP is full of doubles and redundant segments.

  2. I can’t get Marked edges working with the GP lines.

  3. The GP thickness is still a big problem. If I use a thickness modifier with Normalize then the thickness becomes better, but then it seems that I can’t make other thickness changes, such as sculpting it?

  4. I’ve figured out how to taper lines a bit in CPU mode using the chaining settings, but it doesn’t work that well due to how many broken up segments I have. I don’t see a way to taper lines in GP other than manually with sculpting the thickness (which does’t work due to 3). Is there some modifier or effect that will work that way?

Thank you again for your work on this!

Hi everyone!

I’ve been away for preparing some tests. Now the stuff is over I can finally get back to LANPR! :smiley:

I’m going though the list and see what’s left over and strengthen every parts of it.

Be aware that LANPR could be separated into some two or three parts for the ease of code review. So current branch compilation could result in some incomplete functionalities.

Thanks every one for the patience!

12 Likes

Would it be possiblee to get a 2.81 LANPR build at some point?

Hey, Great add-on really loving the workflow so far. I do have an issue. I’m having trouble understanding how LANPR recognizes layers. Some models just don’t receive outline. This is based on stack levels I see but I’m trying to get line work on every model. Any help would be appreciated.

again kudos on the software

Hi everyone!

It’s been a messy review process, and I’ve be absent for a while. Here is the current state of LANPR:

  • Previously suggested fixes from d.b.o are fixed.
  • Crappy freestyle changes are undone till future.
  • There’s one main problem that’s holding LANPR back, that is the auto update running in background will trigger some problems, probably related to Blender’s internal mechanism. After this is fixed, there will no big thing remaining.

My estimations would be probably one week for remaining fixes if there’s no big problems showing up. the patch is now cleaned up without too many support code around it. Patch link is still this one https://developer.blender.org/D5442

I’ll continue cooperate with the developers to fix code problems and try to merge it with master.

19 Likes

I am hoping that the ‘silence’ on the NPR realm, indicates that all parties are working for a successful completion of the LANPR line drawing addition to Blender 2.82. Freestyle is still fine, but stalls on any more complicated scenes, particularly on any particles, (leaves, grass, hair, etc.) I have 32 GB or RAM on my work station, and Freestyle doesn’t seem to use enough of it as needed, just crashes. The only build on GraphicsAll.org for LANPR is back from Aug?? and I haven’t seen much discussion, as the latest Blender Conference is ready to start?? Still want Line Rendering, with particles, that doesn’t crash, and includes some of the artistic controls that Freestyle brings. I continue to be hopeful.

1 Like