Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
39 user(s) are online (15 user(s) are browsing Forum)

Members: 0
Guests: 39

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +0€

Current balance: 60€
(last updated 03/2020)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 54 users playing Freelancer on 44 servers.
May. 25, 2020

Browsing this Thread:   2 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Issue with obj2sur multipart moveables
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 72
Offline
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:

Open in new window

Each of those helix_door01 are essentially convex meshes that would make up the full part shape. Like so:

Open in new window

(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.

Posted on: 2015/6/30 1:57
Top
Re: Issue with obj2sur multipart moveables
Starport Staff
Joined:
2008/10/25 17:58
From On my way back
Group:
Registered Users
Starport Staff
FLServer Admins
Posts: 336
Offline
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.

Posted on: 2015/6/30 8:19
Top
Re: Issue with obj2sur multipart moveables
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 72
Offline
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.

Posted on: 2015/6/30 10:51
Top
Re: Issue with obj2sur multipart moveables
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 72
Offline
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.

Open in new window

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.

Posted on: 2015/6/30 11:22
Top
Re: Issue with obj2sur multipart moveables
Just can't stay away
Joined:
2010/2/17 20:45
From Germany
Group:
Registered Users
Senior Members
Posts: 474
Offline
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.

Posted on: 2015/6/30 11:30
How to create .SUR files - Tutorial
Top
Re: Issue with obj2sur multipart moveables
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 72
Offline
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.

Posted on: 2015/6/30 11:52
Top
Re: Issue with obj2sur multipart moveables
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 72
Offline
So here's better result, actual moveable parts each made of four convex hulls, imported into ms3d.

Open in new window

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.

Posted on: 2015/6/30 19:28
Top
Re: Issue with obj2sur multipart moveables
Home away from home
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 586
Offline
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...

Posted on: 2015/6/30 20:27
Top
Re: Issue with obj2sur multipart moveables
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 72
Offline
ALE editor? Curious. I'd be interested to help. I've documented most of my stuff here. Coded a few helper tools for myself but they're really just a bunch of scripts and XSL stylesheets.

Posted on: 2015/6/30 20:58
Top
Re: Issue with obj2sur multipart moveables
Home away from home
Joined:
2008/7/8 21:15
From Germany
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 586
Offline
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.

Posted on: 2015/6/30 21:34
Top
Re: Issue with obj2sur multipart moveables
Just can't stay away
Joined:
2010/2/17 20:45
From Germany
Group:
Registered Users
Senior Members
Posts: 474
Offline
Gui actually just needs scroll bars for selecting interpolation/loop modes (float/loop types) and texture selection for particles. The rest is basically done.

Open in new window

Posted on: 2015/6/30 21:36
How to create .SUR files - Tutorial
Top
Re: Issue with obj2sur multipart moveables
Not too shy to talk
Joined:
2010/8/27 14:02
Group:
Registered Users
Posts: 72
Offline
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?

Posted on: 2015/6/30 22:12
Top