GSoC 2019 LANPR Updates Here!

Very exciting developement!!! Can’t wait to test this this weekend.

1 Like

How complex is it to make it work similar to Freestyle where it’s simply a checkbox and is then composited automatically? I assume it’s not that simple to implement.

1 Like

Week 3 update is here!
https://wiki.blender.org/wiki/User:Yiming/GSoC2019/Week3

Peek%202019-06-12%2021-27

11 Likes

Are there any builds with all the latest features?

It would be great to try it! Actually not just try, but to use it.

On graphicall, there’s a custom windows build by some very kind user :smiley:

4 Likes

What would be the steps to get to this result? I’m using the 2019-06-14 LANPR build from Graphicall. I go to the Render tab, switch Render Engine to LANPR. Then I go to the Scene tab and if I tweak some values and setting in the LANPR section, sometimes suddenly some lines appear in the LookDev mode, but it’s not very predictable for me. I’d appreciate a quick guide. :slight_smile: thanks! And keep up the good work!

Oh actually, the rendering process is soon to have a big change. After that it should be more intuitive and very easy to reproduce. I’ll update the info when it’s ready.

4 Likes

Here’s the late update of this week.
https://wiki.blender.org/wiki/User:Yiming/GSoC2019/Week4

I managed to get the object->gp selection working today. Here’s a preview image of it

Some image-space reduction problems are still there, but I’m getting close.
Next week will mainly implement automatic stroke generation.

7 Likes

The reduction in 3D space looks like this. Should add a switch to change which algorithm to use depending on what kinds of models are in the scene.

2 Likes

Im not able to make it work.
On my side I get only 2 frames out of the animation(600+ frames)
Changing Update types or manually updating does not change the absence of results.
My object has an armature,don’t know if it can impact things.
The Older LanprGP builds would work and give all the lines for all the frames
I just needed to go back and forth a frame to get an accurate update.

Crashing on macOS here with my build and the one on Graphicall (Wouter) from Sunday. Happens when going from Solid to Rendered with LANPR enabled.

blender.crash.txt

# Blender 2.80 (sub 74), Commit date: 2019-06-23 10:01, Hash c2e7ef36d95c
bpy.ops.mesh.primitive_uv_sphere_add(radius=1, enter_editmode=False, location=(0.999888, -0.112579, 0.762627))  # Operator
bpy.context.space_data.context = 'SCENE'  # Property
bpy.context.space_data.context = 'VIEW_LAYER'  # Property
bpy.context.space_data.context = 'OUTPUT'  # Property
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.scene.render.engine = 'BLENDER_LANPR'  # Property
bpy.context.scene.enabled = True  # Property
bpy.context.scene.auto_update = True  # Property
bpy.context.scene.auto_update = False  # Property
bpy.context.scene.thickness = 4  # Property
bpy.context.scene.qi_begin = 0  # Property
bpy.context.scene.qi_begin = 1  # Property
bpy.context.scene.enable_contour = True  # Property
bpy.context.scene.normal_mode = 'DIRECTIONAL'  # Property
bpy.context.scene.normal_control_object = bpy.data.objects["Sphere"]  # Property
bpy.context.scene.enable_edge_mark = True  # Property
bpy.context.scene.enable_crease = True  # Property
bpy.context.scene.enable_material_seperate = True  # Property
bpy.context.scene.enable_intersection = True  # Property
bpy.context.scene.enable_chaining = False  # Property
bpy.context.scene.enable_chaining = True  # Property
bpy.context.scene.thickness = 0.0001  # Property
bpy.context.scene.thickness = 1  # Property

# backtrace
0   blender                             0x00000001087a8d07 BLI_system_backtrace + 55
1   blender                             0x00000001084dc819 sig_handle_crash + 361
2   libsystem_platform.dylib            0x00007fff510b0f5a _sigtramp + 26
3   ???                                 0x0000000000000005 0x0 + 5
4   blender                             0x000000010c2385b8 drw_shgroup_init + 40
5   blender                             0x000000010c23894a DRW_shgroup_create + 138
6   blender                             0x000000010c281cb7 lanpr_cache_init + 167
7   blender                             0x000000010c233aa9 drw_engines_cache_init + 169
8   blender                             0x000000010c232d2b DRW_draw_render_loop_ex + 555
9   blender                             0x000000010c529d1d view3d_main_region_draw + 125
10  blender                             0x000000010c5982e1 ED_region_do_draw + 353
11  blender                             0x00000001089d0b66 wm_draw_update + 1782
12  blender                             0x00000001089ce7f0 WM_main + 48
13  blender                             0x00000001084d9076 main + 934
14  libdyld.dylib                       0x00007fff50da2015 start + 1
15  ???                                 0x0000000000000002 0x0 + 2
# Blender 2.80 (sub 74), Commit date: 2019-06-26 13:50, Hash f0a225f52480
bpy.data.screens["Layout"].shading.type = 'RENDERED'  # Property
bpy.data.screens["Layout"].shading.type = 'SOLID'  # Property
bpy.data.screens["Layout"].shading.type = 'RENDERED'  # Property
bpy.data.screens["Layout"].shading.type = 'MATERIAL'  # Property
bpy.data.screens["Layout"].shading.type = 'SOLID'  # Property
bpy.context.space_data.context = 'MATERIAL'  # Property
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.context.space_data.context = 'OUTPUT'  # Property
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.scene.render.engine = 'BLENDER_LANPR'  # Property
bpy.context.scene.enabled = True  # Property

# backtrace
0   blender                             0x00000001028eeb27 BLI_system_backtrace + 55
1   blender                             0x000000010262257b sig_handle_crash + 363
2   libsystem_platform.dylib            0x00007fff510b0f5a _sigtramp + 26
3   ???                                 0x0000000000000010 0x0 + 16
4   blender                             0x0000000106384fee drw_shgroup_init + 46
5   blender                             0x0000000106385383 DRW_shgroup_create + 131
6   blender                             0x00000001063cea67 lanpr_cache_init + 167
7   blender                             0x0000000106380509 drw_engines_cache_init + 169
8   blender                             0x000000010637f79c DRW_draw_render_loop_ex + 540
9   blender                             0x00000001066770ad view3d_main_region_draw + 125
10  blender                             0x00000001066e50e1 ED_region_do_draw + 353
11  blender                             0x0000000102b18ea6 wm_draw_update + 1782
12  blender                             0x0000000102b16a80 WM_main + 48
13  blender                             0x000000010261edaf main + 927
14  libdyld.dylib                       0x00007fff50da2015 start + 1
15  ???                                 0x0000000000000001 0x0 + 1

The results are not automatically cached for now because there have been a change in modifier design. Should work before the end of this week.

1 Like

Hi, I don’t have an apple computer, looks like a LANPR internal bug, but could also be GL driver capability issues. There have been some changes in shaders recently. I’ll take a look. Thanks for reporting this

1 Like

Just to note I can build and change viewport rendering with latest master and sculpt mode features branch. I’m not using state of the art hardware on this machine (Xeon v4, Nvidia 710). Will try to build some older commits.

As for today’s progress, you are now able to do LANPR->GP animations with a “Bake” operation, it will generate GP strokes for all the frames between the start and end. You will need to specify object’s GP target or collection’s GP target in order for the strokes to appear. However, automatic updates on frame changes is not yet available.

%E5%9B%BE%E7%89%87

%E5%9B%BE%E7%89%87

“Bake” will hung up your UI until it’s done. so use smaller frame range to test how long it might take before you click the botton.

2 Likes

Same with these builds (many seemingly harmless warnings but no errors). Curious if anyone else has a working macOS build? @Wouter?
Let me know if I can share any files, if I should try to build it a particular way (flags or anything) or if you need to know something about my env. Will try it on Windows for now. :smile:

# Blender 2.80 (sub 74), Commit date: 2019-06-03 04:06, Hash bff6b5330f89
bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, location=(0.999888, -0.112579, 0.762627))  # Operator
bpy.context.space_data.context = 'MATERIAL'  # Property
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.context.space_data.context = 'VIEW_LAYER'  # Property
bpy.context.space_data.context = 'OUTPUT'  # Property
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.space_data.context = 'TOOL'  # Property
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.scene.render.engine = 'BLENDER_LANPR'  # Property
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.context.space_data.context = 'OBJECT'  # Property
bpy.context.space_data.context = 'WORLD'  # Property
bpy.context.space_data.context = 'SCENE'  # Property
bpy.context.space_data.context = 'VIEW_LAYER'  # Property
bpy.context.space_data.context = 'OUTPUT'  # Property
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.space_data.context = 'TOOL'  # Property
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.space_data.context = 'OUTPUT'  # Property
bpy.context.space_data.context = 'MATERIAL'  # Property
bpy.context.space_data.context = 'MATERIAL'  # Property
bpy.context.space_data.context = 'DATA'  # Property
bpy.context.space_data.context = 'PHYSICS'  # Property
bpy.context.space_data.context = 'CONSTRAINT'  # Property
bpy.context.space_data.context = 'DATA'  # Property
bpy.context.space_data.context = 'MATERIAL'  # Property
bpy.context.space_data.context = 'TEXTURE'  # Property
bpy.context.space_data.context = 'CONSTRAINT'  # Property
bpy.context.space_data.context = 'PHYSICS'  # Property
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.context.space_data.context = 'OBJECT'  # Property
bpy.context.space_data.context = 'WORLD'  # Property
bpy.context.space_data.context = 'WORLD'  # Property
bpy.context.space_data.context = 'SCENE'  # Property

location: <unknown location>:-1
  # Error

# backtrace
0   blender                             0x000000010d40e6a7 BLI_system_backtrace + 55
1   blender                             0x000000010d14371b sig_handle_crash + 363
2   libsystem_platform.dylib            0x00007fff510b0f5a _sigtramp + 26
3   ???                                 0x0000000000000003 0x0 + 3
4   blender                             0x0000000110ea232e drw_shgroup_init + 46
5   blender                             0x0000000110ea26c3 DRW_shgroup_create + 131
6   blender                             0x0000000110eeb064 lanpr_cache_init + 260
7   blender                             0x0000000110e9d839 drw_engines_cache_init + 169
8   blender                             0x0000000110e9c94e DRW_draw_render_loop_ex + 558
9   blender                             0x000000011119107d view3d_main_region_draw + 125
10  blender                             0x00000001111ff841 ED_region_do_draw + 353
11  blender                             0x000000010d6366c6 wm_draw_update + 1782
12  blender                             0x000000010d6342a0 WM_main + 48
13  blender                             0x000000010d13ff2f main + 927
14  libdyld.dylib                       0x00007fff50da2015 start + 1
15  ???                                 0x0000000000000001 0x0 + 1
# Blender 2.80 (sub 39), Commit date: 2019-01-02 08:09, Hash 8d78a25ef49
location: <unknown location>:-1
  # Error

# backtrace
0   blender                             0x00000001093d0157 BLI_system_backtrace + 55
1   blender                             0x00000001088b797b sig_handle_crash + 363
2   libsystem_platform.dylib            0x00007fff510b0f5a _sigtramp + 26
3   ???                                 0x00007ffee7494db8 0x0 + 140732778761656
4   blender                             0x0000000108ea225e drw_shgroup_init + 94
5   blender                             0x0000000108ea2c34 DRW_shgroup_create + 116
6   blender                             0x0000000108ee28e4 lanpr_cache_init + 260
7   blender                             0x0000000108e9cdcc DRW_draw_render_loop_ex + 604
8   blender                             0x00000001089a01ec view3d_main_region_draw + 124
9   blender                             0x0000000108bd75fe ED_region_do_draw + 366
10  blender                             0x00000001088ba756 wm_draw_update + 1782
11  blender                             0x00000001088b8400 WM_main + 48
12  blender                             0x00000001088b4339 main + 969
13  libdyld.dylib                       0x00007fff50da2015 start + 1
14  ???                                 0x0000000000000001 0x0 + 1
1 Like

I indeed crash in LANPR part. I need to investigate that.

Most likely it’s a problem with in one of the shaders, which may not be compiled correctly on MacOS. Are you using Intel Graphics or an external video card? that GPU mode is a lengthy one, and some earlier Intel CPUs doesn’t quite accept such complicated shaders. I’ll try to output some error message instead of letting it crash. However you can always use CPU mode instead.

Week 5 Report is here. A bunch of fixes and many features are now complete.
See the report for how to use object/collection flags and stroke chaining thresholds.

https://wiki.blender.org/wiki/User:Yiming/GSoC2019/Week5

@uff I have included a error message that could be shown on the UI if your video card is incapable of processing one of the shaders in the GPU mode. Shouldn’t crash now, please let me know if you had more hiccups.

Happy weekends every one!

2 Likes