Skip to main content

History: DotScene

Source of version: 16

Copy to clipboard
            {DIV(class="Layout_box1")}{SPLIT(colsize=15%|86%)}{img fileId="1615" alt="dotscene.jpg" width="87" imalign="left" link="DotScene"}---
!!((DotScene))
Overview of the DotScene format.{SPLIT}{DIV}

{maketoc}

!!DotScene Overview
DotScene (aka .scene) is just a standardized XML file format. The .dtd format is in [https://github.com/OGRECave/ogre/blob/master/PlugIns/DotScene/misc/dotscene.dtd|PlugIns/DotScene]. 
This file format is meant to be used to set up a scene in Ogre. It is meant to be useful for any type of application/game. Editors can export to .scene format, and apps can load the format.

!!What is DotScene?
DotScene file does not contain any mesh data, texture data, etc. It just contains elements that describe a scene. You *do not* need to use any of the following when using .scene files: DotSceneManager, DotSceneInterface, DotSceneViewer. They are all just seperate projects that you have the option of using.

A simple .scene file example:
{CODE(wrap="1", colors="xml")}<scene formatVersion="">
    <nodes>
        <node name="Robot" id="3">
            <position x="10.0" y="5" z="10.5" />
            <scale x="1" y="1" z="1" />
            <entity name="Robot" meshFile="robot.mesh" static="false" />
        </node>
        <node name="Omni01" id="5">
            <position x="-23" y="49" z="18" />
            <rotation qx="0" qy="0" qz="0" qw="1" />
            <scale x="1" y="1" z="1" />
            <light name="Omni01" type="point" intensity="0.01" contrast="0">
                <colourDiffuse r="0.4" g="0.4" b="0.5" />
                <colourSpecular r="0.5" g="0.5" b="0.5" />
            </light>
        </node>
    </nodes>
</scene>
{CODE}
Details you find at [https://github.com/OGRECave/ogre/tree/master/PlugIns/DotScene|PlugIns/DotScene].

!!What Does it Do?
It does nothing in itself, it is just a file format. The nice thing about the format is that it is in XML format, and is human readable. Also, adding new tags/elements not in the official specification is possible without messing up other .scene parsers.

You can find more details at [https://github.com/OGRECave/ogre/tree/master/PlugIns/DotScene|PlugIns/DotScene].

!!How to use DotScene (DEPRECATED)
This method is deprecated, but it is simpler and might be useful for someone who is still using older versions of OGRE3D.

Load the plugin (in "plugins.cfg", add the following line):
{CODE(wrap="1", colors="xml")}
Plugin=Plugin_DotScene
{CODE}

Include the header "#include <OgreSceneLoaderManager.h>"

And to use the library , just call the loader from the Singleton:
{CODE(wrap="1", colors="xml")}
Ogre::String filename = "myScene.scene";
Ogre::String groupName = "Scene";
Ogre::SceneNode attachmentNode = mSceneMgr->getRootSceneNode();

Ogre::SceneLoaderManager::getSingletonPtr()->load(filename,  groupName, attachmentNode );
{CODE}

!!How to use DotScene
In recent OGRE3D versions DotScene has been incorporated into the main OGRE repo and made into a Plugin.
So it has to be loaded in ''plugins.cfg", add the following line:
{CODE(wrap="1", colors="xml")}
Plugin=Plugin_DotScene
{CODE}
Also, it is required to complie against the library (in a similar fashion to OgreBites) located in: "OgreSDK\ogre-1.12.11\lib\OGRE"

Include the header "#include <OgreDotSceneLoader.h>", located in: "OgreSDK\ogre-1.12.11\include\OGRE\Plugins\DotScene"

And to use the library , create a DataStream and pass it to the loader:
{CODE(wrap="1", colors="xml")}
Ogre::String groupName = "Scene";
Ogre::String filename = "myScene.scene";
Ogre::SceneNode attachmentNode = mSceneMgr->getRootSceneNode();

Ogre::DataStreamPtr stream(Ogre::Root::openFileStream(filename, groupName));

Ogre::DotSceneLoader *loader = new Ogre::DotSceneLoader();
loader->load(stream, groupName, attachmentNode );
{CODE}

!!Other Tools that support DotScene format

* ((RapidXML Dotscene Loader))
* [https://github.com/OGRECave/blender2ogre|OGRECave/blender2ogre] - Exports .scene files from Blender.
* ((Complete Guide: Exporting Blender To Ogre))
* Example Scene Converter - Parses scene file into binary octree file (Works in conjunction with DotSceneManager)
* 3DS Scene Exporter - Exports meshes/lights/materials/.scene file (ogreaddons/3dssceneexporter)
* ((Maya Scene Exporter)) - Open Source scene exporter, supporting lights,cameras,transformations, references. In Ogre AddOns CVS.
* ((OgreMax Scene Exporter)) - The OgreMax Scene Exporter is a 3DS Max 8/9/2008/2009 exporter plugin that exports scenes to the .scene format.
* ((Ogitor)) - An open source Ogre scene editor ([https://github.com/OGRECave/ogitor|OGRECave/ogitor])

        

History

Information Version
Mon 08 of Aug, 2022 16:25 GMT-0000 paroj 17
Wed 17 of Feb, 2021 03:27 GMT-0000 sercero 16
Sat 14 of Mar, 2020 14:50 GMT-0000 paroj 15
Sat 14 of Mar, 2020 14:50 GMT-0000 paroj 14
Fri 30 of Jun, 2017 22:27 GMT-0000 paroj 13
Fri 30 of Jun, 2017 22:23 GMT-0000 paroj 12
Wed 28 of Jun, 2017 12:39 GMT-0000 paroj 11
Tue 27 of Jun, 2017 23:49 GMT-0000 paroj 10
Tue 27 of Jun, 2017 23:40 GMT-0000 paroj 9
Tue 07 of Sep, 2010 11:03 GMT-0000 Beauty added link to "Complete Guide: Exporting Blender To Ogre" 8
Wed 11 of Aug, 2010 11:24 GMT-0000 duststorm Fixed link to DotSceneManager wiki article 7
Thu 17 of Jun, 2010 00:40 GMT-0000 Beauty added link to ((RapidXML Dotscene Loader)) 6
Mon 04 of Jan, 2010 01:40 GMT-0000 jacmoe 5
Sun 03 of Jan, 2010 01:16 GMT-0000 jacmoe 4
Sat 02 of Jan, 2010 01:31 GMT-0000 jacmoe 3
Fri 25 of Dec, 2009 23:29 GMT-0000 jacmoe 2
Wed 02 of Sep, 2009 03:14 GMT-0000 Jacmoe /* Other Tools that support DotScene format */ 1