View topic - ANN: OBJ model format support


All times are UTC + 1 hour


Post new topic Reply to topic  [ 121 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next
Author Message
PostPosted: 30 Mar 2010, 20:17 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
Yeah basically what I feel is that
Kloot wrote:
[attachment=0]core_commander.obj.lua[/attachment

Contains the part that can and should be easily typed manually, while combining it with the painful numbers that should be auto-generated. I want to have a single lua file that I can create and easily edit to just enter the piecename hierarchy. Then when I open an obj in Upspring, load the tree file, and Upspring could create the new lua which also contains offsets, based on these two. Thus I can edit the obj in whatever editor I want, not have to touch the tree file (unless it's a tiny change) and then the Upspring process is 10 seconds, instead of its current 10 minutes. Kloot's A_B link thing sounds unnecessary to me.
Top
 Offline Profile  
 
PostPosted: 30 Mar 2010, 21:38 
Spring Developer

Joined: 08 Oct 2006, 15:58
CarRepairer wrote:
It's this part that scares me:
Code:
offset = {7.7157217504009e-08, 2.4599997997284, 0.72614061832428},


Obviously typing in all the offsets would be a bit unfriendly, but if you choose to use the Blender plugin (that I'll release later), your workflow will just look like this:

1) create (or import) the .obj in Blender
2) name/move objects and add parent relations between them as you see fit
3) select File ==> Export ==> "Spring OBJ Lua meta-data script"
4) ???
5) profit

This will write the hierarchy information (and the painful numbers) for you.
Top
 Offline Profile  
 
PostPosted: 30 Mar 2010, 22:07 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
Kloot wrote:
CarRepairer wrote:
It's this part that scares me:
Code:
offset = {7.7157217504009e-08, 2.4599997997284, 0.72614061832428},


Obviously typing in all the offsets would be a bit unfriendly, but if you choose to use the Blender plugin (that I'll release later), your workflow will just look like this:

1) create (or import) the .obj in Blender
2) name/move objects and add parent relations between them as you see fit
3) select File ==> Export ==> "Spring OBJ Lua meta-data script"
4) ???
5) profit

This will write the hierarchy information (and the painful numbers) for you.


How do I edit each piece's origin like in Upspring's origin mover? I am still new to modeling and even newer to Blender. I'll assume it's doable so maybe this is a Blender question, not related to this thread.
Top
 Offline Profile  
 
PostPosted: 31 Mar 2010, 00:11 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
Quote:
One at a time? For every Piece? And if you need to make adjustments later?
It's like upspring without the interface

Are the origin coordinates relative to the parent piece or global?
Top
 Offline Profile  
 
PostPosted: 31 Mar 2010, 00:54 
Engines Of War Developer

Joined: 09 Jun 2005, 22:39
Location: Germany, the EU
Cool news, thanks for this Kloot! I know it makes it far more likely for me as a non-modeler to have a try at getting models into the game :D! (and the Blender Plugin sounds like a great idea)
Top
 Offline Profile  
 
PostPosted: 31 Mar 2010, 01:47 
Spring Developer

Joined: 08 Oct 2006, 15:58
CarRepairer wrote:
How do I edit each piece's origin like in Upspring's origin mover?


http://wiki.blender.org/index.php/Doc:M ... ts/Editing :-)

rattle wrote:
Are the origin coordinates relative to the parent piece or global?


The plugin writes them in relative coordinates, but the engine can also deal with global offsets. There is a special metadata key localPieceOffsets to let it know how they should be interpreted.
Top
 Offline Profile  
 
PostPosted: 31 Mar 2010, 07:53 
Modeler
User avatar

Joined: 28 Apr 2005, 20:07
Location: Next to the girl with kaleidascope eyes
rattle wrote:
Quote:
One at a time? For every Piece? And if you need to make adjustments later?
It's like upspring without the interface


This. You'd still have to enter all the co-ordinates whichever method you use. I actually think I'd prefer to do it without the Upspring gui getting in the way.
Top
 Offline Profile  
 
PostPosted: 31 Mar 2010, 17:56 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
Thanks for all the hard work, Kloot. I look forward to trying your Blender plugin when it's ready.
Top
 Offline Profile  
 
PostPosted: 31 Mar 2010, 17:57 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
Quote:
The plugin writes them in relative coordinates, but the engine can also deal with global offsets. There is a special metadata key localPieceOffsets to let it know how they should be interpreted.
Nice to hear, you also answered my next question.
Top
 Offline Profile  
 
PostPosted: 31 Mar 2010, 21:02 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Quote:
355 + // NOTE: unlike 3DO / S3O, the min- and max-extends of a
356 + // piece are not calculated recursively over its children
357 + // since this makes little sense for coldet purposes; the
358 + // model extends do encompass all pieces


This is neat, but is there really a reason it can't be done for per-piece coldets with 3do/s3o?
Top
 Offline Profile  
 
PostPosted: 31 Mar 2010, 22:01 
Spring Developer

Joined: 08 Oct 2006, 15:58
There probably isn't (it would be an easy change at least), but I haven't checked for any deeper reasons why the 3DO/S3O code was written that way.

Anyway, I've attached the Blender plugin to the first post. To those willing to test it, be sure to scan the .log as well as the .lua script for any errors after exporting. Thanks. :-)
Top
 Offline Profile  
 
PostPosted: 01 Apr 2010, 01:06 
Modeler
User avatar

Joined: 02 Jan 2008, 21:55
This is great news, hope it's the first step in the direction of a more standard model/animation format for Spring.


IK someday? :-)
Top
 Offline Profile  
 
PostPosted: 01 Apr 2010, 02:54 
A.N.T.S. Developer
User avatar

Joined: 26 Sep 2009, 20:26
Location: Ukraine
omfg we have lua animations what more do you want srsly. its an rts engine.
Top
 Offline Profile  
 
PostPosted: 01 Apr 2010, 19:03 
Modeler
User avatar

Joined: 28 Apr 2005, 20:07
Location: Next to the girl with kaleidascope eyes
You've not played any modern RTSes, have you Trib? Mesh deformation / skeletal animations would be nice, practically necessary for organic units. Sure, Lua animation is a step forwards, but we still lag behind.

Would it be that difficult to allow the use of a format with support for skeletal animations, whilst the script just uses bones instead of pieces? Ie the animation system (ie Turn, Move, Spin etc) would be exactly the same, but would allow for mesh deformation and proper animation of organic units. Still scripted animations rather than canned, but it would solve the worst of the issues with organic units. Would that be difficult?
Top
 Offline Profile  
 
PostPosted: 01 Apr 2010, 19:16 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
Quote:
what more do you want
furiously unrelated cheese kinetics, you?


For simple IK that's feasible right now you'd need to describe along which axis a piece may turn how much and such which should be stored in the model descriptor file
Top
 Offline Profile  
 
PostPosted: 01 Apr 2010, 21:18 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
/me humps kloots leg
Top
 Offline Profile  
 
PostPosted: 02 Apr 2010, 00:32 
MC: Legacy & Spring 1944 Developer
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Quote:
* calculate 3DO/S3O piece extrema non-recursively

This makes per-piece coldet actually work; the
old code was only structured in a recursive way
to propagate the maximum radius/height/size up
to the root-piece.


Hump it moar!
Top
 Offline Profile  
 
PostPosted: 02 Apr 2010, 12:19 
Modeler
User avatar

Joined: 28 Apr 2005, 20:07
Location: Next to the girl with kaleidascope eyes
Sorry, could someone explain what a coldet is?
Top
 Offline Profile  
 
PostPosted: 02 Apr 2010, 12:35 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
My bet on collision detection.
Top
 Offline Profile  
 
PostPosted: 02 Apr 2010, 13:12 
A.N.T.S. Developer
User avatar

Joined: 26 Sep 2009, 20:26
Location: Ukraine
Guessmyname wrote:
You've not played any modern RTSes, have you Trib? Mesh deformation / skeletal animations would be nice, practically necessary for organic units. Sure, Lua animation is a step forwards, but we still lag behind.

Would it be that difficult to allow the use of a format with support for skeletal animations, whilst the script just uses bones instead of pieces? Ie the animation system (ie Turn, Move, Spin etc) would be exactly the same, but would allow for mesh deformation and proper animation of organic units. Still scripted animations rather than canned, but it would solve the worst of the issues with organic units. Would that be difficult?

which has what to do with "ik plox!!!!"?
I agree with everything you said, and my snide comment still holds.
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 121 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.