TGEA Material Editor
by Travis Vroman · 12/11/2008 (2:56 pm) · 34 comments
I have messed around with TGEA quite a lot since it was released. Since that time, I have learned to make assets for it as well as scripted objects. I've even made a few environments in it. One thing - a major thing - that has always bothered me from the beginning is the fact that you must manually script out all of your materials. This commonly meant reloading the map for changes, or having to bounce back and forth between a text editor and TGEA using reloadMaterials() to see your changes. This is fine when you only have a few materials in a scene, but once you get past a few dozen materials, it gets VERY tiresome.
I figured someone might have been working on something like this, but never found anything. I even read somewhere in the forums that nobody wanted to tackle it. (Please forgive me as I can't remember where the post was.)
For this reason, I have begun development of an integrated material editor for TGEA. The idea here is I want the editor to be fully integrated so that as a material is edited in the window, those changes are also reflected in the mission the user has open.
Here is a current snapshot of what I have running after about 2 days' work:

All the controls shown on the screen are fully functional. The controls for the specular are even dynamic, meaning as you move the sliders, the changes are reflected on screen.
Please bear in mind this is FAR from done, but I wanted to post what I have done so far. Also note that the interface is abysmal, and will be cleaned up a lot once I have everything working.
At the moment, I only have control over a hardcoded material, but that will change by the next update. However, the editor already writes the material script out to a file and saves it whereever the user decides to place it. CustomMaterials are not supported yet.
Features I plan to add to this include the following:
1. Load an existing material from any materials.cs script.
2. Material naming (currently hardcoded).
3. Preview cylinder.
4. Preview sphere.
5. Ability to change preview shapes (and also to load custom shapes!)
6. Ability to choose from material or customMaterial.
7. Shader options.
8. Texture animation control.
I'm sure there will be more that I have mentioned as far as features, but that was all I could think of off the top of my head.
Constructive criticism is welcome and encouraged. Also, if there are features anyone would like to see added, please speak up!
-Travis Vroman
I figured someone might have been working on something like this, but never found anything. I even read somewhere in the forums that nobody wanted to tackle it. (Please forgive me as I can't remember where the post was.)
For this reason, I have begun development of an integrated material editor for TGEA. The idea here is I want the editor to be fully integrated so that as a material is edited in the window, those changes are also reflected in the mission the user has open.
Here is a current snapshot of what I have running after about 2 days' work:

All the controls shown on the screen are fully functional. The controls for the specular are even dynamic, meaning as you move the sliders, the changes are reflected on screen.
Please bear in mind this is FAR from done, but I wanted to post what I have done so far. Also note that the interface is abysmal, and will be cleaned up a lot once I have everything working.
At the moment, I only have control over a hardcoded material, but that will change by the next update. However, the editor already writes the material script out to a file and saves it whereever the user decides to place it. CustomMaterials are not supported yet.
Features I plan to add to this include the following:
1. Load an existing material from any materials.cs script.
2. Material naming (currently hardcoded).
3. Preview cylinder.
4. Preview sphere.
5. Ability to change preview shapes (and also to load custom shapes!)
6. Ability to choose from material or customMaterial.
7. Shader options.
8. Texture animation control.
I'm sure there will be more that I have mentioned as far as features, but that was all I could think of off the top of my head.
Constructive criticism is welcome and encouraged. Also, if there are features anyone would like to see added, please speak up!
-Travis Vroman
About the author
Attended the Art Institute of Fort Lauderdale for Video Game Art and Design. Strong background in traditional visual arts. Strong programming skills, particularly in real-time solutions.
#22
I think it is good to go as is with said options..
Don't want to make it overly convulated and unintuitive with tonnes of options.. would defeat the purpose. It's an art tool afterall, for artists.. no?
12/12/2008 (4:06 am)
Yes Please! .. super stuff travis ..anychance of getting me filthy mitts on this?I think it is good to go as is with said options..
Don't want to make it overly convulated and unintuitive with tonnes of options.. would defeat the purpose. It's an art tool afterall, for artists.. no?
#23
A function I have been missing so badly. Will speed up, and simplify things a lot.
And I agree with eb a "text box" to write your own lines to the material would be very nice to have.
Keep up the nice work!
12/12/2008 (5:20 am)
Great Travis!A function I have been missing so badly. Will speed up, and simplify things a lot.
And I agree with eb a "text box" to write your own lines to the material would be very nice to have.
Keep up the nice work!
#24
12/12/2008 (5:59 am)
I would say support for different stages would be an important feature of any tool like this.
#25
Thanks for you answer on that. Interesting stuff indeed. Although I must ask where Matt's title of "Rogue" came from. :P Reading that made me think of the Saturday Night Live Celebrity Jeopardy when "Sean Connery" says to "Alex Trebeck" - "Oh, I'll play your game you rogue..."
@Tom Bampton:
Yes, this I am aware of. I actually have built in a check to make sure that the user does not create a material with only a diffuse, as it would be redundant. This fact will also be covered in the documentation.
@Matt Fairfax: I know 1.7.x creates these automatically, but does any version below this do that as well? I want to investigate making this backward compatible with older versions of TGEA.
Also, having the title of Rogue is awesome. Although, if it's true you are one, you knew I was thinking that before I typed it :P
@eb:
Great idea! A multiline textbox for custom additions would not be hard to add at all. Adding it to the list.
@Barry Gallagher:
I have been actually considering the idea of having two modes - a Basic Mode with very simple (but limited) options and an Advanced Mode (the part I am making now, with all the bells and whistles.) Some feedback on that idea would be greatly appreciated.
And in reference to the "filthy mitts"... :P
It's going to be a little while before I release this. I can't stand releasing buggy software. I will post something when I have a more definite idea of when this will be done.
@Jay Verba:
I assume by stages you mean render passes, and that is something that I have already begun implementing, it's just not present on the interface as of this snapshot. It should be there by the next Milestone.
Thanks again for the comments guys! I will keep you all posted with my progress. Again, suggestions and crits are welcome and encouraged!
-Travis Vroman
12/12/2008 (6:23 am)
@David Montgomery-Blake:Thanks for you answer on that. Interesting stuff indeed. Although I must ask where Matt's title of "Rogue" came from. :P Reading that made me think of the Saturday Night Live Celebrity Jeopardy when "Sean Connery" says to "Alex Trebeck" - "Oh, I'll play your game you rogue..."
@Tom Bampton:
Yes, this I am aware of. I actually have built in a check to make sure that the user does not create a material with only a diffuse, as it would be redundant. This fact will also be covered in the documentation.
@Matt Fairfax: I know 1.7.x creates these automatically, but does any version below this do that as well? I want to investigate making this backward compatible with older versions of TGEA.
Also, having the title of Rogue is awesome. Although, if it's true you are one, you knew I was thinking that before I typed it :P
@eb:
Great idea! A multiline textbox for custom additions would not be hard to add at all. Adding it to the list.
@Barry Gallagher:
I have been actually considering the idea of having two modes - a Basic Mode with very simple (but limited) options and an Advanced Mode (the part I am making now, with all the bells and whistles.) Some feedback on that idea would be greatly appreciated.
And in reference to the "filthy mitts"... :P
It's going to be a little while before I release this. I can't stand releasing buggy software. I will post something when I have a more definite idea of when this will be done.
@Jay Verba:
I assume by stages you mean render passes, and that is something that I have already begun implementing, it's just not present on the interface as of this snapshot. It should be there by the next Milestone.
Thanks again for the comments guys! I will keep you all posted with my progress. Again, suggestions and crits are welcome and encouraged!
-Travis Vroman
#26
12/12/2008 (8:59 am)
I bought the plastic tweaker and couldnt ever get it to work... I'd love to use this. Great Work!! Keep it up! And why hasn't GG already done this???
#27
12/12/2008 (11:03 am)
Im looking forward to this :) Nice work!
#28
This is going to be used alot! VERY interesting work you are doing Travis!
12/12/2008 (12:06 pm)
Aaah the future looks brighter yet!This is going to be used alot! VERY interesting work you are doing Travis!
#29
Will
12/12/2008 (12:32 pm)
@MB: You either huh? PT looked like a nice tool but I found it to be sitting more then actually using it, even after they tried to help with support on how to get it working. I wasn't thrilled with it in the end. Hope this editor comes through better in the end. Just have to wait and see. Looks like a good start.Will
#31
12/13/2008 (4:50 am)
I was think that it might be an idea to have the specular power set to a slider, rather than a numerical input as this would allow the user to see the value he/she needs rather than guessing.
#32
12/13/2008 (2:44 pm)
I want it...... looks great
#33
12/13/2008 (5:33 pm)
This is a great accomplishment. Thank you for taking over an aspect that others outside of the Torque community have capitalized on to an obnoxious degree (I will not mention companies).
#34
02/10/2009 (7:24 am)
Any updates on this Travis? This would be so helpful to everyone. How about a way to load different shaders and test them out too?
#35
10/15/2009 (2:30 pm)
hi, where i can download it? why not give us as resource?, remember that T3D have one... please share... thanks... ;D 
Torque Owner TheGasMan
G.A.S. [+others]
Could you add a "text box" so that we could add a few lines of our own to any material ?