Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load image or resource to ImageTexture #26193

Closed
ghost opened this issue Feb 23, 2019 · 1 comment
Closed

Can't load image or resource to ImageTexture #26193

ghost opened this issue Feb 23, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 23, 2019

Godot version:

v3.0.6.stable.mono.official.8314054

OS/device including version:

Windows 10 (64-bit)

Issue description:

Creating a new image or loading an existing .res or .png file in the Image field inside an ImageTexture is not possible.

Steps to reproduce:

  1. Open up reproduction project.
  2. On the Scene tab (Node Hierarchy) click on the MeshInstance node.
  3. In the Inspector, under MeshInstance > Material, click on the created SpatialMaterial.
  4. In the Inspector, under SpatialMaterial > Albedo > Texture, create a new ImageTexture, and click on it.
  5. In the Inspector, under ImageTexture > Image, try creating a new image or loading an existing resource (for example the included grass1-albedo3.res*).
  6. In the Output you will notice an exception:
    drivers/gles3/rasterizer_storage_gles3.cpp:835 - Condition ' !texture->active ' is true. returned: Ref<Image>()
  • grass1-aledo3.res is a StreamTexture created from grass1-albedo3.png

Minimal reproduction project:

ImageTextureBug.zip

Related:
#17650
Except I can't load an AtlasTexture either.

Comment:
What I was trying to achieve is to have a plane with a 2048x2048 texture that is repeated every 1 unit, in other words it won't stretch the image to the whole plane. I am not absolute new to Godot, but I am still learning a lot of things. If what trying to do here is not the right way to solve this problem, please explain me, how I could achieve what I want. Thanks.

@clayjohn
Copy link
Member

To load an image in the editor, you do not first create an ImageTexture (which is an internal class). You instead select "Load" and then load your image from there.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants