1

I can see in the logger that Kudan is recognizing that the model has textures, it shows this in the log:

2016-04-29 19:34:01.645 MyApp[1313:525371] WARNING: Could not find file for texture texture_0001.png
2016-04-29 19:34:01.646 MyApp[1313:525371] WARNING: Could not find file for texture texture_0002.png

Is there a way to specify the path where Kudan should look for this textures? Or is there a way to load and apply the textures automatically to the meshNodes?

utiq
  • 1,342
  • 2
  • 17
  • 33

1 Answers1

2

What the framework does is check if the filename that was specified in the model exists in the [NSBundle mainBundle].

As such it shouldn't matter too much where you place your texture files, as long as they're part of the main bundle.

The key thing to really take note of is: when your model is being converted to the KudanAR compatible version, it will pass on the filenames of the textures that were assigned to the nodes. So when you're adding your textures to the project, they need to keep their original name.

MultiColourPixel
  • 1,222
  • 10
  • 19
  • Does this mean that a texture file cannot be applied if it is outside the bundle? What this would mean is that we can load a model with the ARModelImporter initWithPath method, but if the texture has to be in the bundle, it cannot be applied to the model, even though the model is loaded correctly – lytridic May 28 '17 at 13:46
  • That's only the case if you mean the automatic assignment @lytridic. You can still apply the textures manually, regardless of where they come from. – MultiColourPixel May 28 '17 at 13:51
  • Good point. Manually instantiating ARTexture and ARTextureMaterial does the trick. Cheers! – lytridic May 28 '17 at 14:22