1
$\begingroup$

I'm working with cycles standalone and I'm trying to find a way to use an image I already have loaded in memory as a texture in cycles.

From what I can see, the only way to load an image texture is with the ImageTextureNode, but that seems to only take a path to a file.

Is there some way built in to cycles to allow me to pass in a pointer to a bitmap in memory? My goal here is just to avoid needlessly writing out a temporary file to disk just so cycles can read it in again.

$\endgroup$
  • $\begingroup$ Small addition to clarify: When I say I'm working with cycles standalone, I am using a custom front-end. I'm not looking to get functionality like this through the xml API. $\endgroup$ – jlwitthuhn Dec 15 '15 at 1:46
  • 3
    $\begingroup$ That would be off topic for here, you may want to chat with the devs on irc #blendercoders as I expect the usage of cycles outside of blender is rather small so far. In blender the image selected in the image texture node (chosen from bpy.data.images[]) can exist only in memory and be sent to cycles. From python the image object has a pixels property that points to the image data in memory. You may be able to trace that through blender's code. $\endgroup$ – sambler Dec 15 '15 at 7:00
  • $\begingroup$ If nothing else works, you could creat a virtual disk in memory, and put textures there, even just for rendering. Never tried though. $\endgroup$ – m.ardito Dec 15 '15 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.