Quick Reply
Search this Thread
Pettifogging Legalist!
retired moderator
Original Poster
#1 Old 10th Jul 2015 at 6:02 PM Last edited by plasticbox : 10th Jul 2015 at 8:52 PM.
Default [Solved] Full body to top/bottom conversion: To remove or not to remove mesh groups?
I made a full body outfit into a top by changing the CASP flags and editing the top part of the mesh and the textures and mapping (i.e. the mesh still contains the unchanged groups 0 and 1 with leg parts) .. while this works fine in game, I have a feeling it is not really the thing to do having random leg bits floating around in a top =/

I’m not quite sure how to deal with this -- direct import from Milkshape to CASTools is what works best for me so far, since all the morphs and stuff remain intact that way (I have tried the TS4 -> TS3 -> blender way too but that resulted in uv1 getting dropped). But that means importing/exporting the whole thing. When I edit the groups in MS to make them tiny and hidden, the sims are sometimes missing parts of their legs in game (depending on what kind of bottom clothing they wear), which is actually quite logical .. I haven’t tested that theory but I assume the same thing would currently happen when I’d nuke those groups entirely.

I think there is some way (RegionMaps?) that tells the game which part to use from what clothing part but I can’t find any info on that now. I assume what I want to do is 1. delete the non-top groups, either from my mesh or afterwards (I guess one can probaly do that in s4pe pretty much the same way as with object mesh groups?) and also 2. tell the game to get the nessecary legs from elsewhere. How do I do the latter?


I'm using TS4CASTools 1.0.0.6, Milkshape, s4pe. I have blender and cmo’s blender GEOM tools too but see above -- I don't seem to be able to get uv1 into and out of it (which is a bit odd since the update notes http://www.modthesims.info/m/showthread.php?t=443780 explicitely say "fixed for multiple UVs, now works correctly on animals" .. maybe that means that multiple UVS *only* work for animals or something). Also, I am already aware that S4S exists so you don’t need to advertise that here.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Ms. Byte (Deceased)
#2 Old 10th Jul 2015 at 7:57 PM
I'm planning to add the ability to remove entire mesh groups to CAS Tools but that doesn't help you right now. I can move it up to next on my list, though - I already put a marker into the Milkshape meshes to identify what region they are and since we now have the template for the RegionMap it shouldn't be too difficult. Might take a couple to a few days depending on RL and any unexpected problems.

Interesting that you lose visible leg parts, though. Those parts should be removed only when they're replaced by a part from another mesh. But maybe the top RegionMap is conflicting with the bottom RegionMap.

If you want to experiment, the RegionMap is now fully editable in S4PE using either my latest CASPartResource update or version 0.3c of S4PE. (I haven't tested that version but Kuree pulled my code for the update.). There's a pull down that identifies the region for each part. At least in theory you could look at the RegionMap mesh listing for each part you want to get rid of, remove those meshes from your package, update each CASP to remove those LOD links, and remove that part from the RegionMap. It would be very tricky to do manually, though.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Pettifogging Legalist!
retired moderator
Original Poster
#3 Old 10th Jul 2015 at 8:07 PM Last edited by plasticbox : 10th Jul 2015 at 8:31 PM.
Yay, I figured it out! =)

The trick is to edit the UNKN / type 0xAC16FBEC resource so that it contains only the GEOMReferenceBlockList(s) for the parts that are actually needed. Then one can simply nuke all the other groups and remove the reference to them from the LODAssetLists in the CASPs and everything is fine and dandy.

(Probably should remove the references from the TGIList at the end too but then one would have to change all the indexes in the rest of the file .. they don't have an explicit index. But these are references that are never being used now, so they don't really matter)


--


ETA: oh, we cross-posted. It wasn't all that tricky actually (I mean I do know how to fiddle with things in s4pe in general, I just haven't done any CAS stuff up to now), I only failed to realise that this 0xAC16FBEC resource was exactly what I was looking for. Yes it seems like stuff went visually missing in game because it was still in this list and still existed (but only in the form of a tiny triangle hidden in the chest of the sim). So when the game was asked to display it for the sim's legs, it actually did -- they were just not very leg shaped anymore.



I'll try and see what happens when I open my edited package in CASTools -- if that works, so that I can add the rest of the colour options there copying everything from the one I have already changed, it would be quite manageable to do it this way since one only needs to manually edit the first CASP. But of course being able to edit that stuff in CASTools from the get-go would be even better.

(By the way, I was repeatedly having "Exceptional Errors" or whatever they were called when trying to import an edited ms3d more than once .. I mean, into/over the already edited one. But it worked when re-cloning the same thing and directly importing the last version of the edit. I'm not sure how I can help test/eliminate/reproduce that .. since apparently the actual ms3d is not the problem.)


--

ETA pixoritdidnthappen ..
Screenshots

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Pettifogging Legalist!
retired moderator
Original Poster
#4 Old 10th Jul 2015 at 9:01 PM
So when I try to export the remaining group from my edited package, or import over it, I get an exception "The object reference was not assigned to an object instance" (translated; my Windows only speaks German).

Details:

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Ms. Byte (Deceased)
#5 Old 10th Jul 2015 at 10:12 PM
Glad you got it working!

That error could be caused by the now-redundant links in the CASPs, I guess. Did you re-open the package after removing those meshes? Or are you talking about re-importing an edited Milkshape mesh to a previously edited mesh?

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Pettifogging Legalist!
retired moderator
Original Poster
#6 Old 10th Jul 2015 at 10:17 PM
No, I meant opening the edited body-to-top package, the one with the removed groups and stuff. It also complains about missing meshes right when I open it (unsurprisingly =P) and stangely also about being unable to find the RegionMap (I guess it means the now-removed block lists *in* that resource, not the resource itself).

Maybe I really should edit that TGI list .. with only one CASP in the package it can't be that hard to find and change the indexes of everything that references it. Or is this used eleventy billion times in the GEOMs?


Anyhow, adding more recolours works fine other than that -- they all have the changed LOD lists of the first one so that is very practical =). I wanted to edit the remaining mesh some more, but I guess it is easiest to re-clone, do that first, then nuke the groups again and take it from there with the recolours.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Ms. Byte (Deceased)
#7 Old 10th Jul 2015 at 11:44 PM
Yes, not surprising it complains about the missing meshes. The CASP TGI can be edited to remove the 'missing links' without affecting other parts. I'm surprised it complained about a missing RegionMap - is that link still okay in the CASP? That's where CAS Tools looks for it. But if that link was broken the part shouldn't work in the game - I think.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Pettifogging Legalist!
retired moderator
Original Poster
#8 Old 10th Jul 2015 at 11:53 PM Last edited by plasticbox : 11th Jul 2015 at 6:33 PM.
Yes, if I break the link (which of course I already did, for science =D ) then one gets intact legs with a lovely non-top. So I repaired it again .. and then *after* I had verified that the whole thing worked in CAS and game, opened it in CASTools and found it strange that it was complaining.

I can give you the package later if you want to look at it!

--

This had something to do with the leftover TGI list. When I made a new package and cleaned that up (i.e. removed all the nonexisting entries and changed the refernces accordingly), CASTool could open it without any hiccups.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Pettifogging Legalist!
retired moderator
Original Poster
#9 Old 11th Jul 2015 at 7:53 PM
I have one remaining issue now: the bottom (only the bottom) can't seem to forget that it used to be a full body outfit .. it's available in CAS in Bottoms like it should, but when one selects it (to change the colour) it opens the Full Body category, not Bottoms. Which means the user has to re-select the category and item. Not the end of the world, but annoying -- and rather puzzling too, since top and bottom are derived from the exact same thing. I checked the Maxis swimshorts to make sure the bottom has the correct CAS flags, and they are the same (except for style/colour stuff).

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Ms. Byte (Deceased)
#10 Old 11th Jul 2015 at 9:53 PM
This is a Known Problem, now with a Known Solution. The coding for the body part selected when clicking is the alpha channel of the vertex color in the meshes. CAS Tools has two options to fix it:

1) In the General CAS Part Properties tab, set it to some other part, commit, then set it back to bottom, commit, and save. The part selection automatically modifies all the meshes to the right vertex color, changing only the alpha.

2) In the Mesh Manager tab, on the right where it says Set Vertex Color, use the Standards dropdown to select the standard color for bottoms, commit, and save. This will set the entire vertex color. It's possible but unlikely that this might change the morphing of the mesh, but it's more likely to resolve problems than create them.

I was unable to duplicate the missing RegionMap error after following the same steps you described, but since you've solved it I'll put that aside unless it pops up again. I'm working on adding a Region Manager tab to CAS Tools, and since you don't need it right away I'll get addition and modification of regions working as well as deletion before releasing it.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Pettifogging Legalist!
retired moderator
Original Poster
#11 Old 11th Jul 2015 at 10:06 PM Last edited by plasticbox : 11th Jul 2015 at 10:23 PM.
Oh thank you! I was wondering what that vertex colour stuff was about =)

It works fine now after I did the Mesh Manager > Vertex Colour thing. I cannot see any morphing issues (unless there are issues one wouldn't see when pulling the sliders in CAS).


(Option 1 also explains why the top part was working, I guess .. that is what I started with and it's likely I changed that option more than once)

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Ms. Byte (Deceased)
#12 Old 11th Jul 2015 at 11:14 PM
I've seen the vertex color linking parts of hair meshes to sliders like forehead width, cheekbones, etc. The standard values seem to work with all the body sliders. It's something I want to look at in more depth at some point.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Pettifogging Legalist!
retired moderator
Original Poster
#13 Old 12th Jul 2015 at 12:01 PM
Maybe it would be a good idea to put a hovertip on the part selection button that says what you said above, "Automatically modifies the vertex color in all LODs to the colour required for this part, changing only the alpha" or something along these lines? So it's more clear what it does exactly.

(I also remember seeing a "how to press buttons in blender" kind of thing about vertex colours in hair, but that seemed to be very hair specific)

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Ms. Byte (Deceased)
#14 Old 12th Jul 2015 at 12:08 PM
A tooltip is a good idea. I also want to do a tutorial/guide when I eventually move Tools to Downloads.

Milkshape also has some kind of vertex color adjustment, although it may be only with a plugin. As I recall in TS3 the color was called Tagvals and was used only for hair.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Pettifogging Legalist!
retired moderator
Original Poster
#15 Old 12th Jul 2015 at 2:38 PM
Those vertex colours are not the same as bone weights, or are they? (If it's bone weights then Milkshape can already edit them out of the box, or respectively with the plugings that are included out of the box .. I haven't noticed anything about editing the alpha though.)

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Ms. Byte (Deceased)
#16 Old 12th Jul 2015 at 11:40 PM
No - the bone weights are separate. What EA told us is that the RGB part determines how the UV1 data is applied - which set of data to use, whether to morph as clothing or nude body, as I recall. TS4 works in mysterious ways.

Please do not PM me with mod, tutorial, or general modding questions or problems; post them in the thread for the mod or tutorial or post them in the appropriate forum.

Visit my blogs for other Sims content:
Online Sims - general mods for Sims 3
Offline Sims - adult mods for Sims 3 and Sims 4
Back to top