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.