Wednesday, December 23, 2009

3D Modeling: Mech Animation

My goal was to model a mech robot. When I first started this model I thought it would be a lot faster than an organic object like a human. And, my first attempt was really fast.
It took me about 5-10 minutes to make this model:


But, when I tried to texture it I found that it was quite a different process. Instead of being one model, it's more like creating a collection of models. I attempted to texture it twice before I realized this wasn't working. So, I decided to take a different approach. I created a few parts that I could reuse in multiple places and textured them individually. The result was a much nicer model.
Here is the video of the walk sequence.

video

Going through this process exposed a few bugs in my program that needed attention. My process involves using my tools and discovering things that need improvement or are missing. Then, fixing the tool so that things go smoother. The reward for me is not only the model but the ritual. Someone recently told me that a good programmer has to be a perfectionist. Always paying attention to every detail. There's another profession I can think of that requires that same skill. Only it comes from the other hemisphere of the brain...

Happy Coding!
Jason

Sunday, November 29, 2009

Major Tom

This weekend I worked on reproducing the "Major Tom" song by Peter Schilling. I threw some pictures together to create this video for it.

video
While I was making this song my computer started to wig out. It would shut down after about 10 minutes and wouldn't restart. Well, I checked to make sure everything was properly seated, accidentally dropped the whole thing, and that seems to have done the trick. Now I'll be able to finish the end of the song properly.

Jason

Sunday, November 01, 2009

DirectX Shaders - Specular Highlighting

I've been working on shader support for my editor for the last few days. So far I've been able to apply a basic vertex and pixel shader to the directx rendering pipeline. My goal is to make some basic material parameters available to the user without getting too complex.

This picture is shows a model (1900 triangles) I made in the tool and the specular highlighting I was playing with. Note how he kind of looks like he is made out of plastic.



I'm REALLY close to a beta on the editor. I'm down to wrapping up the materials and finishing up the help files and I should have a downloadable version here before the year is up. I've been really busy with a class lately so that kind of slowed things up.

Happy Coding!
Jason

Thursday, October 29, 2009

Brain Processing Theory - Processor 4 on fire!



A few years ago a friend of mine was describing his brain like a computer, which originally had four processors. And, as you get older these processors start to burn out. I thought it was a good illustration and then the other day I realized that I think I lost a processor!

I was sitting there trying to remember "The Magic Solution" I came up with for a problem at work. Although I could remember the "What" it was supposed to do, the "How" seemed to have slipped my mind. It was like I had lost a few of the essential puzzle pieces. I just couldn't walk through the thought process to come to that solution. This is when I noticed the smoke coming out of processor 4! And, processor 3 mockingly pipes in with the Brain Processing Theory.

I sit in denial forcing myself to load "The Magic Solution" back into memory only to receive negative response from processors 1-3. They reply: "We don't want anything to do with work from processor 4 or anything else that requires 4 processors! And next time you better be ready to bargain with some sugar or something."

Now, I'm missing processor four. But, maybe the Brain Processing Theory needs to be expanded just a little... Maybe its a type of self preservation? Maybe Processor 4's main purpose wasn't to process mass quantities of variables and detailed designs and it just decided that enough was enough? Maybe all the processors are in on it and they're taking turns on vacation? No... I'm in denial again. I'm just down to 3 processors at 34. But, I guess there's always a bright side......... Darn it! That must have been on processor 4!

Has this happened to you? Let me know.

Happy Coding!

Jas

Tuesday, July 28, 2009

Advertised Shortcuts: Remember the Mulder!

I ran into a strange issue with an installer the other day. I needed to update two computers so I walked over and copied a new exe into the install directory and walked away. Three days later I noticed that the old program was back on those computers. Were these the same computers? All of the settings changes I made were still there.

A week later, I ran another program and noticed that everytime I performed a task that created any kind of files, the program showed a reinstalling form when trying to run it from the shortcut. I also noticed the shortcut target was not the exe. Hmm, this sounds like something from one of those Microsoft Conferences last year that they were raving about... Something about how Word could be damaged and even uninstalled and would be automatically fixed...

Welcome to Advertised Shortcuts! This behavior is part of the "resiliency" feature of the Windows Installer. When you create a shortcut with your install package they aren't shortcuts to your program. They are shortcuts to the Windows Installer which will check the version installed and if it is modified, will change it back to the proper state. It triggers resiliency.
http://support.microsoft.com/?id=290997
newsgroup info: Clicking on created shortcut trigers...

There are definately some benefits to this feature. For example, it blows away your app if it gets a virus. And, it gives you a warm and fuzzy feeling to know that your software is not going to be abused by someone.

Now for the really bad news. This can be a problem if your program has any external files in the target directory. For example, log files, data files, config files (including changes to the exe.config), temp files, etc. If your program changes anything in there, the next time you click on it, POW! You've just triggered resiliency. Which means your user is watching an installer run and boy I hope it works because if it doesn't they won't be happy. Wait they don't have access rights to install? Oops. Time to panic.

Okay, surely there's a way to just configure the installer package to not use advertised shortcuts? NOPE!! The answer suggested is to use another utility besides Visual Studio to make the installer package such as WIX or InstallShield. Huh? Have you tried WIX? You've just turned your 1 hour install package into an 8 hour march of death. 6 months from now some other programmer will stare in disbelief at that WIX package wondering whether you were chasing the dragon on that day.

There is actually only one flag that needs to change in the install package.
It is: DISABLEADVTSHORTCUTS and it needs to be set to 1.

Now, for the really really bad news. There is no GUI support for this flag! Don't worry, there's a solution.:) What you have to do is download the "Installer SDK" from Microsoft. No, I'm not kidding... You have to install the Installer SDK! You know we all have that. :)

Then, you run ORCA which is a tool to manipulate the data tables for a package and you add this property into the Property tables manually after you build the installer.

If you want to set it up as a Post Build Event in visual studio it is possible. Follow the instructions here:
http://www.discussweb.com/c-programming/13643-advertised-shortcuts-installers-how-avoid.html

Wait, you don't like this solution? Well, some people write a custom step in their installer or even there executable to delete the advertised shortcuts and put back regular ones using IShellLink. (Refer to the last link if you want to go this route).

So, the moral of this story kids is installers are getting scary. Or rather, the Operating System you're installing on is paranoid and suffering mental disorders. Remember, Mulder from X-files? TRUST NO ONE.

REMEMBER THE MULDER!
AND
HAPPY CODING!
Jason

Wednesday, July 15, 2009

Hard at Work

It's been awhile since a post. I thought I would throw this up here. This is a picture of me hard at work at the office.



I've been working for the past few months on about 80 updates to my 3D editor. Definately a move in the right direction. I'm currently testing the registration and update system and rewriting a better UV Mapping editor/ art tool. I'm hoping to post some tutorials here on how to use the program when it is ready for download. Beta version will be done soon.

At the office, I'm working on extracting data from a word form and putting the data in another word form. Fun stuff. I have a nice little tool that uses a rules file to convert the documents.

Remember to have lots of beverages when coding! That way you get out of your chair at least once an hour whether you want to or not. :)

Happy coding!
Jas

Tuesday, June 16, 2009

What superhero am I?

Your results:
You are Superman
























Superman
80%
Green Lantern
65%
Iron Man
65%
Hulk
60%
Spider-Man
55%
Supergirl
55%
Wonder Woman
50%
The Flash
50%
Catwoman
50%
Batman
40%
Robin
32%
You are mild-mannered, good,
strong and you love to help others.


Click here to take the "Which Superhero are you?" quiz...

Sunday, February 08, 2009

XNA Game Project


I've been working on a demo project in XNA. This completes my content process for games. I first use my own model editor (going into beta this year) to create the geometry and animations and export a .x file. The level is built in a custom level editor tool we've written for this XNA project, and everything is pulled together in an XNA game engine.


My first goal for this phase of the project was to animate a .X model in XNA. I searched around on the web and found samples and found one that was close. I started with the skinning sample that is available for download from the XNA Creators Club. It animates a bald soldier ("dude") .FBX file. The issue with this code is that it rendered FBX files AND .X format, but it didn't do any blending between the key frames. This wasn't a problem for the sample model "dude" because it had a ton of frames, but for my animation that was only 10 or so key frames, it posed a real problem. So, I rewrote the code, preprocessor, and HLSL .fx files to properly load and animate .x files. After that, I had used some level editing code to create a height map and load my own model and have him walk around on the height map.


Here is a video of my western character running around on a test height map. It demonstrates character animation and basic height collision.


video

My next goal will be to add some objects with collision such as buildings, towers, and other objects the character can jump on. I'll also be animating a frog for an elementary school project coming up here real quick. I would love to here from anyone on ways to handle objects and areas such as a multi-floored building that the character can go into.


Happy Coding!
Jason