Issue with obj2sur multipart moveables
-
First of all thanks to person who made that tool. It’s a life saver.
But here’s the problem I run into.
I have a custom jumpgate model which has cmp animation and therefore moving parts require to have proper hitboxes.
Correct me if I’m wrong but it is my understanding that if a single part consisting of multiple convex subparts needs to have same name for them to be grouped. For example:
Each of those helix_door01 are essentially convex meshes that would make up the full part shape. Like so:
(I’m aware that for cmp exporting mesh would have to be mirrored by XY in relation to hitbox for obj export)
Since all parts positions are provided by pris/rev in cmp I keep center plain at 0, 0, 0 as where mesh part (helix_door01) resides.
Unfortunately resulting sur file behaves rather oddly, it doesn’t display in hardcmp. If I keep only one helix_door01 convex hull then everything’s fine, but more than one convex hull for one part - nope. Since I have more than one of those doors, 12 in fact, then adding up more in this manner then even sur importer in milkshape (which I occasionally use to check for consistency) just plain crashes.
Now if simply each helix_door hitbox to single convex hull it’ll all work fine, in hardcmp, in game and all that, but one convex hull isn’t enough to get the shape of it more accurately.
I’ve looked through a number of vanilla hitboxes which have those parts, jumpgatel, lair_core and such, they obviously have those moveable parts that consist of multiple convex hulls. But it seems obj2sur converter either doesn’t handle the case correctly or perhaps I’m missing something here.
-
Simple answer is it doesnt work for animated multipart surs. I’ve had to use approximate single parts in the past - not very ideal at all. Also animated preset rotated parts dont conform either. The sur remains in the original (usual horizontal, but however its setup) plane and doesnt conform to the parts new preset angle.
-
Well that’s a bummer. Although I have no problem with rev parts myself, seem just a matter of carefully and methodically arranging them in cmp rev blocks. My only issue here is that I’d prefer to have moveable groups in hitbox that could consist of more than one convex hulls, much like it was with some vanilla models.
If I do only one moveable group, like the in the image above, and import it back with sur importer it would seem to be more or less okay: there’s obviously number of root convex hulls followed by the shell around it, then there’s moveable four hulls followed by their own shell, pretty much like how it should be, but something else seem to be wrong that makes it not actually work and it gets worse as soon as you introduce second moveable group (as in another group of multiple convex hulls). Seem to me it’s a bug in converter.
-
update:
Seem like there’s just another way. It’s a bit non-intuitive but I just got it to work. So hopefully someone else will find this useful.
Instead of having multiple hull meshes each in own object but sharing same name, I’d actually merge those hull meshes into one object (one editable mesh/poly where each element within is convex hull), turning off first checkbox as well as turning off vertex merging.
Seem that forces obj2sur to kinda recreate exactly the same subparts of moveables. Now sur imports back, shows everything right, hardcmp too, went into game - all works.
May be that’s how it was supposed to work in the first place, I don’t know. Instructions don’t seem to have anything on this.
-
Your first attempt (see first post) was right, but unfortunately it’s a known bug. Moveable parts consisting out of multiple meshes can’t be generated by that tool. A fix won’t happen since this is very special and Schmackbolzen won’t invest any time in it, as I know him.
There is one thing I’ve never tested: Connecting those single meshes via “Group belongs to”. So door2 belongs to door1, door3 belongs to door2 etc. -
Nah, I tried “group belongs to” before since it was kinda second other approach I thought might work, but it doesn’t either. However the method from my previous post actually does. It’s just that you seem have to force it to regenerate each convex hull elements of a single mesh object. Then it correctly groups them together, makes ‘shell’ for each group and all that.
It is unfortunate that fix ain’t gonna happen for a more ‘correct and intuitive’ approach but seem like there is also ‘partially-correct-and-certainly-not-so-intuitive’ approach that works.
-
So here’s better result, actual moveable parts each made of four convex hulls, imported into ms3d.
Selected meshes to the left are M69-M72 to the right, hash is from string “helix_door12”, like the same group of four above is for “helix_door11” and so on.
Tested in game, all works as intended. So it’s actually not impossible to generate them with obj2sur, it’s just done a bit differently while supposedly ‘correct’ way is bugged.
-
Nice to see that you found a way.
As Skotty and I are working on other projects (e.g. an ALE editor is on the way, and it is not just a simple one…) I see no point in investing any more time into the converter. Plus if Skotty and I ever finish our biggest project, there is no need for such converter anymore. But who knows if it will ever work…
-
That’s quite a lot of stuff. I think the only thing which is missing right now is the interpolation algorithm which you define with “<float type=“4”>” etc. (0 is no interpolation and 1 is linear. 2 should be quadratic, but then you need more supporting points, which you don’t always have. FL accepts a number up to 6. And yes, each number makes a visible difference.) We can load ALEs and render most of them, but some stuff is still missing e.g. GUI is unfinished etc. Maybe in 1-2 months it’s finished.</float>
-
Gui actually just needs scroll bars for selecting interpolation/loop modes (float/loop types) and texture selection for particles. The rest is basically done.
-
Seem it went offtopic but anyway.
Looks nice, it would be even nicer to have a track view/curve editor, and in case of color editing a nice gradient preview below Also where’s pairing window? I’ve been simplifying things a lot by having things like several instances of same emitter node in effect but each one spawning different particles. Or some weirder stuff like having multiple emitters for beam to draw lines.
Also I’m curious about MeshAppearance, is it really and hopelessly broken or had I missed something?