Editor 2: How to assign texture to model

In Editor 1 model objects had a field that allowed you to set a texture image. I don’t see how to do that in editor 2, does the dae file need to be pre-textured or am I missing something?

Never mind, I see now you have to add a sampler to the material before you can add a texture to it.

I was having trouble with a call to model.set_constant with a custom material in editor 1 and out of curiosity I tried it in editor 2 and my textures disappeared. That seems to break inter-editor compatibility.

Ah, this is quite unfortunate. The two editors should be fully interchangeable. Where did we go wrong @Ragnar_Svensson, @Ragnar_Dahlen, @Erik_Angelin, @mats.gisselson?

The error is in fact in Editor1, which should require samplers (or the old format of “textures”) to be present for texturing to happen. What Editor2 does is more correct in this regard. It’s of course confusing or not obvious that you have to add samplers to the material for texturing to work, but I would say that’s more of a UX/documentation issue than an architectural problem. It could be solved as trivially as having the material contain a sampler by default.

2 Likes