Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Nearly alive
Original Poster
#1 Old 3rd Feb 2005 at 8:28 PM Last edited by Miche : 3rd Feb 2005 at 10:27 PM.
Default How to add some basic animation to a object.
First you need to know a bit about changing and adding new BHAV`s to a object. If you don`t know how to do this, then you should learn that first.

Also please note I`m not going into great detail on how to do this, and do not have the time to answer any questions if you can`t get it to work for you.

Okay now for the way you can add some limited animations to your object.

There are various types of animation the game uses to animate objects, the most basic is the way in which most of the animations on the Snowman work.

The parts of the snowman each have more than one gmdc file (along with a gmnd and shape file for each gmdc file).

Then the game allows a object to swap between which gmdc file will be displayed at any given time. (So it can work kind of like a flip book)

It should be possible to add more gmdc files (plus shape and gmnd files ) to a object but you will need to know what you are doing and make sure all the links are correct. You would then need to add the names of each new gmdc file to STR file(text list) with the instance number 0x00000085 and the name "Model -names " (or sometimes it has a slighty different name but something similar )

However the easier way to start would be to use a clone of one of parts of the snowman, and replace the gmdc files in that, and also change the current BHAV`s so it doesn`t have the behaviour of the snow man.

Then when you want to swap between the gmdc files, you would make sure the object is set as the stack object and then use the "Stack object`s 0x0000 Assign to Literal Value 0x...." with the value being the entry number in the str(text list) of the gmdc file you want to be used at that time.

This process could be used for a number of objects, for example I tested it out on the ironing board in the beta section and made a folding version. Other examples could be folding beds, sofa beds, animated statues.


As I said I`m not going into a lot of detail here, and I won`t be answering questions about the process. All my free time is taken up writing the mesh tool (we are currently adding other types of animation support) and supporting any problems people find with the actual program.

Because of the lack of a step by step tutorial for this, I was unsure if I should post any details about this process, but I think there are enough people out there with the skills to be able to follow what I`ve said and then maybe one of them will write a easier to follow tutorial.
Advertisement
Lab Assistant
#2 Old 3rd Feb 2005 at 8:56 PM
Thank you so much, Miche!!
Lab Assistant
#3 Old 4th Feb 2005 at 11:34 AM
gd advice say again?
Lab Assistant
#4 Old 17th Feb 2005 at 3:54 PM
Thank you for the info, Miche; the information was very helpful. I know you're busy with the Mesh Tool, so I was wondering if anyone else who's tried out this process might be able to give some information/advice:

I've worked out the basics just fine - my object (the ceiling tile) switches between meshes without a hitch, and the default texture is displayed on both. The problem I am having is with re-colors.

If I make a re-color package with SimPE, the re-color for the object's first default state appears fine in the catalog. However, when I "switch" to a second mesh, then the object suddenly goes back to using the default texture. Even when I switch the object back to its first mesh, the object still uses the default texture - the re-color has effectively disappeared.

So, is there a way to keep the custom re-colored texture through a switch of GMDC files? Are there specific parts of the package I should be looking at? I've double-checked the RCOL chain, etc., to make sure the links between the GMDC, GMND, CRES, etc. match up. I've already tried having two material over-ride files for the re-color (even though the object functions fine with just one). One possibility is that the BHAV function that makes the switch might need operands for "Change Material"? (at least, that's what appears to be happening with the snowman for functions such as "Update Shadow"). If anyone has any suggestions or insight, it would be much appreciated. Thanks,

J.
Nearly alive
Original Poster
#5 Old 17th Feb 2005 at 4:11 PM
Quote: Originally posted by jgwhiteus
Thank you for the info, Miche; the information was very helpful. I know you're busy with the Mesh Tool, so I was wondering if anyone else who's tried out this process might be able to give some information/advice:

I've worked out the basics just fine - my object (the ceiling tile) switches between meshes without a hitch, and the default texture is displayed on both. The problem I am having is with re-colors.

If I make a re-color package with SimPE, the re-color for the object's first default state appears fine in the catalog. However, when I "switch" to a second mesh, then the object suddenly goes back to using the default texture. Even when I switch the object back to its first mesh, the object still uses the default texture - the re-color has effectively disappeared.

So, is there a way to keep the custom re-colored texture through a switch of GMDC files? Are there specific parts of the package I should be looking at? I've double-checked the RCOL chain, etc., to make sure the links between the GMDC, GMND, CRES, etc. match up. I've already tried having two material over-ride files for the re-color (even though the object functions fine with just one). One possibility is that the BHAV function that makes the switch might need operands for "Change Material"? (at least, that's what appears to be happening with the snowman for functions such as "Update Shadow"). If anyone has any suggestions or insight, it would be much appreciated. Thanks,

J.



I realy have no idea, I`m guessing that it will need two(multiple) overrides and these will need to be listed in each of the gmnd files (as you know, the snow man parts has a matching shape and gmnd file for each gmdc file.)

Numenor might know how you could get this working, he knows much more about the textures and recolouring than me, but I`m not sure if he has looked at objects which switch between gmdc files.
Field Researcher
#6 Old 2nd Mar 2005 at 11:12 AM
Quote: Originally posted by Miche
I realy have no idea, I`m guessing that it will need two(multiple) overrides and these will need to be listed in each of the gmnd files (as you know, the snow man parts has a matching shape and gmnd file for each gmdc file.)

Numenor might know how you could get this working, he knows much more about the textures and recolouring than me, but I`m not sure if he has looked at objects which switch between gmdc files.


I can help you about this. I will post it soon with an animated object. It work fine just see my switching sculptures.
http://www.modthesims2.com/showthread.php?t=41744
Test Subject
#7 Old 2nd Mar 2005 at 4:02 PM
hmm, let's hope this gets integrated into the next version of the Mesh Tool for easier use (so you don't have to know anything special )

you all are doing such a great job...i feel too unimportant and noobish, but receive my praises again :D
Nearly alive
Original Poster
#8 Old 2nd Mar 2005 at 4:29 PM Last edited by Miche : 2nd Mar 2005 at 4:47 PM.
Quote: Originally posted by MisterV
hmm, let's hope this gets integrated into the next version of the Mesh Tool for easier use (so you don't have to know anything special )

you all are doing such a great job...i feel too unimportant and noobish, but receive my praises again :D


There isn`t anything really what can be integrated into the mesh tool. You just need to import two or more meshes into different gmdc files then use these to replace the gmdc files in the package (if you are using a clone of a snowman part. ) the rest is changes to the BHAV`s , which needs to be done in SimPE and there are no plans to add BHAV editing to the mesh tool as for the most part they aren`t related to importing meshes (BHAV`s are the scripts which say what sort of behaviours a object should have).

Future versions of the mesh tool will however have support for other types of animation. I am currently working on this and am having some success while still having problems with some other areas. I hope to post a object with new animation soon. (not using the process defined in this thread)

But as I`m no good at making 3d models, that is holding me back, so if anyone wants to make a model of a toy rocket and launch pad, (two seperate obj files) that would be a big help.
The object I`m working on is a very SimPE object (as a test object), a toy rocket , one of those air powered ones which just fly up into the air 20-50 feet.
Lab Assistant
#9 Old 2nd Mar 2005 at 5:40 PM
Quote: Originally posted by Miche
There isn`t anything really what can be integrated into the mesh tool. You just need to import two or more meshes into different gmdc files then use these to replace the gmdc files in the package (if you are using a clone of a snowman part. ) the rest is changes to the BHAV`s , which needs to be done in SimPE and there are no plans to add BHAV editing to the mesh tool as for the most part they aren`t related to importing meshes (BHAV`s are the scripts which say what sort of behaviours a object should have).

Future versions of the mesh tool will however have support for other types of animation. I am currently working on this and am having some success while still having problems with some other areas. I hope to post a object with new animation soon. (not using the process defined in this thread)

But as I`m no good at making 3d models, that is holding me back, so if anyone wants to make a model of a toy rocket and launch pad, (two seperate obj files) that would be a big help.
The object I`m working on is a very SimPE object (as a test object), a toy rocket , one of those air powered ones which just fly up into the air 20-50 feet.



Here's one for you to try if you'd like. I packed the .rar with a seperate .obj of the rocket and launchpad, and then with a .obj file with both (not grouped or attached) if that's easier. If you don't like them, that's cool too, it only took about ten minutes to throw together.

Brasstex
Screenshots
Attached files:
File Type: rar  rocketpad&rocket.rar (28.6 KB, 40 downloads) - View custom content
Nearly alive
Original Poster
#10 Old 2nd Mar 2005 at 6:50 PM
Quote: Originally posted by Brasstex
Here's one for you to try if you'd like. I packed the .rar with a seperate .obj of the rocket and launchpad, and then with a .obj file with both (not grouped or attached) if that's easier. If you don't like them, that's cool too, it only took about ten minutes to throw together.

Brasstex


Thanks, this is much better than I can do.
Field Researcher
#11 Old 3rd Mar 2005 at 12:19 AM
Quote: Originally posted by psyckotic
I can help you about this. I will post it soon with an animated object. It work fine just see my switching sculptures.
http://www.modthesims2.com/showthread.php?t=41744


As I promised, http://www.modthesims2.com/showthread.php?t=48612 :kami:
Nearly alive
Original Poster
#12 Old 3rd Mar 2005 at 12:46 AM Last edited by Miche : 3rd Mar 2005 at 1:02 AM.
Quote: Originally posted by psyckotic
As I promised, http://www.modthesims2.com/showthread.php?t=48612 :kami:


Thanks for writing that, as it will be useful to a lot of people, but it`s not actually the process what this thread is about, the process in this thread is about changing/swapping the mesh(es)(you have two or more gmdc files in the package and can tell the game which one to use at any time) for another one (not just the material which is used by a mesh).
Field Researcher
#13 Old 3rd Mar 2005 at 9:14 AM
Quote: Originally posted by Miche
Thanks for writing that, as it will be useful to a lot of people, but it`s not actually the process what this thread is about, the process in this thread is about changing/swapping the mesh(es)(you have two or more gmdc files in the package and can tell the game which one to use at any time) for another one (not just the material which is used by a mesh).


But you can put all your meshes in the same gmdc and use a null material and change it when you want like in my sculpture. :kami:
Nearly alive
Original Poster
#14 Old 3rd Mar 2005 at 9:28 AM Last edited by Miche : 3rd Mar 2005 at 9:31 AM.
Quote: Originally posted by psyckotic
But you can put all your meshes in the same gmdc and use a null material and change it when you want like in my sculpture. :kami:


Yes I saw that you did that and it`s a good idea for certain objects, however there are times that I can think of when you would want them to be seperate gmdc files, like if the change is a big one (like you had two meshes what was completely different to each other, to use your method they would have to be ontop of each other in the same gmdc file. (the same position in the game) .

Also the game would still use the clickable area from both, so if one was smaller than the other, the clickable area (on which a user could click) would be the shape and size of the larger object. With the meshes in seperate gmdc files, the game would only use the clickable are defined in the active gmdc, so would only use the area from the object which is being displayed.

Like with your statue, while I haven`t tested it myself so can`t be sure , but if you used the wizard of the mesh tool to make your statues, then I think that the wings would be able to be clicked on, even when they aren`t being displayed.

There is also a chance that the game will process to a certain extent all the meshes in the currently active gmdc file and then only later in the graphics pipeline will check if there is any texture to it.(so having two detailed meshes in the same gmdc file, while only one is being displayed at a time could have a effect on the speed of the game)

There`s also a couple of other differences (which I`m not sure on how much effect they will actually have) but I think I`ve covered the main ones.
Field Researcher
#15 Old 3rd Mar 2005 at 12:35 PM Last edited by psyckotic : 3rd Mar 2005 at 12:38 PM.
Ok i understand what you say but which object already work with two meshes ? Have you already seen any ?
I think we have to begin with one of them, it is perhaps bhav script that does that perhaps "Create object instance" or another global function or a cheat file like for lod mesh...
Nearly alive
Original Poster
#16 Old 3rd Mar 2005 at 2:29 PM
Quote: Originally posted by psyckotic
Ok i understand what you say but which object already work with two meshes ? Have you already seen any ?
I think we have to begin with one of them, it is perhaps bhav script that does that perhaps "Create object instance" or another global function or a cheat file like for lod mesh...


yes there are a number of objects which use multiple gmdc files, and switch between what one is displayed. A good one to look at is the snowman construction set, each part of that uses multiple gmdc files, and it swaps between them to create the dance.

It`s also possible to add multiple gmdc files to any package, but there needs to be a cres, gmnd and shape file for each gmdc file used, and the links between them must be set correctly.

So if you want to expeirment I suggest you use one of the parts of the snowman, another object is the shapeshifter object which someone put in the betatester forum, this is a test object which Maxis made and left hiden in the game packages.

I give details on how to tell the game what gmdc file to use at any time in the first post in this thread.
Field Researcher
#17 Old 3rd Mar 2005 at 8:42 PM
ok i will look at them. thx
Field Researcher
#18 Old 4th Mar 2005 at 1:43 PM
I think it is perhaps a function bhav what group them.
Perhaps "Create New Object Instance"
Nearly alive
Original Poster
#19 Old 4th Mar 2005 at 3:48 PM Last edited by Miche : 4th Mar 2005 at 3:51 PM.
Quote: Originally posted by psyckotic
I think it is perhaps a function bhav what group them.
Perhaps "Create New Object Instance"


I`m not sure exactly what you mean " what group them" , but I am sure that the create new object instance isn`t used to connect the gmdc together. that is used to create a new instance of a object, like with changes I made to the fridges months ago I added a function to a fridge so the sims could get out a whole cooked turkey from a fridge, and used the create new instance to create the turkey in the sims hand after they had opened the fridge.

The way the gmdc files are connected together is by having multple cres files in the package (or linked to the package) with links to there own shape , gmnd and gmdc files. then to change between which gmdc file is displayed , you make sure the object which you want to change the displayed gmdc file in the stack object and then you use "Stack object`s 0x0000 Assign to Literal Value 0x...." , the value being one of the entries in the text list 0x00000085.

I`ve made test object using this process and riped out all the other bhavs apart from the one I wrote to change the displayed gmdc, so I know there isn`t any create instance call in them.
Field Researcher
#20 Old 4th Mar 2005 at 9:12 PM
Yep i have seen that no "Create Object Instance" is used. I just made a suggestion becoz like "Change Material" there is lot of option with operands.
Back to top