Blender版本2.79
OSG版本:3.4.0-9
操作系统:Fedora
我一直在使用Blender的导出实用程序导出obj文件,然后使用osgconv将它们转换为osg文件。然后导入文件并将其渲染到一个类似于:Image of the working scene before using the export tool的场景中
今天我安装了Cedric Pinson(Github页面:https://github.com/cedricpinson/osgexport)的osgexport,直接从Blender导出到osgt文件。导入这些文件并渲染它时,我得到以下结果。 Image of the scene where everything goes dark and the lighting is wierd
额外细节:
有任何想法吗?我看到了效果,我甚至不知道从哪里开始。唯一的区别是转换器输出的文件。其他一切都是一样的。此外,如果有更新/更好的方法将blender文件导出到OSG可以读取的文件中,那么我对所有建议都持开放态度。
先感谢您,
对于它的价值,OSG论坛/邮件列表通常非常适合回答问题,我相信我经常看到塞德里克的名字,以及所有主要贡献者:http://forum.openscenegraph.org/
新用户通常必须审核他们的问题,减少垃圾邮件,所以请耐心等待。
在这个具体问题上,我有3个建议:
osg::Light *light = new osg::Light;
light->setAmbient(osg::Vec4(1.0,1.0,1.0,1.0));
light->setDiffuse(osg::Vec4(1.0,1.0,1.0,1.0));
light->setSpecular(osg::Vec4(1.0,1.0,1.0,1.0)); // some examples don't have this one