0

I have created an object on Maya and exported to a dae file. That object is a cylinder wrapped in a texture. The shader, created on maya and imported into SceneKit is a Phong with the following characteristics:

enter image description here

I add an omni light to the scene with the following parameters:

enter image description here enter image description here

The cylinder appears blown by the light, over iluminated. But just that cylinder. The other objects in the scene appear fine.

When I try to change any parameter on the light and on the object's shader I see changes on interface builder preview but no effect when I run the application on the iPhone. Yes, I have tried to clean Xcode cache and removing the app from the iPhone before buids. No change.

Any ideas?

Duck
  • 34,902
  • 47
  • 248
  • 470
  • The rendering in the SceneKit editor and the application should match (assuming the application is not modifying the scene of course). If that's not the case it's worth filing a bug. – Toyos Mar 02 '16 at 09:43

1 Answers1

2

The default rendering API for the iPhone is Metal. Try switching it to OpenGL. In Interface Builder, select your SCNView and you'll see a popup for "Rendering API". Or you can add the PrefersOpenGL key with a bool value of YES to your Info.plist: https://developer.apple.com/library/ios/qa/qa1904/_index.html

Here's the Interface Builder control. Select your SCNView:

enter image description here

Hal Mueller
  • 7,019
  • 2
  • 24
  • 42
  • thanks but I will try to keep Metal for now but just out of curiosity where exactly do I change that on Interface Builder? I don't see any option where you say. Care to provide a screenshot? Thanks. – Duck Mar 01 '16 at 21:13