BlendLuxCore icon indicating copy to clipboard operation
BlendLuxCore copied to clipboard

Directly transfer image pixels to LuxCore instead of saving to /tmp/

Open Theverat opened this issue 7 years ago • 5 comments

Test if we can directly write Blender image.pixels into a LuxCore image property blob (possibly using the AddAllFloat() function that was added for fast smoke export).


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Theverat avatar Apr 18 '18 22:04 Theverat

@Dade916: How can I define an imagemap from blob only? Is it implemented?

When I omit the file property, I get RuntimeError: ImageMap file doesn't exist: image.png thrown from luxcore_scene.Parse(scene_props). Looking at the sources, it seems like only the ImageMap::FromProperties() method supports the blob property?

Theverat avatar Apr 23 '18 17:04 Theverat

"image.png" is the default value of .file property so that explain the error if you are trying to parse an image map texture. I introduced the use of ImageMap::FromProperties() for background image plugin (https://github.com/LuxCoreRender/LuxCore/blob/d0c79ae5d06bcf1797fecbd1a1f03316bd4403eb/src/slg/film/filmparse.cpp#L521) because it was the only way for FILESAVER to save the image map used by a plugin. Indeed, it is easy to extend the use of ImageMap::FromProperties() to many other cases (image map texture, infinite lights, etc.).

P.S. but I would do it for v2.1 (so on a branch, not main code for v2.0).

Dade916 avatar Apr 23 '18 20:04 Dade916

P.S. but I would do it for v2.1 (so on a branch, not main code for v2.0).

Sure, it's for v2.1.

Theverat avatar Apr 23 '18 21:04 Theverat

Access to Blender image.pixels is super slow anyway, so i don't think it would be worthwile to implement this feature.

Theverat avatar Nov 08 '19 18:11 Theverat

This is something to look at again after Blender 2.83 is out. There is now a fast way to access image.pixels in Blender.

Theverat avatar Apr 29 '20 11:04 Theverat

As I understand it, exchanges between Blender and BlendLuxCore no longer go through temporary files in the /tmp folder, but through memory buffers (except perhaps for denoising). Therefore, I am closing this issue.

howetuft avatar Nov 08 '25 12:11 howetuft