MaterialEditor         Documentation of the GSoC 2007 project 'Material Editor'

Introduction

In Ogre, all aspects of an objects visual appearance are encapsulated in a Material. The Ogre Material Framework is a robust system allowing the programmer to define one or more rendering passes and optionally techniques for degrading gracefully based on a number of factors such as system hardware and/or level of detail.

The goal of this project is to develop an editor for Ogre’s Material Framework. The Ogre Material Editor will provide the developer with Material Script and Shader editors, and allow them to enable/disable Passes and Techniques enabling rapid prototyping of new Materials. The Ogre Material Editor will be similar in appearance and functionality to the ATI RenderMonkey™ Toolsuite.

The original project proposal can be read here. (Dead link)

Info For questions use this forum topic. (Useful information you also find in the old forum topic.)

General Information

Contributors

Brian Hudson (Hudson)

Casey Borders (CaseyB)

Source Code Control



http://ogre.cvs.sourceforge.net/ogre/ogrenew/Tools/MaterialEditor/

Installer

Features

Syntax Hilighting

Syntax hilighting has been implemented for Material Scripts, Cg, GLSL, and HLSL.

The Material Scripts syntax hilighter colorizes material keywords (i.e.: material, technique, pass, etc...), attributes (i.e.: ambient, diffuse, on, off, etc...), numbers and comments.

The Cg/GLSL/HLSL syntax hilighters colorize keywords and built-in functions.

Material Script

Cg

Code Folding

The material script editor supports basic code folding based on opening/closing braces. The vertex/fragment shaders editors (Cg/GLSL/HLSL) also support code folding.

Code Folding

Call Tips

Call Tips are currently supported for material scripts. Call Tips are already supported for the vertex/fragment shader editors (Cg/GLSL/HLSL) but the required calltips file has not yet been created for these languages.

Call Tips

Context Sensitive Documentation

Context sensitive documentation is currently supported for material scripts. Context sensitive documentation is already supported for the vertex/fragment shader editors (Cg/GLSL/HLSL) but the required docs file has not yet been created for these languages.

Documentation View

Miscellaneous

Workspace Tree

The Workspace Tree manages all of the current Projects/Materials/Techniques/etc and acts as the central point for the navigation and enablement of other user interface elements.

Workspace Tree

Property Editors



The vast majority of properties/attributes for Materials, Techiques, Passes, and Texture Units can be modified in the user interface via the property grid.

Material



The material property editor is shown when a Material is selected in the Workspace Tree.

Material Properties

Technique



The technique property editor is shown when a Technique is selected in the Workspace Tree.

Technique Properties

Pass



The pass property editor is shown when a Pass is selected in the Workspace Tree.

Pass Properties

Texture Unit



The texture unit property editor is shown when a Texture Unit is selected in the Workspace Tree.

Texture Unit Properties

Wizards



The Material Editor provides (very basic at this point) wizards to ease the create of Projects/Materials/Techniques/Passes/Texture Units. Alternatively, Materials/Techniques/Passes/Texture Units can be added directly to the associated material script and the user interface will update accordingly upon script compilation.

Project

The Project wizard creates a new Project within the Workspace.

Project Wizard

Material



The Material wizard creates a new Material within the given Project.

Material Wizard

Technique



The Techique wizard creates a new Technique within the given Material.

Technique Wizard

Pass



The Pass wizard creates a new Pass within the given Technique.

Pass Wizard

Texture Unit



The Texture unit wizard creates a new Texture Unit within the given pass.

Texture Unit Wizard

Feature Requests

  • Auto code completion/suggestions
  • Material inheritance view
  • Declaration view
  • Drag & Drop support
  • Import/Export Wizards
  • Workspace persistence
  • External lexers
  • HDR Color Picker
  • Build against Shoggoth
  • Integrate with the new compilers
  • Integration with FX Composer 2
  • Graphical Node/Link Material Editing

Dependencies

OGRE

http://www.ogre3d.org/

The Material Editor is currently built against Ogre 1.4.4 Eihort which may be downloaded here.

boost



http://www.boost.org/

The Material Editor utilizes boost::any, boost::bind, boost::function, and boost::signal.

On Windows with MS Visual Studio .NET 2005, the easiest way to install the boost libraries is by using the BoostPro 1.34.1 installer provided by boost-consulting.

For alternative methods, consult the boost Getting Started page.

wxWidgets

http://www.wxwidgets.org/

The Material Editor is built using the wxWidgets cross-platform GUI library.

The latest stable release (at the time of writing, 2.8.4) can be downloaded from here.

A guide for building wxWidgets and configuring it to work with MS Visual Studio .NET 2005 can be found here. Guides for other IDE's can also be found on the wxWidgets wiki here.

wxPropertyGrid

http://wxpropgrid.sourceforge.net/

wxPropertyGrid is a property sheet control for wxWidgets. It is a specialized two-column grid for editing properties such as strings, numbers, flagsets, string arrays, and colors.

The Material Editor allows users to modify the various properties of materials, techniques, passes, and texture units.

The latest stable release and installation instructions can be downloaded from here.

NOTE: This should be installed AFTER wxWidgets.

wxScintilla

http://wxcode.sourceforge.net/showcomp.php?name=wxScintilla

wxScintilla is a wxWidgets wrapper around the Scintilla edit control.

The Material Editor for all of it's code editing features.

NOTE: This should be installed AFTER wxWidgets.

Compiling

MS Visual Studio .NET 2005

TODO

  • Review latest FX Composer 2 release
  • Fix Known Issues
  • Implement better resource management facilities
  • Implement basic scene management
  • Finish Project persistence
  • Improve synchronization between code editors & other UI components
    • Possibly create a custom MaterialSerializer?
  • Make runtime render system switches fully functional

Known Issues

  • Edit menu items enablement state does not update
  • Default wxColourProperty does not support alpha
    • Use a float array for now until the HDRColourProperty is created?

References

Ogre Manual

http://www.ogre3d.org/docs/manual/manual_14.html#SEC23

http://www.ogre3d.org/docs/manual/manual_15.html#SEC31

http://www.ogre3d.org/docs/manual/manual_16.html#SEC35

http://www.ogre3d.org/docs/manual/manual_17.html#SEC62

http://www.ogre3d.org/docs/manual/manual_18.html#SEC89

http://www.ogre3d.org/docs/manual/manual_19.html#SEC97

http://www.ogre3d.org/docs/manual/manual_20.html#SEC98

http://www.ogre3d.org/docs/manual/manual_21.html#SEC99

http://www.ogre3d.org/docs/manual/manual_22.html#SEC105

http://www.ogre3d.org/docs/manual/manual_23.html#SEC106

http://www.ogre3d.org/docs/manual/manual_24.html#SEC113

http://www.ogre3d.org/docs/manual/manual_25.html#SEC119

Books


Forum Posts

http://www.ogre3d.org/phpBB2/viewtopic.php?t=33484

http://www.ogre3d.org/phpBB2/viewtopic.php?t=32212

http://www.ogre3d.org/phpBB2/viewtopic.php?t=32202

http://www.ogre3d.org/phpBB2/viewtopic.php?t=32176

http://www.ogre3d.org/phpBB2/viewtopic.php?t=31893

http://www.ogre3d.org/phpBB2/viewtopic.php?t=31894

http://www.ogre3d.org/phpBB2/viewtopic.php?p=189833&sid=6c8483bb9967b2b3ade8c2c88e16d350

http://www.ogre3d.org/phpBB2/viewtopic.php?t=32072&sid=ce193664e1d3d7c4af509e6f4e2718c6

http://www.ogre3d.org/phpBB2/viewtopic.php?t=29941&highlight=

http://www.ogre3d.org/phpBB2/viewtopic.php?t=27512

http://www.ogre3d.org/phpBB2/viewtopic.php?start=75&t=20652