Wednesday, June 03, 2009

Drag and drop materials

Keeping in line with the 'everything is visual' motivation of the editor, I have added the ability to drag and drop materials from the resource browser onto the 3D scene. The materials themselves offer a live preview in the resource browser while the mouse is over it. As it is dragged into the scene, cursor feedback shows when the material can be dropped and when it cannot. I may add the ability to actually live preview it in the scene as well, applying it to the current object that is under the cursor.

View in High-Definition (Recommended)

Download Original (3.26 MB)

Material assignment from Shawn Carroll on Vimeo.

Tuesday, May 26, 2009

Generalized resource preview

I spent a bit of time and have abstracted the resource browser and the thumbnail creator to support any SceneObject instance. All that is required is that a SceneObjectFactory be created that can return the template names of that particular SceneObject type as well as a function that can generate a SceneObject from a template name. The rest is completely generic.

Here are particle systems working inside of the resource browser. Now that I have the standalone SceneObjects done, I'll have to support things such as materials that have a 3D representation [a plane with the material on it or sphere or whatever] but aren't directly objects themselves. This will be the second phase of the browser which I will get to later.

View in High-Definition (Recommended)

Download Original (3.05 MB)

Live particle system preview from Shawn Carroll on Vimeo.

I love you Ogre/Mogre

After getting home from work, I decided to add a live preview to the resource browser. This essentially lets you see a real-time rendering of the object that is being displayed. For particle systems, it will actually show you the particle systems working in real-time directly in the resource browser. This should allow you to find just the right effect quickly.

I'll be abstracting this into my generalized resource system that I had working in my old editor version so that I can plunk in particle systems to really show it off. Here's a sample video to watch. Pay attention to the knot right at the end. You can see the material rendering in real-time. Also, ignore the box that appears when I hover over objects, that's a work in progress :)

View in High-Definition (Recommended)

Download Original (6.02 MB)

Live resource preview from Shawn Carroll on Vimeo.

Sunday, May 24, 2009

Resource Browser

I've started work on the resource browser which will hopefully make it a lot easier to find and place resources inside of the editor. Eventually, this will feature usability features such as tagging, searching, collections, and sorting but for now, it's pretty basic. There is a button in the editor to trigger the building of the thumbnails but eventually this will either be done by the asset server or by some sort of caching mechanism. For now, this works fine for me. Once you generate the thumbnails, you don't have to do it again, they just load with the editor.

Currently, you can actually drag/drop each of the mesh resources into the viewport to have them appear which is a lot easier than creating an Entity scene object and then changing the mesh reference. This is a lot more visual and fits in with the "You need to be able to build a scene with the mouse" motto that I am going for with this editor.

Wednesday, April 29, 2009

Custom Object Overlays

I've been working on adding overlays to the editor lately. Here is the design of the actual overlay that I'll be using

This will appear over objects whenever you hover over them. Any type of information will easily be displayed inside of the overlay. This will allow any object to display detailed information about itself to hopefully make it easier to find objects inside of the scene. The overlay can be toggled on and off in case it's getting in the way. It'll follow the mouse cursor around and will be shifted slightly offset as to not get in the way.

The system should be pretty automatic by allowing an OpenGL style Begin/AddTitle/AddBody/End style so the actual layout algorithm should be hidden from the user. I'll be integrating this into the actual editor over the next few days. I've also spent a bit of time scheduling out a task list for myself which should help out with getting stuff done on a regular basis. I've been really busy at home recently so I haven't done much coding in the past few weeks. That'll be changing.

Monday, April 20, 2009

MVC Patterns

I've gone back and finally implemented a model-view-controller system in my editor. I have had plans on doing this for over a year and some now but I finally got around to doing it. Basically, all of my data and algorithms on said data are stored inside of the 'model' while the 'view' of that data in terms of what the editor wants have been broken apart. The collision data for instance is something that belongs in the view since it's an interpretation of the model and only the editor cares about that. The mesh name that an entity is using belongs in the model since it is an integral part of the data. The graphical data associated with that is handled by the view since different 3D engines might represent that 3D model differently.

What this allows me to do is to work with my entire scene without having to load a 3D engine. This will work out great for tools since they can have the typed data that they want without having all of the graphical parts associated with it. We can attach different views as well for different applications.

The other important thing this allows me to do is unit test my business logic separate from my UI interactions. For example, I can now test that my terrain modeling tools provide the proper deformations or material modifications since the graphics engine doesn't need to be loaded. As I've already built up a small testing suite in NUnit, this works out really well. I can make sure that the only parts to break in the future are the UI components. If a bug is reported that is related to the business algorithms, I can fix it, write a unit test for it, and it'll never make it into the build again.

This has broken a few things that require refactoring but it'll be worth it in the end. Unit testing has proven invaluable for finding bugs in other parts that I believed my current changes couldn't possibly affect.

I'm also working on the actual resource management system again for my editor which should be pretty kick ass. I had a primitive version of what I wanted done a long time ago but I want to spend some more time on it again. It should allow for a pretty nice work flow.

Thanks to someone at work for reminding me that there is at least 1 person out there reading this. It's also nice to just have some place to ramble my thoughts off.

Sunday, February 08, 2009

Switching Back

I've been in the process of switching back to using .NET and C# to create the editor. The language itself is just much more suited to what I want to accomplish with the editor and I've always believed in using the right tools for the right job. I am now targeting the .NET platform using C# and Mogre which is a managed wrapper around Ogre.

I am also focusing my attention on usability since it will be designers and artists using the editor and not programmers. As much as the property grid is an awesome tool, it is cumbersome, unintuitive, and sometimes hard to navigate for commonly used properties. I much prefer context sensitive menu bars and toolbars. In the following shots, the green tabs are added when a specific object is clicked. This allows for the most commonly used and changed properties to be readily accessible with just a few mouse clicks. Eventually, these will become customizable so that users can drop any properties they want and remove the pre-built ones all together.