How can I split a single image resource into multiple textures at runtime? I am essentially using a tilemap texture for a 3D object and trying to apply each tile to a different surface. Obviously I could just have each tile be a unique file, but I'm trying to avoid that. Atlastexture doesn't seem to work when used as a texture for a standardmaterial3D, and I have no clue if a texture2Darray is right for this
You can use Godot’s Image class to manipulate texture images. Create multiple smaller images of adequate size, use Image::blit_rect() to transfer data from the original image, and then turn images into textures using ImageTexture::create_from_image().
I wouldn’t recommend doing this at runtime (or even at all) for several reasons. It’s always better to just do this as a pre-processing step and maintain multiple files. For easier management simply use file system folders and good naming conventions.
As a follow-up, Material Maker was specifically made to solve your problem, and has even been highlighted by the Godot team. Like @normalized said, you can do image manipulation, but as someone who has spent a lot of time trying to do that I can tell you it’s very painful, even if you are used to writing code in other languages to manipulate images.