Directly transfer image pixels to LuxCore instead of saving to /tmp/
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.
@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?
"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).
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.
Access to Blender image.pixels is super slow anyway, so i don't think it would be worthwile to implement this feature.
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.
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.