cocos3.13.1 3d模型动画有很明显的白边

导入一个美术给的模型运行动画 边缘有特别明显的白色块
test.zip (445.5 KB)

    cocos2d::Scene* scene = cocos2d::Scene::create();
auto sprite3D = Sprite3D::create("test3dmodel.c3b");
    sprite3D->setScale(0.6f);
    sprite3D->setRotation3D(Vec3(25.f, 90.0f, 0.0f));
    sprite3D->setPosition(Vec2(s.width * 2.5f / 5.f, s.height / 2.f));
    auto animation = Animation3D::create("test3dmodel.c3b");
    auto animate = Animate3D::create(animation);
    sprite3D->runAction(RepeatForever::create(animate));
    sprite3D->setForce2DQueue(true);
    scene->addChild(sprite3D);

一下是日志信息
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Hardware S3TC decoder not present. Using software decoder
cocos2d: Texture2D. WARNING. Mipmap level 1 is not squared. Texture won’t render correctly. width=512 != height=256
cocos2d: Texture2D. WARNING. Mipmap level 2 is not squared. Texture won’t render correctly. width=256 != height=128
cocos2d: Texture2D. WARNING. Mipmap level 3 is not squared. Texture won’t render correctly. width=128 != height=64
cocos2d: Texture2D. WARNING. Mipmap level 4 is not squared. Texture won’t render correctly. width=64 != height=32
cocos2d: Texture2D. WARNING. Mipmap level 5 is not squared. Texture won’t render correctly. width=32 != height=16
cocos2d: Texture2D. WARNING. Mipmap level 6 is not squared. Texture won’t render correctly. width=16 != height=8
cocos2d: Texture2D. WARNING. Mipmap level 7 is not squared. Texture won’t render correctly. width=8 != height=4
cocos2d: Texture2D. WARNING. Mipmap level 8 is not squared. Texture won’t render correctly. width=4 != height=2
cocos2d: Texture2D. WARNING. Mipmap level 9 is not squared. Texture won’t render correctly. width=2 != height=1
cocos2d: warning: Attribute not found: a_normal
cocos2d: warning: Attribute not found: a_color
cocos2d: warning: Attribute not found: a_normal
cocos2d: warning: Attribute not found: a_color

看来论坛又没人维护了

抱歉,最近在忙发版本的事情,论坛没法及时维护。

我这边看到是这个效果,混合有点问题,不过不是你说的白边

原因找到了,这个PR强制让透明mesh也写入深度:https://github.com/cocos2d/cocos2d-x/pull/13635。具体原因我不太清楚。你可以先把这个PR的修改还原回去试试。

非常感谢,你应该是在安卓环境下运行的,我在安卓下显示跟你的一样,ios就是一层白色的边。现在按那个PR回滚回去就好了。