bnpr / Malt

Render framework for NPR.
https://malt3d.com
Other
994 stars 75 forks source link

The preview is not smooth #82

Closed KamiaoChan closed 3 years ago

KamiaoChan commented 3 years ago

when I'm moving perspective in render View window the objects will move in la, and it's not smooth I'm using the blender octane version 2.92 and install third party plugin with cats blender plugin machin3tool blt translation tool(for translation English to Chinese)

I suspect that the problem is caused by the OC version or cat tool

KamiaoChan commented 3 years ago

I found the same problem in the normal version of Blender

pragma37 commented 3 years ago

Hi!

Could you attach a log file? https://github.com/bnpr/Malt#bug-reports

Also, try to use Malt in a normal Blender version with the other addons disabled, to check if the problem persists.

What do do you mean exactly with "not smooth"? Low framerate?

KamiaoChan commented 3 years ago

This time I deleted the blender configuration file under Roaming and regenerated it then install Malt,This time is no other plugins using standard blender version all default settings. Then still have the same problem

About what kind of lag ,look about this video(https://www.youtube.com/watch?v=PpZkFWQojmY)at 2:35 he moved the view using shift+middle mouse button then zoomed in and out,the red sphere and its highlights all responded quickly But my is not i dont konw way

And I also found that when I move the viewing angle, the graphics card occupancy rate reaches 100% But the actual rendering response is delayed

KamiaoChan commented 3 years ago

Here is the log

Blender > SETUP IOCapture Malt > DEBUG MODE: False Malt > CONNECTIONS: Malt > Name: PARAMS Adress: ('127.0.0.1', 2032) Malt > Name: MESH Adress: ('127.0.0.1', 2033) Malt > Name: MATERIAL Adress: ('127.0.0.1', 2034) Malt > Name: TEXTURE Adress: ('127.0.0.1', 2035) Malt > Name: GRADIENT Adress: ('127.0.0.1', 2036) Malt > Name: RENDER Adress: ('127.0.0.1', 2037) Malt > SYSTEM INFO Malt > -------------------------------------------------------------------------------- Malt > PYTHON: 3.7.7 (default, Jun 13 2020, 11:11:23) [MSC v.1916 64 bit (AMD64)] Malt > OS: Windows-10-10.0.19041-SP0 Malt > CPU: Intel64 Family 6 Model 63 Stepping 2, GenuineIntel Malt > OPENGL CONTEXT: Malt > NVIDIA Corporation Malt > NVIDIA GeForce GTX 1080/PCIe/SSE2 Malt > 4.1.0 NVIDIA 466.27 Malt > 4.10 NVIDIA via Cg compiler Malt > Unable to load numpy_formathandler accelerator from OpenGL_accelerate Malt > GL_MAX_3D_TEXTURE_SIZE: 16384 Malt > GL_MAX_ARRAY_TEXTURE_LAYERS: 2048 Malt > GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS: 8 Malt > GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE: 65536 Malt > GL_MAX_CLIP_DISTANCES: 8 Malt > GL_MAX_CLIP_PLANES: 8 Malt > GL_MAX_COLOR_ATTACHMENTS: 8 Malt > GL_MAX_COLOR_TEXTURE_SAMPLES: 32 Malt > GL_MAX_COMBINED_ATOMIC_COUNTERS: 98304 Malt > GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS: 48 Malt > GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES: 8 Malt > GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS: 231424 Malt > GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 233472 Malt > GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS: 231424 Malt > GL_MAX_COMBINED_IMAGE_UNIFORMS: 48 Malt > GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS: 16 Malt > GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES: 16 Malt > GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS: 96 Malt > GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS: 231424 Malt > GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS: 231424 Malt > GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: 192 Malt > GL_MAX_COMBINED_UNIFORM_BLOCKS: 84 Malt > GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 233472 Malt > GL_MAX_COMPUTE_ATOMIC_COUNTERS: 16384 Malt > GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS: 8 Malt > GL_MAX_COMPUTE_IMAGE_UNIFORMS: 8 Malt > GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS: 16 Malt > GL_MAX_COMPUTE_SHARED_MEMORY_SIZE: 49152 Malt > GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS: 32 Malt > GL_MAX_COMPUTE_UNIFORM_BLOCKS: 14 Malt > GL_MAX_COMPUTE_UNIFORM_COMPONENTS: 2048 Malt > GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS: 1536 Malt > GL_MAX_CUBE_MAP_TEXTURE_SIZE: 32768 Malt > GL_MAX_CULL_DISTANCES: 8 Malt > GL_MAX_DEBUG_GROUP_STACK_DEPTH: 64 Malt > GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR: 64 Malt > GL_MAX_DEBUG_LOGGED_MESSAGES: 128 Malt > GL_MAX_DEBUG_LOGGED_MESSAGES_KHR: 128 Malt > GL_MAX_DEBUG_MESSAGE_LENGTH: 1024 Malt > GL_MAX_DEBUG_MESSAGE_LENGTH_KHR: 1024 Malt > GL_MAX_DEPTH_TEXTURE_SAMPLES: 32 Malt > GL_MAX_DRAW_BUFFERS: 8 Malt > GL_MAX_DUAL_SOURCE_DRAW_BUFFERS: 1 Malt > GL_MAX_ELEMENTS_INDICES: 1048576 Malt > GL_MAX_ELEMENTS_VERTICES: 1048576 Malt > GL_MAX_ELEMENT_INDEX: -1 Malt > GL_MAX_EVAL_ORDER: 8 Malt > GL_MAX_FRAGMENT_ATOMIC_COUNTERS: 16384 Malt > GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS: 8 Malt > GL_MAX_FRAGMENT_IMAGE_UNIFORMS: 8 Malt > GL_MAX_FRAGMENT_INPUT_COMPONENTS: 128 Malt > GL_MAX_FRAGMENT_INTERPOLATION_OFFSET: 1 Malt > GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS: 16 Malt > GL_MAX_FRAGMENT_UNIFORM_BLOCKS: 14 Malt > GL_MAX_FRAGMENT_UNIFORM_COMPONENTS: 4096 Malt > GL_MAX_FRAGMENT_UNIFORM_VECTORS: 1024 Malt > GL_MAX_FRAMEBUFFER_HEIGHT: 32768 Malt > GL_MAX_FRAMEBUFFER_LAYERS: 2048 Malt > GL_MAX_FRAMEBUFFER_SAMPLES: 32 Malt > GL_MAX_FRAMEBUFFER_WIDTH: 32768 Malt > GL_MAX_GEOMETRY_ATOMIC_COUNTERS: 16384 Malt > GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS: 8 Malt > GL_MAX_GEOMETRY_IMAGE_UNIFORMS: 8 Malt > GL_MAX_GEOMETRY_INPUT_COMPONENTS: 128 Malt > GL_MAX_GEOMETRY_OUTPUT_COMPONENTS: 128 Malt > GL_MAX_GEOMETRY_OUTPUT_VERTICES: 1024 Malt > GL_MAX_GEOMETRY_SHADER_INVOCATIONS: 32 Malt > GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS: 16 Malt > GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS: 32 Malt > GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: 1024 Malt > GL_MAX_GEOMETRY_UNIFORM_BLOCKS: 14 Malt > GL_MAX_GEOMETRY_UNIFORM_COMPONENTS: 2048 Malt > GL_MAX_IMAGE_SAMPLES: 32 Malt > GL_MAX_IMAGE_UNITS: 8 Malt > GL_MAX_INTEGER_SAMPLES: 32 Malt > GL_MAX_LABEL_LENGTH: 256 Malt > GL_MAX_LABEL_LENGTH_KHR: 256 Malt > GL_MAX_LIGHTS: 8 Malt > GL_MAX_LIST_NESTING: 64 Malt > GL_MAX_MODELVIEW_STACK_DEPTH: 32 Malt > GL_MAX_NAME_STACK_DEPTH: 128 Malt > GL_MAX_PATCH_VERTICES: 32 Malt > GL_MAX_PIXEL_MAP_TABLE: 65536 Malt > GL_MAX_PROGRAM_TEXEL_OFFSET: 7 Malt > GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET: 31 Malt > GL_MAX_PROJECTION_STACK_DEPTH: 4 Malt > GL_MAX_RECTANGLE_TEXTURE_SIZE: 32768 Malt > GL_MAX_RENDERBUFFER_SIZE: 32768 Malt > GL_MAX_SAMPLES: 32 Malt > GL_MAX_SAMPLE_MASK_WORDS: 2 Malt > GL_MAX_SERVER_WAIT_TIMEOUT: -1 Malt > GL_MAX_SHADER_STORAGE_BLOCK_SIZE: 2147483647 Malt > GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS: 96 Malt > GL_MAX_SUBROUTINES: 1024 Malt > GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS: 1024 Malt > GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS: 16384 Malt > GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS: 8 Malt > GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS: 8 Malt > GL_MAX_TESS_CONTROL_INPUT_COMPONENTS: 128 Malt > GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS: 128 Malt > GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS: 16 Malt > GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS: 32 Malt > GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS: 4216 Malt > GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS: 14 Malt > GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS: 2048 Malt > GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS: 16384 Malt > GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS: 8 Malt > GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS: 8 Malt > GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS: 128 Malt > GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS: 128 Malt > GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS: 16 Malt > GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS: 32 Malt > GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS: 14 Malt > GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS: 2048 Malt > GL_MAX_TESS_GEN_LEVEL: 64 Malt > GL_MAX_TESS_PATCH_COMPONENTS: 120 Malt > GL_MAX_TEXTURE_BUFFER_SIZE: 134217728 Malt > GL_MAX_TEXTURE_COORDS: 8 Malt > GL_MAX_TEXTURE_IMAGE_UNITS: 32 Malt > GL_MAX_TEXTURE_LOD_BIAS: 15 Malt > GL_MAX_TEXTURE_MAX_ANISOTROPY: 16 Malt > GL_MAX_TEXTURE_SIZE: 32768 Malt > GL_MAX_TEXTURE_STACK_DEPTH: 10 Malt > GL_MAX_TEXTURE_UNITS: 4 Malt > GL_MAX_TRANSFORM_FEEDBACK_BUFFERS: 4 Malt > GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 128 Malt > GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 4 Malt > GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 4 Malt > GL_MAX_UNIFORM_BLOCK_SIZE: 65536 Malt > GL_MAX_UNIFORM_BUFFER_BINDINGS: 84 Malt > GL_MAX_UNIFORM_LOCATIONS: 65536 Malt > GL_MAX_VARYING_COMPONENTS: 124 Malt > GL_MAX_VARYING_FLOATS: 124 Malt > GL_MAX_VARYING_VECTORS: 31 Malt > GL_MAX_VERTEX_ATOMIC_COUNTERS: 16384 Malt > GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS: 8 Malt > GL_MAX_VERTEX_ATTRIBS: 16 Malt > GL_MAX_VERTEX_ATTRIB_BINDINGS: 16 Malt > GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET: 2047 Malt > GL_MAX_VERTEX_IMAGE_UNIFORMS: 8 Malt > GL_MAX_VERTEX_OUTPUT_COMPONENTS: 128 Malt > GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS: 16 Malt > GL_MAX_VERTEX_STREAMS: 4 Malt > GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS: 32 Malt > GL_MAX_VERTEX_UNIFORM_BLOCKS: 14 Malt > GL_MAX_VERTEX_UNIFORM_COMPONENTS: 4096 Malt > GL_MAX_VERTEX_UNIFORM_VECTORS: 1024 Malt > GL_MAX_VIEWPORTS: 16 Malt > GL_MAX_VIEWPORT_DIMS: [32768 32768] Malt > -------------------------------------------------------------------------------- Malt > INIT PIPELINE: C:\Users\Kamiao\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\BlenderMalt.MaltPath\Malt\Pipelines\NPR_Pipeline\NPR_Pipeline.py Blender > Blender 2.92.0 b'master' b'02948a2cab44'

pragma37 commented 3 years ago

So you mean the viewport has some latency. Like this?

https://user-images.githubusercontent.com/36610999/117836827-38489580-b279-11eb-9774-e5fffb9f95c4.mp4

If that's the case, then it's expected. Sending the render to Blender adds some latency. When that youtube video was recorded Malt used a different system that had no latency, but was very unstable and caused Blender to crash.

That said, if your latency is too severe then it may be a bug, indeed.

KamiaoChan commented 3 years ago

https://user-images.githubusercontent.com/42341297/117847318-d0b03b80-b2b4-11eb-9f87-44a88a412831.mp4

well... I'm definitely sure this is not right

pragma37 commented 3 years ago

Yes, there's something wrong there.

I uploaded a new Malt version with improved logging and stats. Please, follow these steps:

I also added a new "Malt Stats" panel that shows performance statistics:

image A normal latency should be 2-3 frames.

It's likely that the Nvidia driver or Windows is giving low priority to the Malt process. Or maybe there's another program interfering. You could try to restart your PC, close other programs and disable energy optimizations (for Windows and the Nvidia driver).

KamiaoChan commented 3 years ago

it's better but still , I noticed CPU render time is high also the frame time. Could it be a multi-core allocation problem? there should some step slowed down the render speed I suppose https://user-images.githubusercontent.com/42341297/117889149-9f039880-b2e5-11eb-81f2-83a605f1420c.mp4 debug.txt debug2.txt

pragma37 commented 3 years ago

I have no idea, it must be an OS scheduling problem or a software interference. Some frames take 10 ms others 200 ms, they should all take almost the same time.

I don't think I can do too much on my side.

KamiaoChan commented 3 years ago

I don't know why either maybe it will be fix in future update If the symptoms disappear afterwards, I will reply on github Or if you have any ideas in the future need test I will always there

By the way , I am very happy to have tool like this, when this is done It will definitely make it easier to make toon rendering and cel rendering

Especially hope to achieve excellent cel rendering like ruki does by ev,After all there is no tool like Max's pencil+4 plugin in Blender yet I am very optimistic that Malt can be the first

And hope shader examples can be integrated into Malt in the final version, it will be easier to preview and control I have also participated in the crowdfunding and hope that Malt will be completed soon

Lastly thanks for help me to debug at this stage ♪(・ω・)ノ

pragma37 commented 3 years ago

Hi! Could you test if this helps you with this issue?

https://github.com/bnpr/Malt/issues/89#issuecomment-881918060

KamiaoChan commented 3 years ago

Wait. . . it is true that the delay will be affected by the resolution but not the desktop resolution but the software window resolution I have three monitors and the main monitor native resolution is 2K,The two is 4K but I change them to 2K to use and this is the test Results

https://user-images.githubusercontent.com/42341297/126081205-45b56d38-a76a-4e5f-b834-e43ea9c83319.mp4

pragma37 commented 3 years ago

Sure! If you look further in that thread you can see that I added an option for scaling the viewport resolution. https://github.com/bnpr/Malt/issues/89#issuecomment-869819842

But could you try to test specifically the new Max Viewport Render Framerate option? (last comment in that thread) https://github.com/bnpr/Malt/issues/89#issuecomment-881918060

It seems that you have the same issue, Blender is using more GPU than Malt itself (the python window).

KamiaoChan commented 3 years ago

Wow it works

https://user-images.githubusercontent.com/42341297/126082911-a5bdee28-c9a4-4128-81ab-36941b2dcaf4.mp4

pragma37 commented 3 years ago

Awesome! Finally! I feel so relieved now. :) Thank you so much for testing and reporting!

KamiaoChan commented 3 years ago

You are welcome、 hope someday I can use Malt to make high quality anime renderings For this goal this is what I should do (^o^)/