- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Meshing >
- Blender - Cannot reduce vertices from mesh (mailbox)
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Meshing >
- Blender - Cannot reduce vertices from mesh (mailbox)
Posts: 113
Thanks: 1371 in 11 Posts
== START == Source: mscorlib Assembly: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Source array was not long enough. Check srcIndex and length, and the array's lower bounds. at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length) at s3piwrappers.VBUF.SetVertices(MLOD mlod, ChunkReference myVBI, Int64 beforeLength, Int32 count, VRTF vrtf, IEnumerable`1 vertices, Single[] uvscales) at s3piwrappers.VBUF.SetVertices(MLOD mlod, Mesh mesh, VRTF vrtf, Vertex[] vertices, Single[] uvscales) at s3ascHelper.Import.VertsToVBUFs(GenericRCOLResource rcolResource, MLOD mlod, IResourceKey defaultRK, List`1 lmverts, List`1 llverts, Boolean updateBBs) at s3ascHelper.ImportForm.Import_Shown(Object sender, EventArgs e) ----- == END == |
I've tried messing around and found that I can swap the mailbox mesh with any mesh that has at least the amount of vertices. I also modified my mesh by adding dummy vertices and was able to import after that. I also tried cloning a regular object and was able to swap the mesh just fine (decreasing the vertex count).
Maybe there is something else that I am doing wrong. This my first object that will have joints, so maybe there are some extra steps that I should be doing.
Can someone try my files to see what I am doing wrong?
To repeat:
1. Open misu_Mailbox_robot_default_120108.package in S3PE and export MLOD 0x00000000 as s3m2b
2. Open new Blender file and use cmo blender tools to import the mesh
3. In Blender, select File->Append and browse for the mailRobot2.blend, select Object->_HP_RobotBody
4. Now swap the meshes and continue normally, remember to triangulate on export
5. Import to S3PE 6. Do you get the same error?
MailRobot.rar (370.6 KB, 13 downloads) - View custom content | ||||||||||
Size Packed Ratio Date Time Attr CRC Meth Ver ------------------------------------------------------------------------------- mailRobot2.blend 543080 89634 16% 08-01-12 14:35 .....A. 72CF47F5 m3e 2.9 misu_Mailbox_robot_default_120108.package 391444 289688 74% 08-01-12 12:59 .....A. 361DEB51 m3e 2.9 ------------------------------------------------------------------------------- 2 934524 379322 40% |
||||||||||
Description: Blender file and cloned mailbox |
Posts: 4,419
Thanks: 2483 in 21 Posts
If i export the mesh as obj and view it in MS i get 8 meshgroups while the mailbox only has 3.(dropshadow/box and the lid that animates)
I bet Blender has a menu were to delete all those duplicates.
If you want to fix this you need the 3 meshgroups for the higher detail.(i think that is wat you ment by same vertice?)
And i am almost sure you also have to name the 3 meshgroups the same as the originals.
Edit,
When i had the package in TSRW and the meshes in Milkshape i fiddled a bit with them.
-high detail with dropshadow with 3 meshgroups(dropshadow/box and the lid that animates)
-low detail(box and animated lid, lower polygon)
-2 shadowmeshes made from the lower polygon.
Posts: 113
Thanks: 1371 in 11 Posts
I guess you took all the meshes from my blender file and not just _HP_RobotBody? You see, I have the original meshes with all shapes separated, merged highpoly mesh and merged lowpoly mesh plus probably some of my "template-pieces" in the same blend file
So if you want to convert my mesh to .obj, you need to first fetch just the _HP_RobotBody mesh from the .blend file. It's the mesh on the layer 10. Otherwise you'll get a lot of extra stuff.
If you want to fix this you need the 3 meshgroups for the higher detail.(i think that is wat you ment by same vertice?) |
I'm working on the meshgroup that contains the mailbox leg and the box itself. I'm not home so I cannot check the original figures and the group name (guess its group00), but the EA meshgroup has over 1000 vertices and if I recall correctly my _HP_RobotBody has ~500 vertices.
If I add vertices to my model so that it exceeds 1000 vertices, I can swap the meshes and the import to S3PE works. If I use my _HP_RobotBody mesh with object cloned from decorative object etc. it works fine, too.
Is there some restriction that I cannot decrease the mesh vertex count on certain objects or something?
The lid and that "tag" that lifts up are on layer 11 or 12 in my model, but not prepared for swap yet. I've learn the hard way that the best way of working for me is to iteratively add parts and test in the game in between. I'm still a newbie so I make mistakes in almost every step and then it's nice to have the previous working package to return to
I'm really sorry that I did not give enough information in my first post and wasted a bit of your time. Sometimes I seem to think that people can read my mind
Posts: 4,419
Thanks: 2483 in 21 Posts
Unless S3PE has a limit but yours is 944 triangles so no problems there.
I have very little experience with Blender and find it very unpleasant to work with, srry i cant help.
If you didn't update the ammount of meshgroups in the package you have to stick to it, wich is 3
If you are trying to import just one you prolly get the above error.
Posts: 1,740
Thanks: 107797 in 53 Posts
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Posts: 4,419
Thanks: 2483 in 21 Posts
shadow(group0)
box(group1)
lid and flag(group2)
Posts: 1,740
Thanks: 107797 in 53 Posts
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Posts: 113
Thanks: 1371 in 11 Posts
Posts: 4,419
Thanks: 2483 in 21 Posts
Nothing wrong with the mesh itself, shows up perfect ingame.
Posts: 113
Thanks: 1371 in 11 Posts
Posts: 113
Thanks: 1371 in 11 Posts
Posts: 113
Thanks: 1371 in 11 Posts
First, I tried to just import the mesh to Blender and export it right back without touching anything. I got this when trying to export in Blender:
Traceback (most recent call last): File "C:\Users\myname\AppData\Roaming\Blender Foundation\Blender\2.61\scripts\addons\io_TS3_tools.py", line 1644, in execute self.writefile() File "C:\Users\myname\AppData\Roaming\Blender Foundation\Blender\2.61\scripts\addons\io_TS3_tools.py", line 1750, in writefile bpy.ops.object.mode_set(mode='OBJECT') File "C:\Program Files\Blender Foundation\Blender\2.61\scripts\modules\bpy\ops.py", line 180, in __call__ ret = op_call(self.idname_py(), None, kw) RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect location:<unknown location>:-1 location:<unknown location>:-1 |
I was puzzled, until I realized that if I selected the mailbox, I was able to export. I tried other export formats and they did not seem to care whether I had something selected or not.
Next thing I tried to remove some vertices from the top of the mailbox (vertex selection mode, box selection). I failed in Blender export again, now with this message:
Traceback (most recent call last): File "C:\Users\---\AppData\Roaming\Blender Foundation\Blender\2.61\scripts\addons\io_TS3_tools.py", line 1644, in execute self.writefile() File "C:\Users\---\AppData\Roaming\Blender Foundation\Blender\2.61\scripts\addons\io_TS3_tools.py", line 1846, in writefile uveez += uv_list[vert_index][1] IndexError: list index out of range location:<unknown location>:-1 location:<unknown location>:-1 |
I tried UV mapping again, but it did not seem to work. I finally got it working after I put the "face selection" mode on. I think this mystery error that I have been getting every now and then happens because of stray vertices that cannot form a face. Since there is no face that vertex maybe is not getting UV mapped?
Cmo, can you repeat these problems?
Anyway, I tried to remove parts from here and there in the mailbox, but if I got the Blender export working, then the S3PE import did not work. If there is some part in the mailbox that can be safely removed then it is not a big part
After that I tried to follow what Bloom did earlier, but that path stopped even sooner. I was not able to find the mailbox from TSRW. Bloom, can you tell me in which category it is? Is there something special I need to do to my mesh to pass it through MS, or do I just export the meshgroup in .obj and import it to MS?
Posts: 113
Thanks: 1371 in 11 Posts
Posts: 4,419
Thanks: 2483 in 21 Posts
It pops up when you create a new lot.
Or do you mean you wanted to clone it with TSRW, that is not possible without losing it as default replacement.
Wat i did is clone a random object with TSRW, delete all the files in project content and import your default(s3OC) file as package.(in project content.)
I exported your meshes as obj out of Blender, fixed a few things in Milkshape on them and imported in TSRW.
Posts: 1,740
Thanks: 107797 in 53 Posts
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Posts: 113
Thanks: 1371 in 11 Posts
I got this working with the new fixed mesh helpers, so the actual problem is solved and I can proceed with my mailbox now.
Bloom, yes, I was asking for the clone category. I am not sure how far from original I can go while cloning in TSRW and importing. I've have couple of objects that did not have the parts that were needed and then the TSRW import from package did not show all my resources. But I take it that I cannot clone the mailbox with TSRW? Meaning that it is not there in the categories for clonable objects.
Cmo, if this is normal behaviour to the tool, would you consider checking for the errors in the code and printing a more user-friendly error message? I mean, telling user "your mesh contains vertices that do not form faces, please remove extra vertices or add missing faces" is a whole lot more informative than index out of bounds. That would save your work too as people would be able to solve their problems themselves. And it would save others work... I have made several meshes again from the scratch because of this error, when I could have just merged all vertices and rework.
Posts: 4,419
Thanks: 2483 in 21 Posts
Posts: 1,740
Thanks: 107797 in 53 Posts
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Posts: 2,932
Thanks: 15574 in 28 Posts
Posts: 113
Thanks: 1371 in 11 Posts
I wouldn't expect the defaultness to carry over import in TSRW. After all, that is a tool for making sims3packs, it has no reason to have default replacement support.
I'm having another "bad blender tools"-day (plus bad hair day). I get this on export now, trying to swap the lid:
Traceback (most recent call last): File "C:\Users\---\AppData\Roaming\Blender Foundation\Blender\2.61\scripts\addons\io_TS3_tools.py", line 1644, in execute self.writefile() File "C:\Users\---\AppData\Roaming\Blender Foundation\Blender\2.61\scripts\addons\io_TS3_tools.py", line 1822, in writefile if ob.uv_textures[1].name != (group + '_m2'): IndexError: bpy_prop_collection[index]: index 1 out of range, size 1 location:<unknown location>:-1 location:<unknown location>:-1 |
I wonder what I am doing wrong now?
I'm getting really annoyed with these index out of bound errors that to me seem to happen sporadically and don't tell me what the actual problem is. I'll not redo this mesh from scratch and I'll not UV map it again. These are simple mesh swaps that I should be proficient doing by now. I'm done redoing my work just because the tools refuse to export. What if I just had a wrong object selected or something again. I rather learn to export through MS if I don't get this working.
Posts: 4,419
Thanks: 2483 in 21 Posts
I have the idea you misunderstand.
You clone the mailbox with tsrw(from the debug cat)
Then delete all files under project content
reimport your S3OC package as package in project content
Posts: 113
Thanks: 1371 in 11 Posts
What you described about importing to TSRW is the way I normally work
But I'm still a beginner, so I was not sure what clones I can import over what clones, so I have always cloned the same object in both. Which, in some cases is nuisance since S3OC lets you clone anything and TSRW does not. While your advice to clone whatever in TSRW is valid, I'm not experienced enough to say if I'm missing something, so I wanted to find the mailboxColonial.
I really grew tired of the random errors. I ended up learning to use .wso+MS to swap my mesh and I got the lid now. On my first try. With not a single mysterious error. I'm just testing how it looks in-game
I think I'm still going to give Blender Tools a try, but I'll no longer try to hit my head to the wall when I face mysterious indices out of bounds errors - I'll just switch the tools then and save myself a lot of time.
Posts: 11,682
Thanks: 9680 in 11 Posts
"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Posts: 1,740
Thanks: 107797 in 53 Posts
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Posts: 4,419
Thanks: 2483 in 21 Posts
Both meshgroups(group1 and 2) are mapped on one(and the same) uvmap.
Who Posted
|