TextureSharing icon indicating copy to clipboard operation
TextureSharing copied to clipboard

Texture doesn't update, and x,y are inverted.

Open softyoda opened this issue 1 year ago • 3 comments

Hello, I've just tried your add-on on blender 4.1 it looks promising. (more pro than my hack that consisted of writing ndi frames as jpg using OpenCV python script, use the frames as image-sequence in blender's texture, and try to sync the timeline of blender with the last wrote frame if unsync happen).

But unfortunately, I encounter two issues with your add-on.

  • The image only refreshes when the timeline is from pause to play, and only one single frame is refreshed there (it is really the only way the "update" doesn't refresh the image) and as mentioned in the README, the update has a huge lag as gpu->cpu->gpu current bottleneck (around 1500ms dropframe lag).
  • The image is inverted (as if x,y of uv were inverted, left is right, and top is bottom)
  • Lack of eevee/cycles support (those renderers doesn't seem to get updated image, compared to my hacky way of doing it with jpg sequence that does update on all renderer)

Just for your info, the stream come from NDI for premiere pro, and work fine on OBS).

softyoda avatar Jun 21 '24 10:06 softyoda

This are all known issues. I don't have yet figured out how to fix some of them.

  • the x,y issue should be solvable
  • the image refresh is a problem I haven't solved yet
  • I thought EEVEE and Cycles are supported - can you elaborate?

Texture receive (Spyhon or NDI - Spout is not supported yet) is highly experimental and will not work in realtime anytime soon. Thats why these problems are currently on the backburner...

maybites avatar Jun 21 '24 19:06 maybites

EEVEE and Cycles texture doesn't refresh when stepping from pause to play (only way I found to update a single frame while in opengl viewport with texture preview), it displays the latest "saved" frame (same visible in UV editor, and that either has been update while setup, or pause->play single refresh. I used NDI as receiver, from Premiere Pro, and it worked when previewed in OBS, i'm on Windows 10.

Also, did you tried to use the imbuf module to load image at runtime?

softyoda avatar Jun 24 '24 10:06 softyoda

Also, did you tried to use the imbuf module to load image at runtime?

no, but as far I understand it, it wont help.

maybites avatar Jun 24 '24 15:06 maybites

Coming from Win11 23H2 and Blender 4.1

This are all known issues. I don't have yet figured out how to fix some of them.

I can brainstorm with you if you need !

  • the x,y issue should be solvable

that;s something i noticed as well. most software simply flip the image on the Y axis behind the scenes. maybe add a toggle ? (Mirror Y) for now my workaround is to rotate the UV of my faces, but that doesnt solve the mirroring, so it's only a side-fix (probably need to flip normals on the geometry itself atm... so that's 2 workarounds

  • the image refresh is a problem I haven't solved yet

i typically use 33ms to match my 30fps content. but i'm okay with the default 100ms settings. maybe add buttons with FPS metrics to help people understand what values they should use (8ms for 120fps,16ms for 60fps, 33ms for 30fps, etc...)

  • I thought EEVEE and Cycles are supported - can you elaborate?

EEVEE works for me, but whenever i try to switch to Cycles while the texture is active and refreshing, it crashes blender

Texture receive (Spyhon or NDI - Spout is not supported yet) is highly experimental and will not work in realtime anytime soon. Thats why these problems are currently on the backburner...

it works rather well for me. it's not frame perfect (there's a slight buffering) but it's workable...

ghost avatar Jan 23 '25 18:01 ghost