Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17070

Lights support in c3b

$
0
0

@skalexey2 wrote:

Hello cocos community.

Does c3b format support lights ? If yes, then how to apply these which defined in the c3b model description to a Sprite3D which created from the same c3b model description?

I have a project in blender where I have a skinned mesh and 6 direction lights. I use FBX format for cocos2d-x (because my model is animated) and glTF for cocos2d-html5. When I export it to fbx, then convert fbx to c3b and import to a scene, the result is like in the follow picture:

The model have no shadows and lights on it's surface. Looks like simple drawn texture without any lights applied on it. Lights are present in the fbx file, but what happens when I convert it to c3b - I don't know. Moreover, there is no mention of the word "light" in CCSprite3D.cpp and only one macro BUNDLE_TYPE_LIGHT in CCBundle3D.cpp. Does it mean that light nodes are ignored by c3b parser ? Does it mean that there is no lights support in c3b ? I don't want to create lights manually in the code. I wish to use only model files for all 3d objects added to the scene.

When I draw glTF on cocos2d-html5 using three.js I achieve the expected result:

Here is a model which is lit by 6 direction lights defined in the blender project and exported to glTF. How to achieve the same result using c3b ?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>