Replies: 14 (Who?), Viewed: 4667 times.
Lab Assistant
Original Poster
#1 Old 17th Jun 2006 at 5:42 AM
Any long and boring essays on how the "animate sim" primitive BHAV and the ANIM files connect?
I find myself being dragged into this area in a project I thought would be simple (ha!), and was just curious if there was anything/anyone who could tell me a bit more.

I think I know how the opcodes specify which STR# file to find another BHAV or ANIM in (I forget which, it's confusing), and the parameters passed to it (though I haven't looked at how the parameters define the line), but I need a more in-depth explanation of all the opcodes and what they mean/do.

For that matter, I'd like something that tells me in a long and boring essay what exactly ANIM files are, and how they're called.


Failing all that, I'll settle for asking if "Use controlling object as anim source" (in the translated opcodes for calling the animate sim from an object) means it will do everything normally except call the in-game sim ANIMs, and would use any ANIMs I put in the package.

Oh, and if there's a way to leave the animation files alone, but make the animations transverse/rotate outside of the animation. I'm thinking something like the hierarchy in the CRES here, but applied to animations.


What? No, I don't think I'm asking too much. If everyone responds "no, I have no idea what you're talking about," I'll just start mutilating it myself, and write a long boring essay about it.

Thanks.
Advertisement
Lab Assistant
#2 Old 17th Jun 2006 at 5:54 AM
Sorry, I havn't fooled around much with BHAVs and such ._.
Good luck with it though
Instructor
#3 Old 17th Jun 2006 at 6:56 AM
I'm trying to figure the same stuff right now well, I have some progress, but not enough for long boring essay.
There's at least two ways how animation may be done:
- for an object with bones, animation is the sequence of keyframes - 'snapshots' of bone positions in different moments; object (or sim body ) is moved to match position of bones, positions in-between keyframes are interpolated somehow
- for an object with morph states, animation can switch between different states - I have no idea how it does it just have and object for which it works (cake piece)

BHAV refers to STR# where ANIM resource name is saved. It's important that your custom ANIM resources have 'global' group number 0x1C0532FA - not 0xFFFFFFFF like other resources in object package - otherwise animation wouldn't be played.

Of the opcodes, I guess I can't help you much - I find them experimentally, or comparing to other objects.
I know already that you can't play animation in reverse order, like it was possible in Sims1 - the 'Flipped' parameter corresponds to flip along some of geometry axis (X, if I remember correctly), not time.
There was quite informative doc called 'Sims2Differences' with some insider info about AnimateSim/AnimateObject/AnimateOverlay primitives, but I can't recall where I've seen it

Good luck on your project
Retired Duck
retired moderator
#4 Old 17th Jun 2006 at 7:20 AM
Quote:
Originally Posted by Jasana_BugBreeder
I know already that you can't play animation in reverse order, like it was possible in Sims1


You mean, play one backwards? I'm pretty sure I did it with the Pensieve in the Harry Potter set... Have you tried setting the 4th param to 0xE0 in your "Animate Sim"?

Sims2Differences was part of the Edith wiki. It seems to have moved since I last visited it, but I've got a copy stored locally if you want to see the file.

As for "Use controlling object as anim source"... I'm not certain, but it sounds a lot like it will be pulling its animation strings from the controlling object. I don't recall ever having used it though.
Lab Assistant
Original Poster
#5 Old 17th Jun 2006 at 9:10 AM
I don't think morph states would help me. As I understand it, morphs are actually other meshes that can be optionally used, like pregnant & fat for sims, and whole, half, none cake, that are triggered somewhere somehow. If you mean an animation beyond all that, then I have no idea.

As to a sims2differences wiki, it sounds useful, even for someone who's never played sims 1. Animate overlays sounds particularly intriguing, as well as the animateSim. I'd appreciate it if you'd upload some of the stuff on animations. I'm looking for any alternatives that don't require blind guesses. (or worse, actually having to learn SimAntics. :o)

The above post should be ingested with 1/4 Tbsp salt. In the event of an allergic reaction, panic and wait for the reaction to pass.
Instructor
#6 Old 18th Jun 2006 at 3:04 PM
Quote:
Echo wrote:
You mean, play one backwards? I'm pretty sure I did it with the Pensieve in the Harry Potter set... Have you tried setting the 4th param to 0xE0 in your "Animate Sim"?
Yes, I meant play backwards. And for AnimateObject, not AnimateSim, though I guess there shouldn't be big difference.
When changing that parameter, should I see the change in the command 'explanation', or it would be seen in the game only?
Quote:
I've got a copy stored locally if you want to see the file.
Thanks, luckily I already found it on my hard drive
Quote:
trezero wrote:
morphs [...] that are triggered somewhere somehow
I also don't rmember where and how they're triggered, but I know that ANIM resources are involved in changing from one morph state to another. I.e. for birthday cake piece there are 3 ANIM resources that change it: o-birthdaycakepiece-{full|half|none}_anim.
So these are one of the kinds of animations, so I mentioned it.
Quote:
I don't think morph states would help me.
Try with first kind - bone animations - first They do work, at least.
Few things to mention:
- in OBJD/Raw Data, property 0x0063 '3D Object Type' should be set to 1 (not 0, at least) for animations to play
- joint names and positions are stored in CRES resource
- on GMDC/Models tab, rebuild transformations if you moved joints
- when export mesh, you must use a format that handles bones - or all assignments would be lost; by the way, obj and 3ds formats don't handle bone assignments
Lab Assistant
Original Poster
#7 Old 18th Jun 2006 at 10:03 PM
*nods* Mmkay.

Right now, though, I'm not messing with any object animations. (I will someday, though)

I'm trying to mess with the sims animations called when they use the object, which is a bit different.

I think I'm just going to have to make tiny changes, run the game, check results, make more changes, run the game again, and so on.

Because I can't extract primitives.

The above post should be ingested with 1/4 Tbsp salt. In the event of an allergic reaction, panic and wait for the reaction to pass.
Instructor
#8 Old 19th Jun 2006 at 7:24 AM
Quote:
I'm trying to mess with the sims animations called when they use the object, which is a bit different.
You mean you want to replace existing in-game animations? That'd be tricky.
Quote:
I think I'm just going to have to make tiny changes, run the game, check results
To mention it - did you tried SimPose2? It was said to work with adults only yet, but it would be better than nothing, and probably easier than running the game each time.
Quote:
Because I can't extract primitives
I guess noone can Except Maxis
Retired Duck
retired moderator
#9 Old 19th Jun 2006 at 11:21 AM Last edited by Echo : 19th Jun 2006 at 11:36 AM.
Quote:
Originally Posted by Jasana_BugBreeder
When changing that parameter, should I see the change in the command 'explanation', or it would be seen in the game only?

I don't think that one shows up in the decoding... It should work in-game though.

Quote:
Originally Posted by trezero
Because I can't extract primitives.

WHy would you want to? They're fairly thoroughly decoded, you are using the PJSE plugin for the BHAVs, right?

And have you read through this tutorial before (hey, a little self-promotion never hurt anyone!) ? "Part 4: Animating the sim" should at least cover the basics of controlling the animations the sim plays.
Lab Assistant
Original Poster
#10 Old 19th Jun 2006 at 5:44 PM
"That'd be tricky."
Which is why I made a thread about it. Not only tricky, but long, because I'd have to modify all the animations for each lifestage, and all that.

I was *hoping* (crosses fingers) that I could do what I wanted to without actually having to change the ANIM file, which is why I got involved in the whole BHAV thing anyway. I want an animation that's already in the game, but I want to move the whole sim while the animation is going.

Currently, I've thought of two possibilities: One is to figure out how sims walk (It looks to me like an animation played along a path), and to see if you can run animations inside animate sims through the event tree.

I doubt it though. I'll have learned a heck of a lot when I'm through, though.


They're NOT fairly decoded, that's the problem. No one knows why opcode 14 is always FF, for example. (I think it's unused, so that's a moot point, but whatever) More importantly, google only finds 250 results for "animate sim"

And google never lies. *nods wisely*

I did read your tutorial, though. Very good, but it didn't teach me anything about animate sim I didn't already know.

Actually, the real interesting thing is where it searches for ANIM files when the STR# and/or line operands don't have any results.

And the minorly annoying thing that opcode 3 is responsible for 8 of the parameters. :/
And 9 controls 4 more.

And I always like to extract BHAVs, so I know what I'm working with. The animate sim primitive is a fairly complex BHAV.

And I'm just being stubborn and annoying because it's what I do best.

The above post should be ingested with 1/4 Tbsp salt. In the event of an allergic reaction, panic and wait for the reaction to pass.
Corrosively Delightful
retired moderator
#11 Old 22nd Aug 2006 at 11:14 PM
trezero,
For changing the height of the sim in relation to the ground during an animation look at the root_trans joint. I am unsure how you would get a steady or stepped increase/decrease during the animation without actually changing the animation.

What I am pretty sure *would* work is to use the animation converter from Miche and make your own animation. I have a sim animation that is custom for my spinning wheel I will release soon (I'm still working on making the animations for the wheel itsself) and was able to play my animation anywhere from the floor to well above the chair without much problem at all. I read that in the absence of a specific animation, (such as for teens and elders) the adult animation is played so perhaps your custom animation would translate to them without more than checking the box on who can use it...
I'm actually pretty excited about the possibilites with the sim animations and what can be done with them now that I have put a couple in the game (not yet uploaded as I am still testing).

If you're not having fun, you're not doing it right.
SO much to do and so many other things to distract me.
Lab Assistant
Original Poster
#12 Old 23rd Aug 2006 at 2:25 AM
But miche's tool (last I saw) can only deal with 30 frames. Plus I just don't like how awkward it is. (Hey, I am a GUI-dependant person through-and through. Sorry.)


Now, though, I'm more interested in the stuff that isn't known about animations. I don't know how outdated the info in the wiki is on the file formats, but according to it, there's still at least 2 parts of the file format we don't know about, not to mention variables here and there throughout the thing.

But alas, I don't have much time to work on modding now. :/


P.S. You mentioned root_trans joint. Do you know anything about root_rot? And why are there rotations applied to root_trans sometimes, and translations applied to root_rot sometimes?

The above post should be ingested with 1/4 Tbsp salt. In the event of an allergic reaction, panic and wait for the reaction to pass.
Lab Assistant
DELETED POST
23rd Aug 2006 at 3:08 AM
This message has been deleted by atavera.
Lab Assistant
Original Poster
#13 Old 23rd Aug 2006 at 5:12 AM
o_0 Hmm. Interesting about the walking thing.

And overlay animations are news to me, although it should have been obvious. Any idea how they're triggered?


I'm pretty sure IK data is one of the things. As to in/out tangents, if you mean stuff like "frame weight" in flash studio, then yes. As far as I can tell so far, the unknowns 1 and 2 deal with this. I'd never considered in/out tangents...should have been obvious.

But there are still other minor things. Sometimes, an object's motion is relative to its parent joint, and sometimes its absolute. And if you start messing with animations, you'll notice arm and leg length always stay the same, even if you set the feet to walk way off. (This may be a default in the program, but I doubt it)

The above post should be ingested with 1/4 Tbsp salt. In the event of an allergic reaction, panic and wait for the reaction to pass.
Test Subject
DELETED POST
23rd Jan 2022 at 4:45 PM Last edited by neelyang : 25th Jan 2022 at 11:51 AM.
This message has been deleted by HugeLunatic.
-.-- -.-- --..
retired moderator DELETED POST
23rd Jan 2022 at 6:30 PM
This message has been deleted by simsample.
Alchemist
#14 Old 24th Jan 2022 at 6:26 AM
@simsample, it looks like that poster just copied and pasted part of Echo's post from 2006 for some reason. So they probably don't have the file. But you can get it here:

https://modthesims.info/showthread....952#post1542952
-.-- -.-- --..
retired moderator
#15 Old 24th Jan 2022 at 11:27 AM
Oh yes, (duh) Thank you omglo!

I will choose a path that's clear- I will choose free will
-RUSH- -RADIO- -EON- -ARCHIVES-
Simpeople and Me Archive- -11Dots Archive- My Sims World Archive
Back to top