ogre

ogre的材质与unity的材质的相似性

∥☆過路亽.° 提交于 2020-03-02 13:13:37
最近研究了火炬之光的游戏资源,这款游戏采用ogre引擎,也就促使我研究了一下ogre的材质文件格式,发现和我经常使用的unity的材质格式有很多相似之处,因此分享出来给大家。 ogre的材质文档可以参考这里 http://www.ogre3d.org/docs/manual/manual_16.html , 而unity的shader文档参考这里 http://docs.unity3d.com/Manual/SL-Shader.html unity的shader语言分为3种,即shaderlab,类似于固定管线语法;cg shader,比较经典的shader语法,相当于对shaderlab的扩展可编程语法;以及surface shader,这个是另外一种系统,没有pass的概念,相当于 基于某种光照模型,然后调整光照模型的参数。 第三种语法不是很熟悉, 如果有了解这第三种模型渊源的朋友可以告诉我。 继续将ogre和unity的对比: 类似的两者的材质语言 都有固定管线和 可编程管线 语法。 其中unity中的shaderlab 标准语法和ogre 相比很类似,但是ogre比unity的shaderlab强大一些。 两者都有基本的Pass概念,基本语法形式都是在Pass中操作texture的混合方式,以及配置标准的光照参数。 ogre有一个 scroll anim的功能

Converting DirectX vertexes to OpenGL vertexes

六眼飞鱼酱① 提交于 2020-01-05 05:05:42
问题 I have a file with full of vertex data which was exported from a software which used DirectX. Now I want to create a mesh in Ogre out of it. I set Ogre to use OpenGL since I develop on a Mac, with Xcode. My question is how can I convert these vertices to be OpenGL compatible? For example If I have a DirectX vertex in this format: DirectXVertex vertexDX = {x, y, z} what would it look like in a OpenGL vertex: OpenGLVertex vertexGL = ? Also in the file I have the data of the faces of the

Converting DirectX vertexes to OpenGL vertexes

China☆狼群 提交于 2020-01-05 05:04:13
问题 I have a file with full of vertex data which was exported from a software which used DirectX. Now I want to create a mesh in Ogre out of it. I set Ogre to use OpenGL since I develop on a Mac, with Xcode. My question is how can I convert these vertices to be OpenGL compatible? For example If I have a DirectX vertex in this format: DirectXVertex vertexDX = {x, y, z} what would it look like in a OpenGL vertex: OpenGLVertex vertexGL = ? Also in the file I have the data of the faces of the

Ogre 2011-12-06

点点圈 提交于 2020-01-04 17:06:05
用自己的main loop替代系统的main loop #include "ogre/Ogre.h"#include "ois/OIS.h"class MyFrameListener : public Ogre::FrameListener{public: MyFrameListener(Ogre::RenderWindow* win) { size_t winHandle = 0; std::ostringstream winHandleStr; OIS::ParamList pl; win->getCustomAttribute("WINDOW", &winHandle); winHandleStr << winHandle; pl.insert(make_pair("WINDOW", winHandleStr.str())); inputMgr_ = OIS::InputManager::createInputSystem(pl); keyBoard_ = static_cast<OIS::Keyboard*>(inputMgr_->createInputObject(OIS::OISKeyboard, false)); } ~MyFrameListener() { inputMgr_->destroyInputObject(keyBoard_); OIS:

Is there a fully featured OBB class for Ogre3D?

六月ゝ 毕业季﹏ 提交于 2020-01-04 05:14:08
问题 Is there a fully featured OBB class for Ogre3D? I don't think there is one by default but I am looking for an alternative which has all the features of the AxisAlignedBox class. Thanks 回答1: There are implementations around, which are not integrated in Ogre's core, since this is usually covered by physics engines and does not fall into the main area of a rendering engine: One implementation example can be found in the Ore wiki article Object Bounding Box. Its talk page, also got a few helpful

How to create a .mesh file with OGRE?

混江龙づ霸主 提交于 2020-01-02 04:38:09
问题 I'm relatively new to OGRE graphics engine, so my question may seem too obvious, but searching for relevant information was not successful. Given: I have an OGRE application with a scene created of some meshes, lights, cameras and textures. It is rather simple, I think. That all is represented by a tree of scene nodes(internal object). The goal: To save the full tree of scene nodes or, preferably, an indicated branch of nodes of the tree to a ".mesh" file. To be able load it later as any

Problem with installing Ogre sdk?

拈花ヽ惹草 提交于 2019-12-21 02:40:31
问题 I'm new to Ogre and tried to run the first tutorial, but I have faced a problem getting the error message OGRE EXCEPTION(6:FileNotFoundException): 'resources_d.cfg' file not found! in ConfigFile::load at ../../OgreMain/src/OgreConfigFile.cpp (line 83) Please help, its critical! Another question: Is cmake important for installing the Ogre sdk? 回答1: After getting ogre compiled/installed using cmake on linux those two config files live at /usr/local/share/OGRE/resources.cfg /usr/local/share/OGRE

Ogre的骨骼动画

对着背影说爱祢 提交于 2019-12-16 19:22:48
Ogre 骨骼信息和动画信息保存到后缀名为 .skeleton 的文件中,你可以通过 OGRE 提供的导出插件工具( Milkshape 和 3Dmax 的 exporter )来导出该类型的文件。当你创建基于 .Mesh 文件的 Entity 时, .Skeleton 文件将会自动被系统加载进来。为了操作方便, Entity 自动给每一个动作指定一个 AnimationState 类(请参考基本动画)的对象,你可以通过 Entity::getAnimationState 函数来得到具体的动作。 该实例创建基于 robot.mesh 文件的实体( Entity )对象,指定其“走”动作(动作信息都在 .skeleton 文件里),并将其显示到屏幕上。 robot.mesh 文件中保存机器人的网格信息, Entity 会自动加载保存有机器人骨骼信息的 robot.skeleton 文件。 就像上一章的一样,我们把要学习的代码放入一个过程里面,代码如下: 我们同样把过程CreateSkeletonAnimation放到了createScene里面执行。 void CreateSkeletonAnimation() ... { // 设置关键帧之间的插值方法为样条插值 Animation::setDefaultInterpolationMode(Animation::IM_SPLINE)

OgreSdk 1.9.1 - Assertion failed

走远了吗. 提交于 2019-12-13 02:37:57
问题 I'm trying to set up Ogre 1.9 on Windows 7 with Visual studio 2012 (x64). I've managed to iron out some of the bugs, but I'm getting a MessageBox error with the text: Assertion failed! Program: C:\OgreSDK\bin\Debug\OgreOverlay_d.dll File: ..\..\..\..\..\Components\Overlay\src\Ogre...Manager.cpp Line: 52 Expression: msSingleton For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts (Press Retry o debug the application - JIT must be

QML text rendering issue with custom OpenGL item active

梦想的初衷 提交于 2019-12-13 00:23:39
问题 I've been working with the QmlOgre Qt example to make it work with Qt5 final. The original example itself looks fine now and behaves as intended. My code is here: https://github.com/advancingu/QmlOgre However I found that there is an issue when a QML text item is modified either through changed signals emitted from C++ or from a simple timer in the sample QML scene. For example, I added a 10ms QML timer that simply increments a counter and assigns it to a text item. The corresponding code is