Sprite3D works briefly, then textures disappear suddenly

Sprite3D works briefly, then textures disappear suddenly
0

#1

Please disregard my art skills. I’m still in proof of concept mode =)

My scene setup is as simple as possible, and the fact that I can briefly see the correct result (for about one second) just confuses me even more.

auto s = cocos2d::Director::getInstance()->getWinSize();
auto camera = cocos2d::Camera::createOrthographic(60, (GLfloat)s.width/s.height, 1, 1000);
camera->setPosition3D(cocos2d::Vec3(0, 0, 10));
camera->lookAt(cocos2d::Vec3(0, 0, 0), cocos2d::Vec3(0, 1, 0));
camera->retain();
addChild(camera); //add camera to the scene

auto light = cocos2d::AmbientLight::create (cocos2d::Color3B::WHITE);
addChild(light);

m_sprite = cocos2d::Sprite3D::create("chest_21-COLORFUL.c3b", "Chest-Painting.png");
m_sprite->setPosition3D(cocos2d::Vec3(200, 200, 0));
m_sprite->setGlobalZOrder(10000);
m_sprite->setScale(0.5);
addChild(m_sprite);

First second

Then…

What’s going on here!?


#2

Ok, I finally figured it out.

My c3t file had a handful of extra “parts” sections defining the lights and camera. Once those were removed, the scene looked blank. I then set the scale to 40f and everything worked as expected.