Gonzo blogging from the Annie Leibovitz of the software development world.

Month: December 2000 (Page 1 of 8)

Hi ho. Another weekend and another 4 days off. Life is grand (except for the fact that I’m on call and the pager could go off signifying some horrendous derailment on New Years Eve, oh well). My final checklist for blueprint is down to single digits so things are coming down to the wire. A couple of major things but nothing that will take weeks or anything. Just getting the functionality working. Perhaps the 1.0 release won’t have all the bells and whistles I want, but I’m planning to have weekly releases or something to add new functionality on a regular basis. The main goal is, as always, to provide a stable release that creates all the objects you want. Catcha later!

Well, fairly lengthy update today. I’ve been mulling about thinking about posting this as a new developer diary just because it gets into some techie details about how objects are structured and the multitude of things there, but this relates to blueprint progress and I figure I’ll bore you in the main page since it’s my site and I can post if I want to. Just skip this post if you don’t want the gory details.

The big news is that I figured out the best way to capture animating new objects for blueprint so the next release will support this. Not sure about multi-tile stuff, but I had to get the animation issue out of the way no matter what. Here’s why (note: I’m going to use a lot of terms that are interchangeable between The Sims, Transmogrifier and blueprint so try to bear with me. Things may get a little weird mixing phrases and jumping around concepts).

Inside an object (and IFF file) contains the sprites that tell it what it looks like. blueprint is responsible for converting the nifty 3D mesh you create/import/mess with into these sprites so your new looking object can be seen in the game. Now, sprites are the cornerstone to the look of an object. For example, take the coffee maker. It contains two different sprites. One of the coffee machine base, and one of the coffee pot itself. Why two sprites? Why not just one? Well, Maxis decided that they want to show the coffee maker with or without the pot (when a Sim picks up the pot for example). So you need two images, somehow, to represent this. So they created the base image, and a separate image of the pot. What ties them together is called a DrawGroup. The DrawGroup (however many of them in an IFF file) contains a list of sprites to draw (as well as other info about drawing them). So to draw the coffee pot, there are two DrawGroups, Coffee Maker with Pot (DrawGroup #100) and Coffee Maker without Pot (DrawGroup #101). DrawGroup #100 contains the base graphic (sprite ID #100) and the pot (sprite ID #200) whereas DrawGroup #101 just contains the base with no pot. Follow so far? Now it gets a little more complicated. blueprint is only interested in replacing the graphics (sprites) for the object, however, blueprint has no idea what composes the sprites. That’s a visual thing. You know that sprite #100 is the coffee base and #200 is the pot just by looking at them. blueprint can’t do that. So you have to tell blueprint this. What happens is blueprint will create multiple frames, one for each sprite. So if you were making a new coffee maker and used the default one from The Sims (all objects in blueprint have to be based on something already in The Sims), blueprint would create two frames that represent sprite #100 and #200. Now inside each sprite are what Transmogrifer calls SpriteFrames. These are the individual images that make up the sprite. You know that objects can be viewed from 3 zoom levels. You also know that objects can be viewed from 4 angles. This makes 12 images per sprite. Aha. “I’ve looked at the coffee maker Bil and sprite #100 is only 6 images. What gives?”. This is where Maxis made some optimizations. With the coffee base (and other objects), you can view it from the ne or nw angles just by flipping the graphic. No need to create a new one. So only two graphics per zoom, three zooms make 6 images (information in the DrawGroup tell The Sims to flip the graphic for display). So how come you can’t do the same thing with the coffee pot? It has 12 images (4 angles, 3 zooms). Think about it The coffee pot could be flipped but the position of it, relative to the coffee maker base, is stored in the sprite. If you were to tell The Sims to flip the coffee pot, it would be offset to the left or right (depending on the flip) and not line up correctly with the base. There is offset information there, but like I said, it’s stored in the sprite and a single sprite can only store one offset for the x and y values. So they made 12 images instead of 6. The DrawGroup has a list of the sprites to draw so DrawGroup #100 draws both sprites (layered) and it looks like a complete object. Now how do you go about telling blueprint all this and having it generate the images for the object? Simple (after a long session in my bathtub trying to make this process easy). Like I said, when you start a project (more on that below) it copies the IFF file and figures out how many sprites it needs to create (remember a sprite isn’t an image but a collection of them). It creates the same number of blueprint frames (1 for each sprite) and from a frame it generates the needed images (based on what the IFF has for information about what image is what). Now, lets get back to our coffee maker. If we clone it and create a new one by either creating it from scratch in 3D or importing the object from a 3D file, you need to setup each frame in blueprint with a list of the objects that are visible. Remember that the coffee maker contains two, well, objects, the base and the pot. So you group your 3D mesh whatever way you want, and in the first frame (that represents sprite ID #100) you tell it to show the coffee base only, hiding the coffee pot. Move ahead to the next frame and you do the opposite, telling blueprint to only show the coffee pot and not the base (blueprint will display all 3D elements, but the ones not used for the sprite will be dimmer). Then when you export, blueprint exports all frames based on what you can see in the frame and generates all the images for the sprite (based on the information already in the IFF about how many SpriteFrames to create). So blueprint makes it pretty easy all around (or at least that’s the goal).

So now how about creating animations? It’s the same concept as above, but instead you move objects around in each frame (sprite) and blueprint saves the information based on the frame you’re working in. For example, the coffee maker has no animation but the trash can does. So lets say you want to clone that. First, there is a sprite that represents the base of the trash can. Then there are 4 other sprites that represent the lid in various positions. So blueprint will create 5 frames. In frame 1 (or sprite ID #100) you set the base to be visible and hide everything else. Then in the other frames, you set the lid to be visible and the can to be hidden. An additional step requires you to position the lid in the various angles (by manipulating that part of your mesh) to simulate opening the lid. blueprint remembers each position of each object in each frame when it comes time to exporting. You can even preview the animation by playing it in blueprint (although, some objects will have odd animations because the sequences are determined by the DrawGroup and not the sprites). So creating animated objects should be a breeze. The only requirement is that you group or ungroup your mesh correctly. In this example, a mesh that has a lid as the same part of the base (a single group)cannot be used because you cannot create the frames that only contain the lid correctly.

Now a word about projects. The current alpha version of blueprint works this way. You start the program, import a mesh, clone a Sims object, save (not necessarily in that order). I need to change this because it’s just too volitile and dependant on a lot of factors (plus a lot of copying of temporary objects). So now, you create a bluperint project (BPJ file) through a wizard. The wizard asks you what you want to name the project, where you want to store it, and what is the base object you want to use. It then saves all this and you can begin editing the object or the 3D mesh. A facility will be provided to convert the existing files into the new layout so nothing will be lost from the current version. This should be much simpler and easier to work with (or at least from my end it is). Then to export you just click on export and it copies the IFF portion of your project to The Sims folder. You could just copy the IFF separately if you want as well.

I think this sounds more complicated than it really is, but hopefully it helps understand ho
w things work. I’ll have all this documented someday but a tutorial on creating new objects will include all these steps and should help explain things. If you have any specific questions feel free to post them in the forum. These steps are not that complicated really but a necessary evil to handle object animations.

Okay, back to blue. I see that Maxis just released a new program called the Character Makeover Studio (or something like that). This is apparently a replacement program for SimShow and will allow you to actually edit the clothes/mesh of a character already in the game. Looks interesting but as a beta release it’s prone to crashing (did this to me first time out). One of the interesting features is a list of all the animations in the game that it allows you to pick for a preview. Now people can preview any animation from the game with this tool. What’s curious about this is that’s what I put into blueprint when I added the character support. You can choose any animation and even better (for scene builder mode) you can step through the animations frame by frame if you want to get just the right position. Anyways, means I’m doing something right. You can grab the new Maxis program at their site here.

I have a couple of things on the run right now with blueprint including a new release soon. No word on when but I’m happy with things so far and I want to get this out to you as soon as possible. Also a bit of a makeover for the site, cleaning up some things and moving things around. Non-blueprint stuff I have going are my book of course (have to get that done!) and about half a dozen other projects. As more work is done on these (and if you’re interested) I’ll provide some URLs for you to go play.

Some days I wake up wondering what in the world some people are thinking. Then there’s today. Okay, step back a few months and blueprint has a strong mailing list going, lots of discussion and what not and lots of exciting things going on. Everyone being adult-like and socialable to everyone. Then a few maniacs get online and start calling people names and generally acting like idiots. Okay, timewarp back to the present. What’s channged? The mailing list is gone but there are still various lingering morons doing exactly the same thing as before yet on a grander scale, scattered all over the various forums. Sheesh. What is with you people? The signal to noise ratio is so high in there that I’m getting complaints from people that they don’t want to read anything else from there and have left the board. Thanks. Normally I don’t get all Liza Minelli about this in a public news post, but it’s just gone over the edge. I cannot believe how idiotic some of you are, saying one thing one moment and something completely opposite the next. So, final heed. If the forums continue to pile up the bull like they have over the last few weeks, I’ll just delete them. Simple. No worries for me because I won’t have to wade through a pile of garbage everyday. Less maintenance and more time for me to relax and take care of other business. No, I’m not threatening anyone in particular. I’m just saying this is the final straw for me. So if you wake up one morning next week and find the forums gone, don’t be so surprised.

« Older posts