Game Development Community

dev|Pro Game Development Curriculum

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:

i393.photobucket.com/albums/pp17/barzahd1/materialEditorDevSnapshot.jpg
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.

Page «Previous 1 2
#1
12/11/2008 (3:04 pm)
That looks really great. Good Work.
The only thing I can compare what your doing to is the Plastic Tweaker.

A feature I see in your shot, but would really like to work for my own self is the MAPTO feature.
It would be nice to be able to change the name and see it update live.

As well, it would be beneficial to have these changes saved once done.

Great Work! - This would save so much time tweaking the Material.cs file!
#2
12/11/2008 (3:16 pm)
Awesome Travis!!! Simply awesome.

I suggested a similar approach many times. Something along the lines of CrazyBump but as in integrated part of the development pipeline.

I can't wait to give this thing a spin.

Best of luck with it.
#3
12/11/2008 (3:38 pm)
Me likey.
#4
12/11/2008 (4:03 pm)
This, is once again exactly what these engines need.

Very good work, and best wishes.
#5
12/11/2008 (4:16 pm)
Wow. All I can do is echo what everyone else has said. Great work there. :-)
#6
12/11/2008 (5:51 pm)
Excellent work! I'm looking forward to trying this out. Will be very useful for me as well as nearly everyone else here.
#7
12/11/2008 (6:07 pm)
Once again you prove how much more important the community is to Torque than GarageGames itself. Good job.

GarageGames - Please hire some of these people.
#8
12/11/2008 (6:08 pm)
Great, can't wait to try it out.
#9
12/11/2008 (7:00 pm)
Great job on the material editor. Looks very nice. I'm not sure about the difficulty of adding the MapTo, but I definitely agree with Surge that it would be an excellent addition.

@Marcus
We do hire a lot of "these people". We also contract a lot of "these people". We have a great community which is a major asset, but your implication that we do not care about Torque is ludicrously off the mark.
#10
12/11/2008 (7:19 pm)
Wow, thanks for the comments guys! It's funny you all mentioned the MapTo. I -just- got it working about 10 minutes ago.

@Surge:
I saw the Plastic Tweaker, and its awesome. Hell of a job done there. However, my goal here is to make something strictly dedicated to materials because I feel Torque deserves one:) Also, all changes are saved when the "Apply" button is pressed.

@Todd Pickens:
I like CrazyBump's interface layout, and now that you mention it, it does have it similarities :)

@David Montgomery-Blake:
Just out of curiosity, what types of things does GarageGames contract out?
#11
12/11/2008 (7:35 pm)
Sweet, Cool, I like it!
#12
12/11/2008 (8:03 pm)
It really depends. The new audio layer in TGE 1.7 was contracted to Sickhead Studios since Spillman and co do excellent work. At the bottom of Brett's blog on TGEA 1.8 are a small list of some amazing community members who have been contracted because they have shone like stars in the community. Torque 2D started back in the day as Melv's pet project and has evolved into a wonderful 2D engine. You might also check out the employee pages to see who has been hired on from the community. Scamps like that rogue Matt Fairfax and the nefarious Michael Perry have been pulled on-board and are making some amazing changes to the core engine as well as providing well-deserved thanks for documentation.

So we contract a lot of people to work on a lot of projects. I'm contracted for community management. It really depends on the needs that we have and where the strengths of our community lie.
#13
12/11/2008 (8:26 pm)
Fantastic.
#14
12/11/2008 (8:29 pm)
Keep working on this one - it would be a really useful resource
#15
12/11/2008 (8:32 pm)
@David- I took Marcus more as a high compliment to the outstanding work by a lot of dedicated community members and not so much of a slight to GG people (I hope not anyway).
#16
12/11/2008 (8:56 pm)
Good idea, this will be quite useful, even moreso if you get custom materials working at some point.
#17
12/11/2008 (11:11 pm)
@jydog - Exactly ;)
#18
12/11/2008 (11:29 pm)
Small point, but you don't need a material definition for all your materials anymore. TGEA will automatically create one if it tries to load a texture that has no material. Thus, you only need materials for things that require more than just a base texture and a mapTo.

Note: The above is true for 1.8, dont know about 1.7.x
#19
12/12/2008 (12:57 am)
TGEA 1.7.x also automatically creates diffuse only Materials if you don't define one ahead of time.
#20
12/12/2008 (2:42 am)
Looks like a tool with some great potential Travis! Keep it up, gonna be watching this one closely!! :D

~C
Game Dev Journal
Page «Previous 1 2