[Accepted] Ogre Material Editor
- Hudson
- Halfling
- Posts: 60
- Joined: Thu Sep 14, 2006 2:46 pm
- Location: NY
- Contact:
-
- Greenskin
- Posts: 116
- Joined: Fri Jul 28, 2006 9:35 am
- Contact:
I think there are two ways to do this. One, is like FXComposer, Rendermonkey, etc., in that you have a real-time update of the material you are working on. TBH I am amazing Ogre doesn't have one already, but not being a programmer, I can't complain. However, having a decent shader language knowledge and knowing the Ogre material system would be a requirement.
The other, is the Unreal3/Offset node-based GUI material editor. Also, the interface for ShaderFX (www.lumonix.net) is extremely similar, and they have a free trial version if you have 3dsmax. This is harder to do, but more intuitive, but at the end also produces dirtier code you don't have great control over, that would need to be cleaned in the end anyway. If you go this route, I'd suggest speaking to Ben Cloward and Kees, the guys behind ShaderFX, as they can give you some estimate of the work involved with something like that... I think it is quite large, maybe more than this SoC can allot for.
Ideally, I'd like to see both in the same tool, and I think its possible. However, I would call the first version (FXComposer-like) fundamental, though having a node-based sandbox solution would give artists much greater control over Ogre's material system... I've been able to achieve some amazing shaders and visuals with Ogre because both art and shaders. And when artists either learn a shading language, or get tools like Offset Editor/UE3 ed/ShaderFX, graphical fidelity is always going to go up (and framerates down!) because the artist's eye is more adept at what it is materials do (represent a surface).
The other, is the Unreal3/Offset node-based GUI material editor. Also, the interface for ShaderFX (www.lumonix.net) is extremely similar, and they have a free trial version if you have 3dsmax. This is harder to do, but more intuitive, but at the end also produces dirtier code you don't have great control over, that would need to be cleaned in the end anyway. If you go this route, I'd suggest speaking to Ben Cloward and Kees, the guys behind ShaderFX, as they can give you some estimate of the work involved with something like that... I think it is quite large, maybe more than this SoC can allot for.
Ideally, I'd like to see both in the same tool, and I think its possible. However, I would call the first version (FXComposer-like) fundamental, though having a node-based sandbox solution would give artists much greater control over Ogre's material system... I've been able to achieve some amazing shaders and visuals with Ogre because both art and shaders. And when artists either learn a shading language, or get tools like Offset Editor/UE3 ed/ShaderFX, graphical fidelity is always going to go up (and framerates down!) because the artist's eye is more adept at what it is materials do (represent a surface).
- Hudson
- Halfling
- Posts: 60
- Joined: Thu Sep 14, 2006 2:46 pm
- Location: NY
- Contact:
@Professor420
I'd really like to see both of these in the same tool. I really like the graphical editor, like the one in ShaderX and other tools listed previously in this thread.
My plan is, as you said, to create the FXComposer/RenderMonkey like interface first; but this will provide me with a good foundation onto which I can later develop the graphical editor on top of.
I'd really like to see both of these in the same tool. I really like the graphical editor, like the one in ShaderX and other tools listed previously in this thread.
My plan is, as you said, to create the FXComposer/RenderMonkey like interface first; but this will provide me with a good foundation onto which I can later develop the graphical editor on top of.
- JustinWalsh
- OGRE Retired Team Member
- Posts: 209
- Joined: Mon Sep 05, 2005 8:11 pm
- Location: Phoenix, AZ
- Contact:
I'm really excited about this tool and I wish you the best on getting it going.
I just wanted to pop-in and drop down some suggestions.
- I think if you where to use something like wxScintilla for the text editing, things like auto completion and syntax highlighting will be a breeze.
- It would also be wicked sweet if the highlighters and auto-completions had a plugin architecture, so others could develop the Cg, HLSL, and GLSL highlighters and auto-completion.
- My justification for such a system is that I have yet to find a cross platform environment for shader development, and this application could be the first. Also if you developed the highlighter and auto-completion system as a plugin architecture you would be free to implement the additional features later or the community could pitch in.
I just wanted to pop-in and drop down some suggestions.
- I think if you where to use something like wxScintilla for the text editing, things like auto completion and syntax highlighting will be a breeze.
- It would also be wicked sweet if the highlighters and auto-completions had a plugin architecture, so others could develop the Cg, HLSL, and GLSL highlighters and auto-completion.
- My justification for such a system is that I have yet to find a cross platform environment for shader development, and this application could be the first. Also if you developed the highlighter and auto-completion system as a plugin architecture you would be free to implement the additional features later or the community could pitch in.
The blog: http://blog.trickyfly.com/
- CaseyB
- OGRE Contributor
- Posts: 1335
- Joined: Sun Nov 20, 2005 2:42 pm
- Location: Columbus, Ohio
- x 3
- Contact:
-
- Kobold
- Posts: 39
- Joined: Sat Sep 23, 2006 10:09 am
Maybe this can help you!
Blender 2.43 - Render Passes
http://www.blender.org/development/rele ... er-passes/
Blender 2.43 - Imaging & Playback
http://www.blender.org/development/rele ... 3/imaging/
Blender 2.43 - Render Passes
http://www.blender.org/development/rele ... er-passes/
Blender 2.43 - Imaging & Playback
http://www.blender.org/development/rele ... 3/imaging/
- Hudson
- Halfling
- Posts: 60
- Joined: Thu Sep 14, 2006 2:46 pm
- Location: NY
- Contact:
@JustinWalsh
Yeah I plan on using wxScintilla.
I actually downloaded the source code for Code::Blocks the other day to look at how they handle this. This page gives a pretty good overview of how lexers can be added to Code::Blocks.
The bad news is, looking at wxscintilla.h it appears that none of the shader languages are supported, rendering the Code::Blocks approach inadequate. Which leaves me implementing the lexers the old fashioned way described here.
I haven't spent much time looking into this yet though... the code editors will likely be pretty basic in the beginning, being refined later after much of the other core functionality is in place.
Yeah I plan on using wxScintilla.
I actually downloaded the source code for Code::Blocks the other day to look at how they handle this. This page gives a pretty good overview of how lexers can be added to Code::Blocks.
The bad news is, looking at wxscintilla.h it appears that none of the shader languages are supported, rendering the Code::Blocks approach inadequate. Which leaves me implementing the lexers the old fashioned way described here.
I haven't spent much time looking into this yet though... the code editors will likely be pretty basic in the beginning, being refined later after much of the other core functionality is in place.
-
- Ogre Magi
- Posts: 1266
- Joined: Tue Aug 12, 2003 1:53 am
- Location: Melbourne, Australia
- x 1
- Contact:
[quote="redmonk"]Maybe this can help you!
Blender 2.43 - Render Passes
http://www.blender.org/development/rele ... er-passes/
Blender 2.43 - Imaging & Playback
http://www.blender.org/development/rele ... 3/imaging/
quote]
man, I really like the direction blender is heading. To avoid hijacking the thread can you PM me if blender can/is planning to make the material node editor be able to create game shader code? Like ShaderFX for max (google it, it's cool)
Blender 2.43 - Render Passes
http://www.blender.org/development/rele ... er-passes/
Blender 2.43 - Imaging & Playback
http://www.blender.org/development/rele ... 3/imaging/
quote]
man, I really like the direction blender is heading. To avoid hijacking the thread can you PM me if blender can/is planning to make the material node editor be able to create game shader code? Like ShaderFX for max (google it, it's cool)
- Hudson
- Halfling
- Posts: 60
- Joined: Thu Sep 14, 2006 2:46 pm
- Location: NY
- Contact:
Just a quick update on my progress:
- Completed basic application layout
- Created a custom lexer in Scintilla that supports the syntax coloring of Ogre Material Scripts
- Began developing a lexer in Scintilla that supports the syntax coloring of HLSL/GLSL/Cg
- Began developing a Workspace/Project concept similar to the one found in ATI RenderMonkey
Here is a screen shot: (click for larger image)
I'm beginning to concentrate on work that is more "behind the scenes"... specfically the code handling the interaction between the UI elements and Ogre (the "controller" in MVC).
- Completed basic application layout
- Created a custom lexer in Scintilla that supports the syntax coloring of Ogre Material Scripts
- Began developing a lexer in Scintilla that supports the syntax coloring of HLSL/GLSL/Cg
- Began developing a Workspace/Project concept similar to the one found in ATI RenderMonkey
Here is a screen shot: (click for larger image)
I'm beginning to concentrate on work that is more "behind the scenes"... specfically the code handling the interaction between the UI elements and Ogre (the "controller" in MVC).
- Praetor
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
- Kencho
- OGRE Retired Moderator
- Posts: 4011
- Joined: Fri Sep 19, 2003 6:28 pm
- Location: Burgos, Spain
- x 2
- Contact:
- inneractive
- Gnoblar
- Posts: 19
- Joined: Sun Jun 03, 2007 2:32 am
- Location: Bay Area, California
- Contact:
- Evak
- Orc Shaman
- Posts: 707
- Joined: Sun Apr 02, 2006 7:51 pm
- Location: Sacramento, CA
- x 1
- Contact:
I've been playing with shaderFX and for a non programmer its awesome. It's a shame that I can't get the .FX files into ogre Yet.
The biggest problem for shader creation tools that artists can use, isn't so much creating them, but having to tweak them to work in Ogre, or double tweak them to pass parameters that ofusion can write your material scripts from.
It seems that the most common format is DXSAS, that is slowly being adopted by many engines, its a shame that Ogre isn't one of them.
I'm kind of hoping that a custom solution like this may eventually allow some ways to convert shaders without having to know how to code.
The biggest problem for shader creation tools that artists can use, isn't so much creating them, but having to tweak them to work in Ogre, or double tweak them to pass parameters that ofusion can write your material scripts from.
It seems that the most common format is DXSAS, that is slowly being adopted by many engines, its a shame that Ogre isn't one of them.
I'm kind of hoping that a custom solution like this may eventually allow some ways to convert shaders without having to know how to code.
- Praetor
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
We are reluctant you adopt anything that can only be implemented in one rendering subsystem. A directx-only solution is not ideal. We like to tackle the problem the other way, make Ogre material system as robust and feature-rich as possible, and provide ways to get your stuff into that format. Obviously that last bit isn't easy. That's why tools like this material editor are so important to the community.Evak wrote: It seems that the most common format is DXSAS, that is slowly being adopted by many engines, its a shame that Ogre isn't one of them.
-
- Greenskin
- Posts: 116
- Joined: Fri Jul 28, 2006 9:35 am
- Contact:
http://lumonixsoftware.com/yabb/YaBB.pl?num=1179634232Evak wrote:I've been playing with shaderFX and for a non programmer its awesome. It's a shame that I can't get the .FX files into ogre Yet.
The biggest problem for shader creation tools that artists can use, isn't so much creating them, but having to tweak them to work in Ogre, or double tweak them to pass parameters that ofusion can write your material scripts from.
It seems that the most common format is DXSAS, that is slowly being adopted by many engines, its a shame that Ogre isn't one of them.
I'm kind of hoping that a custom solution like this may eventually allow some ways to convert shaders without having to know how to code.
I just need to actually finish and upload the material and program code. Then I'll add it to the wiki as well.
I'm personally a big fan of Ogre's material system, even though I only use HLSL right now. Its really easy to keep nice and tidy once you get a grip on the pipeline. The only qualm I have is not with the material system, but that if I change a gloss parameter I need to reload my app (ie, a lack of tools). It would be great to do it realtime (think FXComposer), which I think/hope is what this editor is addressing.
- Hudson
- Halfling
- Posts: 60
- Joined: Thu Sep 14, 2006 2:46 pm
- Location: NY
- Contact:
@Professor420
Excellent write up!
Interesting that they save everything as one file, RenderMonkey saves the entire workspace as one file as well.
I've been thinking about how I should handle persistence in this editor. I'm leaning towards saving everything in a Project (projects can contain one or more Materials... similar to RenderMonkey Effect Groups) to a zip file... possibly with the option to pull in all the referenced textures, meshes etc (in case you really wanted to transfer everything easily to another machine and/or send to someone else). The UI would of course allow you to save everything individually as well.
Excellent write up!
Interesting that they save everything as one file, RenderMonkey saves the entire workspace as one file as well.
I've been thinking about how I should handle persistence in this editor. I'm leaning towards saving everything in a Project (projects can contain one or more Materials... similar to RenderMonkey Effect Groups) to a zip file... possibly with the option to pull in all the referenced textures, meshes etc (in case you really wanted to transfer everything easily to another machine and/or send to someone else). The UI would of course allow you to save everything individually as well.
Yes that's certainly one of the goals!Professor420 wrote: It would be great to do it realtime (think FXComposer), which I think/hope is what this editor is addressing.
- Praetor
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
I think a clear split between "editing" and "real-time use" is a good idea. What I mean by that is that while editing, you can save workspaces, or projects, or whatnot, as a single file somewhere. You can save your work, and the editor is allowed to insert any extra data it needs in order to make the editing experience easier. When you are ready you can export your work for real-time use. This means taking a material from the project and "exporting" it to a material script, or exporting a project wholesale to a directory, where the project's material script, shaders, and texure all appear. Yeah, I'd go with the packaged project file idea.
- CaseyB
- OGRE Contributor
- Posts: 1335
- Joined: Sun Nov 20, 2005 2:42 pm
- Location: Columbus, Ohio
- x 3
- Contact:
I agree, and I think that's what's going to be going on. When you "save" it will save in some internal format and then you can export to an Ogre Material, which will create the appropriate directory structure and everything for use in real-time applications.Praetor wrote:I think a clear split between "editing" and "real-time use" is a good idea.
-
- Kobold
- Posts: 39
- Joined: Sat Sep 23, 2006 10:09 am