Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 8th Jan 2012 at 12:55 PM Last edited by misukisu : 8th Jan 2012 at 12:57 PM. Reason: Typo
Default Cannot reduce vertices from mesh (mailbox)
I am doing a default replacement mailbox in a scifi theme. But I cannot replace the original MailboxColonial mesh with my own. In Blender everything goes fine, but when I try to import my s3m2b to S3PE, it says:

Quote:
== 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?
Attached files:
File Type: rar  MailRobot.rar (370.6 KB, 13 downloads) - View custom content
Description: Blender file and cloned mailbox
Advertisement
Sockpuppet
#2 Old 8th Jan 2012 at 3:12 PM Last edited by BloomsBase : 9th Jan 2012 at 5:07 PM.
There are a bunch duplicate meshgroups in it.
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.
Lab Assistant
Original Poster
#3 Old 9th Jan 2012 at 2:00 PM Last edited by misukisu : 9th Jan 2012 at 3:54 PM.
Thank you, but I am afraid that you might have exported too much of my blend file to obj.

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.

Quote:
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?)
Nope, I meant mesh vertices. The ones that define the geometry of the mesh.

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
Sockpuppet
#4 Old 9th Jan 2012 at 4:54 PM
It is irrelevant how much vertice a mesh has, it should not give any problems.
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.
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#5 Old 9th Jan 2012 at 5:09 PM
I was able to replicate the error. Although, comparing the files, I was unable to see a problem that would cause this error. You may need to report this error in the meshExpImpHelper's thread at Simlogical.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Sockpuppet
#6 Old 9th Jan 2012 at 5:28 PM
isn't this because of the ammount of meshgroups you ''must'' import?
shadow(group0)
box(group1)
lid and flag(group2)
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#7 Old 9th Jan 2012 at 5:55 PM
When I tried it, I used the right amount of mesh groups. I used the original shadow, the robot body, and the robot lid. I still got the error.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Lab Assistant
Original Poster
#8 Old 9th Jan 2012 at 6:41 PM
Ok, Thanks for testing this for me. I'll go to Simlogical next
Sockpuppet
#9 Old 9th Jan 2012 at 6:56 PM
Ah, ok
Nothing wrong with the mesh itself, shows up perfect ingame.
Lab Assistant
Original Poster
#10 Old 9th Jan 2012 at 7:15 PM
Thanks for testing and packaging the mesh for me. I'll use that if I don't get this solved in any other way.
Lab Assistant
Original Poster
#11 Old 13th Jan 2012 at 10:56 AM
Just a status update. Inge gave me a workaround for this. It's the lower part of the mailbox post that causes these problems and import/export goes fine if those are not removed.
Lab Assistant
Original Poster
#12 Old 17th Jan 2012 at 11:54 AM Last edited by misukisu : 17th Jan 2012 at 11:55 AM. Reason: removed my username from file paths
I gave the mailbox another try today and failed miserably. I made a new clone (actually, several) of mailbox colonial with S3OC for this try.

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:
Quote:
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:
Quote:
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?
Lab Assistant
Original Poster
#13 Old 17th Jan 2012 at 12:41 PM
A quickie, I have missed the S3PE helper update on 15th, going to try with those!
Sockpuppet
#14 Old 17th Jan 2012 at 12:55 PM Last edited by BloomsBase : 18th Jan 2012 at 12:13 PM.
uhm, the mailbox isn't in the category is it?
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.
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#15 Old 17th Jan 2012 at 1:07 PM
You don't necessarily have to have the object selected, but you do have to have a object(mesh) selected. Other formats don't care because they are just going to export everything, mine only exports the groups that are going to the .s3m2b. You can't have stray vertices, because the vertex count(x3) has to match the faces and UVs.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Lab Assistant
Original Poster
#16 Old 17th Jan 2012 at 1:51 PM
Thanks for the quick responses!

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.
Sockpuppet
#17 Old 17th Jan 2012 at 9:35 PM
i didn't see it yet in TSRW, but you dont want it anyway, like i explained.
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#18 Old 17th Jan 2012 at 9:55 PM
I've seen the mailbox in the Debug section in TSRW, but like Base said, it wouldn't be default anymore.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Alchemist
#19 Old 18th Jan 2012 at 3:25 AM
My understanding is that tsrw is incapable of making default replacements. So the default loss problem isn't an issue with the mailbox per se. It's a flaw in tsrw.
Lab Assistant
Original Poster
#20 Old 18th Jan 2012 at 10:49 AM
Thanks, I did find the mailbox in debug. I thought I went that through already...

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:

Quote:
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.
Sockpuppet
#21 Old 18th Jan 2012 at 11:24 AM
Have you tried to import your very first file in TSRW?(Under project contents in the menu)
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
Lab Assistant
Original Poster
#22 Old 18th Jan 2012 at 12:13 PM
Bloom, thanks for explaining. I don't think I misunderstood, I'm just stubborn and tried to use the Blender Tools to the end.

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.
One horse disagreer of the Apocalypse
#23 Old 18th Jan 2012 at 1:38 PM
But you could also have used S3PE + MS, and that would have avoided blender problems. Just adding this for the benefit of other readers who might think TSRW was the only other option

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#24 Old 18th Jan 2012 at 3:30 PM
I understand you're frustrated, but these aren't random errors. Out of bound errors come about because something is missing that the code was expecting, in this case, a UV texture. The lid and flag(group02) has two UV maps. I'm assuming you tried to swap it with a mesh that only had one, which produced the error. A simple fix is to add a UV texture to the mesh, and scale the UV down(S then 0). This doesn't happen in MS because its not capable of having multiple UV maps, so it only imports and expects one.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Sockpuppet
#25 Old 18th Jan 2012 at 4:44 PM
Wat do you mean by having 2 uvmaps?
Both meshgroups(group1 and 2) are mapped on one(and the same) uvmap.
Page 1 of 2
Back to top