|
Post by SACRIFICIAL on Nov 18, 2021 10:12:52 GMT -5
Hello, I hope you're doing great. I was attempting to create a custom object with a sim look in order to use it for custom animated objects or props... This object seems to be very glitched, I'm not sure what the issue with it is. I extracted CAS (Hair, Top, Bottom) meshes and I modified them in blender to match the object that I wanted to replace, I used a debug knife in this case. I replaced the object's rig with the (Object Sim)'s rig, and I added all the bones from the (Object Sim)'s mesh lods and model to this object.... It finally got imported, but when I launched the game the object was extremely corrupted, the skeleton stretched weirdly and it copied animations of other sims nearby???? Also when I place the object and attempt to travel, the game crashes. I'm so confused, I hope someone can help. Thank you!
EDIT________________________ (SOLVED THANKS TO ALL OF YOU OMG)!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thank you!! o19 MizoreYukii Fwecka (Lolabellesims) for helping me out!!!! I've been trying to create such a thing for YEARS!! I appreciate you SO SO SO much! ♥ ♥ ♥ ♥ ♥ ♥ You can see more details about the problem in my other post: sims4studio.com/thread/26598/mesh-weights-deformed-imported-solved
|
|
|
Post by SACRIFICIAL on Nov 18, 2021 11:11:28 GMT -5
I basically want to create a custom debug "Object_Sim" with different clothes, hair etc... But when I tried to import the mesh the "Object_Sim" object, S4S gave me an error. I tried extracting the original "Object_sim" mesh and reimported again the same package without any editing and it also gave me an error. This is the error that I receive when I attempt to do that: The Sims 4 Studio - Version 3.1.5.6 System.AggregateException: One or more errors occurred. ---> S4Studio.Blender.BlenderException: File "<string>", line 2, in <module> File "C:\ProgramData\S4Studio\Scripts\objectexporter.py", line 14, in <module> save_lod(mlod,geometry_state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\s4studio\buybuild\blender.py", line 393, in save_lod save_mesh(blender_mesh, m, new_mesh, geometry_state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\s4studio\buybuild\blender.py", line 279, in save_mesh pos_scales = calculate_pos_scales(total_mesh_bounds, max_pos_size) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\s4studio\buybuild\geometry.py", line 39, in calculate_pos_scales return calculate_scale([[e] for e in extremes], max_value, True, True, True) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\s4studio\buybuild\geometry.py", line 22, in calculate_scale max_vertex = max([abs(x) for x in (extremes if not channels else extremes[i])]) IndexError: list index out of range AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
at S4Studio.Blender.BlenderUtilities.RunBlender(String script, String blend, Boolean background, Boolean check_version) at S4Studio.Blender.BlenderUtilities.ImportMlod(String fileName, String mlod, String rig, String state) at S4Studio.ViewModels.ObjectLodItem.ImportMesh(BlenderUtilities blender_util, String blender_path) at S4Studio.ViewModels.ObjectLodItem.<>c__DisplayClass49_0.<ImportMesh>b__0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- ---> (Inner Exception #0) S4Studio.Blender.BlenderException: File "<string>", line 2, in <module> File "C:\ProgramData\S4Studio\Scripts\objectexporter.py", line 14, in <module> save_lod(mlod,geometry_state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\s4studio\buybuild\blender.py", line 393, in save_lod save_mesh(blender_mesh, m, new_mesh, geometry_state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\s4studio\buybuild\blender.py", line 279, in save_mesh pos_scales = calculate_pos_scales(total_mesh_bounds, max_pos_size) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\s4studio\buybuild\geometry.py", line 39, in calculate_pos_scales return calculate_scale([[e] for e in extremes], max_value, True, True, True) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\s4studio\buybuild\geometry.py", line 22, in calculate_scale max_vertex = max([abs(x) for x in (extremes if not channels else extremes[i])]) IndexError: list index out of range AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
at S4Studio.Blender.BlenderUtilities.RunBlender(String script, String blend, Boolean background, Boolean check_version) at S4Studio.Blender.BlenderUtilities.ImportMlod(String fileName, String mlod, String rig, String state) at S4Studio.ViewModels.ObjectLodItem.ImportMesh(BlenderUtilities blender_util, String blender_path) at S4Studio.ViewModels.ObjectLodItem.<>c__DisplayClass49_0.<ImportMesh>b__0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute()<---
I already attempted this fix but it didn't work unfortunately: [SOLVED] Import Mesh Error
|
|
|
Post by o19 on Nov 19, 2021 1:31:42 GMT -5
When I open the build menu the game crashes for me, so this item is hard to debug. For me it looks like you exported and imported too much sim data ('and I added all the bones from the (Object Sim)'s mesh lods and model to this object....'). Objects do not have IK definitions even though they may support it. While only EA can create animations which make use of them. You have a strange weight painting applied to your mesh, I removed it all to avoid any deformations like seen on your screenshots. Vertices will be moved around like crazy if you weight paint the mesh like this. Of course I lost all options to animate the rig but it looks fine. One should weight transfer from a sim later on which is hopefully possible. I have no idea what the bone flags do, for a normal object they are 0x913C. So one better adds the bones manually or sets the value properly. Otherwise strange things may happen. I removed all IK and vertex definitions and imported the clean mesh to a new cloned knife object. I added a few bones to the default rig (b__ROOT_bind__ to b__Head__) and this item works fine in-game. It's shiny and with only one texture there's little one can do about it. Cloning an object with a normal map may have been better or one needs to add one later. www.simfileshare.net/download/2814211/
|
|
|
Post by SACRIFICIAL on Nov 19, 2021 6:35:39 GMT -5
When I open the build menu the game crashes for me, so this item is hard to debug. For me it looks like you exported and imported too much sim data ('and I added all the bones from the (Object Sim)'s mesh lods and model to this object....'). Objects do not have IK definitions even though they may support it. While only EA can create animations which make use of them. You have a strange weight painting applied to your mesh, I removed it all to avoid any deformations like seen on your screenshots. Vertices will be moved around like crazy if you weight paint the mesh like this. Of course I lost all options to animate the rig but it looks fine. One should weight transfer from a sim later on which is hopefully possible. I have no idea what the bone flags do, for a normal object they are 0x913C. So one better adds the bones manually or sets the value properly. Otherwise strange things may happen. I removed all IK and vertex definitions and imported the clean mesh to a new cloned knife object. I added a few bones to the default rig (b__ROOT_bind__ to b__Head__) and this item works fine in-game. It's shiny and with only one texture there's little one can do about it. Cloning an object with a normal map may have been better or one needs to add one later. www.simfileshare.net/download/2814211/Thank you so much for taking the time to help with the issue. The reason why I added all of the bones is because I want the object to be able to play animations created for sims, this was my goal from the beginning, but as I mentioned in the first reply, S4S gives me an error whenever I try to import a mesh to the "Object_Sim" I haven't modified the weight paint, I kept it like it was originally, perhaps it got deformed when I merged the objects in Blender, I'll look more into it. Unfortunately I can't sacrifice the vertex groups/bones because I want the object to be animated. I'll look more into what you've mentioned, and try to trial and error. ♥
|
|
|
Post by o19 on Nov 19, 2021 7:00:51 GMT -5
I had little time so I didn't add arm and leg bones. You may use the package I provided, add 4 more bones and vertexes and weight paint it to test it. I hope the missing bones do no harm for animations, except of hands, feet, head not animated. Of course one may also try to set the flags to 0x913C in your package and check the results. I never solved my issue with the deformed mesh after using an EA object rig. Maybe it was due to the flags which I ignored back then. So I add the bones I need manually which is some work but at least the object behaves as expected. Adding all 170 bones manually will take some time, but the IK bones are likely not needed so there should be 'only' 130 bones to add.
Transferring weight may be an issue, probably to be solved first.
|
|
|
Post by SACRIFICIAL on Nov 19, 2021 9:14:40 GMT -5
I had little time so I didn't add arm and leg bones. You may use the package I provided, add 4 more bones and vertexes and weight paint it to test it. I hope the missing bones do no harm for animations, except of hands, feet, head not animated. Of course one may also try to set the flags to 0x913C in your package and check the results. I never solved my issue with the deformed mesh after using an EA object rig. Maybe it was due to the flags which I ignored back then. So I add the bones I need manually which is some work but at least the object behaves as expected. Adding all 170 bones manually will take some time, but the IK bones are likely not needed so there should be 'only' 130 bones to add.
Transferring weight may be an issue, probably to be solved first. I tried changing the flags, but the mesh disappeared completely in game, but the shadows glitch remained. Though the game didn't crash when I attempted to travel this time. Thank you so much for your help, I'll follow your instructions and hopefully I'll come up with something. EDIT: I just exported the mesh from the package itself, and dear lord!! That weight paint is destroyed! It wasn't like this before I imported it into S4S, luckily I still have the original .Blend File, maybe I can try transferring weights as you suggested.
|
|
|
Post by SACRIFICIAL on Nov 19, 2021 10:02:37 GMT -5
I had little time so I didn't add arm and leg bones. You may use the package I provided, add 4 more bones and vertexes and weight paint it to test it. I hope the missing bones do no harm for animations, except of hands, feet, head not animated. Of course one may also try to set the flags to 0x913C in your package and check the results. I never solved my issue with the deformed mesh after using an EA object rig. Maybe it was due to the flags which I ignored back then. So I add the bones I need manually which is some work but at least the object behaves as expected. Adding all 170 bones manually will take some time, but the IK bones are likely not needed so there should be 'only' 130 bones to add.
Transferring weight may be an issue, probably to be solved first. I transferred weights successfully, but when I import it to S4S the weights get messed up again. But thank you so much for informing me about that, I'm going to start a new thread with the new cause that we discovered ♥
|
|
|
Post by Fwecka (Lolabellesims) on Nov 20, 2021 5:54:55 GMT -5
Guys, I don't know anything about what you're trying to do, but I keep thinking about how transferring weights from a version of Blender above 2.70 involves "limit total." With limit total, you can specify how many weights are assigned to individual vertices. Apparently, if there are a high number of weights assigned to a vertex Studio will randomly delete some of them and that's not good. Again, I really don't know anything about this but I'm wondering if it would be worth it to use a higher version of Blender and do the following: The worst that can happen is that it doesn't work, right?
|
|
|
Post by SACRIFICIAL on Nov 20, 2021 16:10:27 GMT -5
Guys, I don't know anything about what you're trying to do, but I keep thinking about how transferring weights from a version of Blender above 2.70 involves "limit total." With limit total, you can specify how many weights are assigned to individual vertices. Apparently, if there are a high number of weights assigned to a vertex Studio will randomly delete some of them and that's not good. Again, I really don't know anything about this but I'm wondering if it would be worth it to use a higher version of Blender and do the following: The worst that can happen is that it doesn't work, right? Thanks for the suggestion, I followed an answer on a different thread, the problem with the rig was caused because the vertex groups order was different in blender than what I've assigned it in S4S.
|
|
|
Post by Fwecka (Lolabellesims) on Nov 21, 2021 5:02:47 GMT -5
I'm glad you got that figured out, and I hope you can figure out what's crashing your game. There's a mod here that enables logging. That might help.
|
|