0
$\begingroup$

I am a novice aspiring professional in Blender who recently told me about being able to render in the cloud with Google Colab of Blender, I tried to do it with several models and although the image was made without problem the problem is that the textures of the models disappear for some reason remaining purple as you can see, it is strange because if I render that same document normally the image comes out with the textures without any problem of losing these Does anyone know how to fix it? I leave below the code that I used separated in the best way, I also attach the image so you can see how it turned out, and no, there were no connection problems with the assigned GPU, all these codes were executed well.

    #Connect Google Drive to Google Colab
#=====================================
from google.colab import drive
drive.mount('/content/drive')

 #Download Blender from Blender Repository.
#Other Versions are here: https://download.blender.org/release/
#=====================================
!wget https://download.blender.org/release/Blender4.1/blender-4.1.0-linux-x64.tar.xz

#Unzip Blender
#=====================================
!tar xf blender-4.1.0-linux-x64.tar.xz

#Deletes the Default libtcmalloc-minimal4 version and installs the Ubuntu default version
import os

os.environ["LD_PRELOAD"] = ""

#Deletes wrong Version of libtcmalloc-minimal4
!apt remove libtcmalloc-minimal4
#Installs correct version of libtcmalloc-minimal4
!apt install libtcmalloc-minimal4

#Adds this library to the user environment
os.environ["LD_PRELOAD"] = "/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4.3.0"

#Path of Blender File to be Rendered 
#===========================
filename = '/content/drive/MyDrive/BlenderRendes/IronPrueba.blend'

!./blender-4.1.0-linux-x64/blender -P 'gpu.py' -b $filename -noaudio -E 'CYCLES' --debug-all -o "/content/drive/MyDrive/BlenderRendes/IronPrueba_####" -s 1 -e 1 -a -F 'PNG' -- --cycles-device CUDA

enter image description here

$\endgroup$

1 Answer 1

0
$\begingroup$

For the textures to be properly added in the .blend file, go to File > External Data > Pack Resources. Now, all the files will be included in the .blend file.

enter image description here

Activate the Automatically Pack Resources to do this automatically every time you add a texture.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .