💬

Community answer

Collected from the ACE community Discord archive around 2024-10-10. It may be informal or outdated — anyone can edit this page to improve it. This topic changes between game versions — double-check before relying on it. Original discussion

Loading a PNG from a URL into a material

🖼️ RenderingUpdated 2 days ago•0 views
Dropbox needs a dl.dropboxusercontent.com/content_link/.../file?dl=1 style URL. The cb callback in setTextureURL provides a layout function to resize the image …

How to load a PNG from a public link (google drive/dropbox) as a material texture

Dropbox needs a dl.dropboxusercontent.com/content_link/.../file?dl=1 style URL. The cb callback in setTextureURL provides a layout function to resize the image (rendertargets are 1024x1024), and the render target probably needs correct flags - e.g. material:setInt("$flags", 0x0100 + 0x0010) or 0x0030 for color+alpha. Google Drive links tend to return black images.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.