View Full Version : Toddler Separates - Can It Be Done?
CatOfEvilGenius
15th Jun 2010, 08:23 AM
I'm trying to make toddler separates.
Here's an AVI movie of my efforts so far.
Click the pic to see, may take a while to load.
http://stonegod.org/sims2/img/projects/puSeparates/toddlerSeparates01.png (http://stonegod.org/sims2/img/projects/puSeparates/toddlerSeparates01.avi)
what I did so far
Basically, took a kid mesh, cloned it, replaced the CRES
with toddler CRES. Made some needed changes to the CRES.
CRES stuff shown in pictures below.
Took kid separates recolors, changed the age to toddler and
made them use the new toddler separates meshes.
http://stonegod.org/sims2/img/projects/puSeparates/puCres.png
edit: Yes, the 3,7,8 are clothing type indicators. See CRES wiki article (http://www.modthesims.info/wiki.php?title=CRES).
http://stonegod.org/sims2/img/projects/puSeparates/puCresUnknown2.png
current problems
1. Separates are not automatically put on sim in CAS.
Must select a shirt and bottoms before clothes will show.
This does not happen with other ages.
2. Thumbnail images are incorrectly generated.
They show the pubodynaked mesh.
They don't show the textures.
3. Clothes are too shiny.
I suspect 1 and 2 are due to there being no toddler separates for me to start from. There's probably fiddly bits in the mesh and or recolors I need to adjust. Maybe the game isn't treating these fully as separates.
3 is could be a TXMT issue, or may clear up if I fix 1 and 2.
:!: If this has been tried before and is impossible, someone please let me know now, thanks :!:
CatOfEvilGenius
16th Jun 2010, 04:18 AM
There are more CRES fiddly bits I need to change.
Today I found out that outfits, tops and bottoms differ in another way.
Look in the cResourceNode subtab at the child node value.
outfits
0x0000 0x19000100
tops
0x0000 0x0F000100 <-- most have this
0x0000 0x10000100 <-- a few have this
bottoms
0x0000 0x0D000100 <-- most have this
0x0000 0x0C000100 <-- some newer ones have this
What does it mean? I hoped it might be just a flag, but it is more likely to be a reference or a pointer.
That may be why simply changing it without altering anything else, like what it points to, crashed my AnyGame.
Must do more digging, see what else I need to change or add to the CRES.
Any help or useful advice would be much appreciated.
CatOfEvilGenius
16th Jun 2010, 04:32 AM
Maybe I should try a different approach. Rather than taking the pubody CRES and trying to make it into a top CRES and a bottom CRES by altering stuff blindly, I should take a child top and child bottom CRES, and just replace the bones and joints with toddler bones and joints. Maybe that would be easier. Must find good DBPF CRES format description...
Phaenoh
16th Jun 2010, 05:57 PM
Oh wow. I had tried to enable separates for the other categories long ago, but didn't have enough tech knowledge to figure it out. This makes that project look possible again.
I think starting from kid packages and replacing the joints sounds like a safer plan. The reason (99% sure) that the separates are not automatically put on sim in CAS is because you don't have any in that catagorie that isn't starred as CC. I ran into this problem when I was working on toddler swim suits. Decustomize (http://www.modthesims.info/showthread.php?t=304205) a shirt and shorts and then see if that works. I think the thumbnail issue has something to do with the bone assignments, but that's just a guess.
CatOfEvilGenius
16th Jun 2010, 06:26 PM
Phaenoh I would have never thought to decustomize, thank you so much. :)
Let's see if that helps...
Phaenoh
16th Jun 2010, 07:23 PM
If you happen to stumble upon how to make separates for the other categories let me know, I'd love to have bras and undies separate from each other.
CatOfEvilGenius
16th Jun 2010, 07:39 PM
Phae And formal and outdoor separates would be nice. I really don't like sims changing pants/skirts when going outside, looks so silly. I just want them to put on a jacket.
Recoloring toddler separates is a bit tricky. BodyShop won't show them at all, although the game will. So you have to recolor kids and then tweak the recolor files. Older ages shouldn't have this problem. Classify something as everyday temporarily, recolor it, fix classifcation. Much simpler.
------------------------
edit: Decustomizing didn't fix it, but hey, at least now it's decustomized for when it does work. ;) I'm quite hopeful about the "toddler joint values in child CRES" plan, doing that today.
Phaenoh
16th Jun 2010, 07:49 PM
I'd be willing to jump on board on this project help making meshes and textures if we can do both sides. I know some tech stuff about clothes, but I don't know the tech stuff about bodyshop or simpe. Let me know if you want me.
CatOfEvilGenius
16th Jun 2010, 09:26 PM
Phae Thank you very much for the offer. :)
Right now, I'm checking if child and toddler joints/bones have the same id numbers. If so, I should easily be able to change a cu skeleton into a pu skeleton. That's more the SimPE side of things. Feel free to help with this part or not, up to you. If this does end up working, the more meshers and texturers, the merrier!
This isn't directly related to separates, but would be handy for those who want to dress their toddlers. If you know anything about crib BHAVs, that would be useful too. Lots of folks don't like changing toddlers into and out of pj's when using cribs. I haven't looked for existing mods to stop this. If you know of one off the top of your head, let me know, please. If you know there isn't one, but you know how to make one, people would line up to thank you. Ideally, I would love to have a choice about what they wear to sleep, or have it be based on time of day. Maybe MogHughson did something? Just an idea.
Phaenoh
16th Jun 2010, 09:44 PM
Honestly, I never really figured out the skeleton side of meshes and all those pictures in your first post, they all went right over my head. Hit me up when you get it working and you've got me for meshing and texturing. You will need a bunch of decustomized maxis conversions to fill the category with, that type of work is right up my alley.
Mog did make a dress me correctly mod for tots, based on time of day http://www.modthesims.info/download.php?t=322301 It's prolly a simple enough thing to kill that behavior in the crib if that isn't good enough.
CatOfEvilGenius
17th Jun 2010, 07:04 AM
I tried using child top and bottom CRES skeletons with the following changes
- cuskel renamed to puskel
- all bones/joints in the heirarchy changed to use toddler values
This did NOT fix these problems
- clothes not put on automatically
- thumbnails wrong, show naked sim
Next, I'll try fiddling with the GMDC. It was made from a full body outfit GMDC, pubodynaked. Maybe if I fool it into thinking it was made from a child's separate, it might work better? Or maybe I should actually try cloning a child's separate GMDC? See if any fiddly bits need to change to make it work for toddlers, maybe?
If that doesn't fix the damn icons, maybe give up and try making custom clothes icons? Can clothes have custom icons?
And fix the bad shine, it is driving me bonkers.
Once all that is fixed, if it can be fixed, test in game. Does it crash? Do clothes catalog icons look right when dressing? Can toddlers be dressed in separates? Can toddlers do all toddlery stuff? Eat, sleep, poo, ask to be read to, learn to walk/talk/potty, use highchairs, cribs, etc.
Phae If you have time/inclination to help test clothes in game, let me know. If not, that's totally fine. If you do, yay!
Phaenoh
17th Jun 2010, 05:58 PM
I think I'll have time to help you test, I'm moving tomorrow so things will be a bit helter-skelter for me for a little while, but it doesn't sound like you are ready for testing in the next couple of days anyways.
Did you try decustomizing the clothes? I'd be floored if that does not fix that first problem.
As for that shadow/shine thing, fakepeeps ran into that issue when she was converting the kids pjs to toddlers, she found a fix for it though, so you might try asking her.
And that thumbnail issue, are you using a different package each time? Bodyshop doesn't reload thumbnails and CAS won't either unless you Ctr+Right Click on them. Maybe its just loading your first trial when you hadn't applied textures yet? /me crosses fingers that it might be something that simple that was just overlooked.
fakepeeps7
17th Jun 2010, 06:09 PM
As for that shadow/shine thing, fakepeeps ran into that issue when she was converting the kids pjs to toddlers, she found a fix for it though, so you might try asking her.
Unfortunately, I don't think I ever did fix the problem. It has something to do with bumpmaps, but since my computer doesn't display them, I'm not really the person to be tackling the problem.
Is it actually a shine, like what happens with accessories? (Sorry if that's in the video. My computer balked at that, too. :lol: )
Phaenoh
17th Jun 2010, 06:21 PM
That might actually be it. Did you start from a mesh that had a bumpmap Cat?
CatOfEvilGenius
17th Jun 2010, 06:40 PM
I did decustomize, didn't fix the problem. Rather hoped it would, but no.
I do delete the CAS thumbnails package and CTRL-right click, but that doesn't fix the thumbnails, so I believe something is still borked in the package, or the game just can't do toddler thumbnails.
Did start with bump mapped stuff because I want bump maps. So the "shine" is probably a incorrect bump mapping issue, not actual specular shine, like with accessories.
Will try temporarily changing the age to child, see if I get thumbnails that look better for kids. If I do, that may mean the game has trouble with toddler thumbnails, though I'm not 100% certain of that. Will also try redoing the GMDC.
fakepeeps7 On my machine, I managed to get the 2pc pj's to not shine by giving them their own bump maps in their own packages. Will upload the modified recolors to your thread later if you'd like them.
fakepeeps7
17th Jun 2010, 07:05 PM
fakepeeps7 On my machine, I managed to get the 2pc pj's to not shine by giving them their own bump maps in their own packages. Will upload the modified recolors to your thread later if you'd like them.
That would be great! There's no hurry, though. I know you're busy working on other things. :)
CatOfEvilGenius
18th Jun 2010, 01:36 AM
TL;DR - No more bad shine, other borked stuff still borked. Investigating...
edit: HL suggested reading MogHughson's thumbnail camera angle tutorial for objects. Perhaps this could be modified for clothes? Hope!
-------------------------------------------------
Fixed the borked shininess, totally by accident.
If you look at the neck and shoulder, the horrid creased look isn't there anymore.
Was *trying* to fix the *thumbnails* and auto put on clothes. Still borked.
So here's the n'th or so version of the separates.
This time, the mesh is cloned from pubodyjumpber, not from pubodynaked.
The recolors are originally jumper recolors too, not from child separates (baggy pants / cami).
I did that thing you shouldn't do, try to make a body mesh into a separates mesh.
- CRES, changed unknown 2 from 3 (body) to 7 (top) or 8 (btm)
The child node thing is that for a body CRES, not a separates CRES, may substitute CRES later.
- SHPE, content, parts, body -> top / bottom
- GMND, last 3 edit blocks, body -> top / bottom
- GMDC, replaced with mine
- recolor GZPS
--- category 7 everyday
--- parts/outfit 8 (outfit) -> 4 (top) / 10 (bottom)
--- override name, body -> top/bottom
--- shoe sound, top 0, bottom 1
--- decustomize (version, product, creator)
Also, kept all textures 512x512 this time, didn't try going up to 1024x1024. Maybe the game didn't like the bigger bump maps? They were perfectly valid raw8bit bump maps, I thought. I suppose I could test this later, but just don't care right now. The bad shine is gone, yay. I want working thumbnails.
Wish I knew how exactly the game generates thumbnails, which values in which resources it uses, so I'm not blindly guessing and comparing with existing separates.
version 6/17/10 b
http://thumbs2.modthesims.info/img/6/8/5/1/2/7/MTS2_CatOfEvilGenius_1105896_puSeparate17b.jpg
------------------------------------------------------------
TL;DR
Can't get the thumbnail to display correctly.
Can't get custom thumbnails to display for these clothes either.
Clothes work with bathing, sleeping in cribs, potty, planning everyday.
gory details
Tried cloning kid clothes, toddler clothes. Tried toddler CRES, modified, and kid CRES, modified, and toddler CRES unmodified. Kept doing CTRL-right click, kept delete CASThumbnails, to no avail. There may be a problem with my package, or the game may simply be incapable of making toddler separate thumbnails, though I can't imaginey why.
Followed the accessory custom thumbnail tutorial. I've done custom thumbnails for makeup before. Does it work for clothes or not? Didn't for my toddler separates.
Tried the clothes in game very briefly. Took toddler to potty, bathed toddler, put toddler in crib, took toddler out, planned everyday outfit, changed toddler, all worked fine. When planning outfit, sim in Maxis outfit was changed into separates, and they were put on the sim automatically when I clicked separates! Yay! Different from CAS. But could this be because his sister was already dressed in those separates?
.
CatOfEvilGenius
18th Jun 2010, 11:20 PM
June 18 - Looking at thumbnail CRES files. Thanks to HugeLunatic for pointing me to MogHughson's articles. Findings will be written up as I find them...
The Sims2/TSData/Res/Sims3D/Objects05.package
http://thumbs2.modthesims.info/img/6/8/5/1/2/7/MTS2_CatOfEvilGenius_1106245_thumbHm.jpg
http://thumbs2.modthesims2.com/img/6/8/5/1/2/7/MTS2_CatOfEvilGenius_1106294_casthumb01.jpg
.
CatOfEvilGenius
19th Jun 2010, 04:03 AM
The CRES files shown above definitely control toddler CAS thumbnails. The ones with toddler in the name, that is, not adult ones.
Overriding the Z value in the body/fullbody ones will move full outfits up/down in the thumbnail picture, as explained here (http://www.modthesims.info/showthread.php?t=329846).
I edited the bottoms CRES resources, to no avail. I suspect they are not being used, wrong reference somewhere, and that's they there's a tiny baby instead of baby legs in the thumbnail. I thought at first the values were wrong, but now I think the game is using the wrong CRES for toddler bottoms. Where are those references?
The nakedness issue could be a problem with my meshes. They refer to jumper txmt's, and jumpers have a body mesh group, not top/bottom. Maybe if I hadn't changed the mesh group names, the textures would show up? Or maybe I should refer to kid separate txmt's? Will try and see...
CatOfEvilGenius
19th Jun 2010, 08:59 PM
Hunting for the thingie that controls which cameras get used for clothing thumbnails, since I suspect the wrong one is used for toddler bottoms.
Haven't found it yet...
M&G/TSData/Res/Objects/objects.package has some CAS stuff, but I don't think it has what I want.
TSData/Res/Sims3D/LightRigs.package - has Thumbnail stuff, probably lights? Or camera positions?
Sims2/Cameras - not in here either, meh
CASPodiumArea_cres has links to clothing cameras, but not the clothing *thumbnail* cameras. Maybe that's in a catalog stuff file?
-----------------------------
Unrelated note, what's this? Res/UserData/BodyShopThumbnails.package?
Will nuking this refresh bodyshop thumbnails? Hm.
CatOfEvilGenius
22nd Jun 2010, 01:10 AM
Some progress. Found the camera the game uses for toddler bottoms, one of the adult cameras. Adjusted it to show toddler bottoms correctly. I don't think it is used anywhere else, so shouldn't break adult thumbnails. Couldn't find the thing that actually controls which cameras are used for what, so this was the next best fix. Still working on making the thumbnails not nekkid, and on clothing being put on automatically in CAS.
Oh noes! Nekkid babby thumbnails!
http://thumbs2.modthesims.info/img/6/8/5/1/2/7/MTS2_CatOfEvilGenius_1107299_fixedCamera.jpg
.
CatOfEvilGenius
23rd Jun 2010, 12:11 AM
Thanks, Riblan, for telling me about SHIFT-N.
Could bins possibly have anything to do with thumbnails? Or correct dressing? Here's what SHIFT-N in CAS revealed. My toddler separates are not in any Maxis bin. I made some bin names in globalcatbins, but probably need to associate the separates with them. Should check what bin existing correct CC separates are in. It may be that the bin will make no difference. Should I change the gzps resource name to something more fitting? Then put it in the bin STR resource, after the bin name? Maxis clothes are done that way. Will that do anything?
http://thumbs2.modthesims2.com/img/6/8/5/1/2/7/MTS2_CatOfEvilGenius_1107690_binPuJumper.jpg
Phaenoh
23rd Jun 2010, 01:16 AM
Check out what bin Maxis separates are in, not CC. Still think that has something to do with the auto dressing.
CatOfEvilGenius
23rd Jun 2010, 02:41 AM
Phae I haven't looked at the innards of your toddler swimwear. Did you need to put it in the "pf swim" bin? I noted there is no "pm swim" bin. Looks like they started to do various things for toddlers, but didn't finish. Child separates are in "cm top", "cf top", "cm bottom", "cf bottom". I looked for toddler bins. There is a "pf top" with nothing in it, but no "pm top" nor "pm/pf bottom". Will experiment with using existing bins and/or adding new ones.
Glad you're reading my rambling, helps keep me motivated. :)
Phaenoh
23rd Jun 2010, 03:27 AM
Glad I am helping just by reading. I think this is a worthwhile project and like to support them when I find them. Nothing special with my tot swim stuff, they are just puNaked cloned and recated.
CatOfEvilGenius
27th Jun 2010, 01:52 AM
After several days of investigation, I am almost convinced that the game simply will not create correct thumbnails for toddler separates. I suspect this capability may not have been put into the executable. Here's what I tried that had no effect.
Correct Icons In-game? Nope
Made extensive modifications to the mesh and the recolors. Changed the CRES, the GMDC, GMND, and SHPE. Tried to make the mesh as much like a Maxis separate mesh as I could. Got rid of all references to pubodyjumper, everywhere, in both mesh and recolor resources. Told the top recolor it was in the "pf top" bin/collection. Added it to said collection. Made a bin/collection named "pf bottom". Noted that child collections have a 3IDR and BINXs in the same TGIR group. Made appropriate ones for the toddlers, with no apparent effect. Now, SHIFT-N shows the separates are in the toddler separates collections. This has no effect at all on icon generation.
Custom Clothes Icons? Nope
Tried to make these clothes use custom icons. As far as I know, no one has done custom clothing icons. Looked at the methods used for accessory and object custom icons. Tried to adapt them to clothes. Found that, yes, you can put an image resource in your recolor, add it to your 3IDR, and tell the BINX to use your new iconidx, but the game ignores all this. Tried replacing the UI 0000...0000 line in the 3IDR with a reference to the image resource instead, while keeping the BINX iconidx unchanged. Again, the game just ignored this.
Override / Replace CASThumbnail entries? Maybe...
Next, tried overriding the CAS thumbnails from the CASThumbnails file, with very minimal success. I can make clothing that is initially an "outfit", generate a thumbnail for it, then make it a separate, and it retains the thumbnail it had as an outfit (now in the separates catalog section). I can take an existing thumbnail picture and swap it with another existing thumbnail picture. There's stumbling blocks, unfortunately.
I can export thumbnails from CASThumbnails.package, but it seems that putting them (or altered versions of them) in any other package has no effect whatsoever. It appears the game will only use CAS thumbnails it finds in the CASThumbnails.package, and not anywhere else. Not in a new package in /Thumbnails, not in a recolor package.
Most unfortunately, I cannot manually alter the thumbnail images without crashing the game. When I export a JPG thumbnail, alter it with GIMP, and then import it, or do a resource replace, either one, the game crashes when it tries to display that icon. I suspect GIMP is saving in a JPG format the game does not expect or cannot use. Can't find the difference! Same image size, 256x256. Same resolution, 72x72 dpi. Same color space, RGB w/o alpha, same color depth, 24. Same layer count, 1. Tried saving the JPG as progressive and as not progressive, neither works.
Any JPG file format experts here? Haaalp please?
----------------------------------------
edit:
So I'm slogging through the hex view of the JPGs while looking up the JFIF header format online. Good times. GIMP is definitely saving images with a *different* style header than what TS2's thumbnail creator is producing. Knew that already.
TS2's jpg's have "ALFA" in the header. What could this mean? Jpg's don't have an alpha channel, but they can use black pixels to indicate transparency. That's what the thumbnails do. Does this "ALFA" have something to do with that?
edit 2:
JFIF segment format (http://en.wikipedia.org/wiki/JPEG_File_Interchange_Format)
Allrighty. Sims jpg's have a JFIF segment with density units 0, while GIMP's jpg has density units 1 (pixels). That's easily changed, as is width/height to aspect ratio data. What's troublesome is that Sims jpg's appear to have a 2nd JFIF segment, with an "ALFA" identifier. It's not a JFIF extention, it's not an EXIF, what is it? Maybe an alpha mask block? But why? Hopefully not some EA internal format. Blarg. Can't find an "ALFA" format specification, my google-fu is weak.
edit 3:
Let's assume the ALFA segment *is* an alpha mask. It looks like maybe, maybe, it might be run length encoded. Here's some typical data, in bytes (decimal), from after "ALFA":
206 0 240 255 232 0 182 255 ...
Perhaps this means:
206 transparent pixels
240 opaque pixels
232 transparent pixels
182 opaque pixels
...
However, if this was RLE, you could get lenghts longer than 255, and you can't store that in a byte. So maybe not RLE. Maybe, row markers??? Each row has pixels with indices from 0 to 255. So maybe 206, 240, 232, 182 are indices into a row, telling you where the alpha mask switches from 0 to 255? But if it's row markers, where's the info about which row they're in? And for all markers in a row, shouldn't they be monotonically increasing?
If I could figure out this format, I might, maybe, write a 24bit BMP -> Sims2 JPG converter, and then I could have any image I want in a CAS thumbnail. Something to shoot for.
edit 4: Or maybe it is RLE after all. Have seen n1 0 n2 0. So if there's more than 256 zeros, just have two or more numbers for it.
----------------------------------------
Of course, if I do get CASThumbnail replacement to work, people will have to run the replacement utility every time they nuke their CASThumbnails or accidentally SHIFT-right click toddler separate icons. Meh. Not an ideal solution by any means, but the only option I think I have left.
.
CatOfEvilGenius
27th Jun 2010, 09:51 PM
I should be asking about this in the SimPE forums. Clearly, they can convert a Sims2 ALFA alpha mask jpg into a regular jpeg, so can probably help with converting the other way.
edit:
So SimPE, I believe written in C# (?), is using some system library to decode images, it seems. Why don't I do this with Python or VTK and save myself some trouble...
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.