Opened 7 years ago

Closed 5 years ago

#461 closed task (fixed)

[ATTACHED] .pmd/.dae converter

Reported by: Robert Schultz Owned by: Ben Brian
Priority: If Time Permits Milestone: Alpha 9
Component: Non-game systems Keywords: simple
Cc: Patch:

Description

Many of the models are in the PMD format and are not editable by most 3d editing programs. A converter would be needed to ensure high modability in this game, as well to make edits to models.

An alternate solution is for someone to just convert all PMD to DAE.

Attachments (3)

pmd2collada.zip (13.5 KB) - added by Matt Minton 7 years ago.
pmd2collada_adjusted.zip (13.6 KB) - added by JeffG 6 years ago.
Updated python script
pmd2collada_v3.zip (23.8 KB) - added by Ben Brian 5 years ago.

Download all attachments as: .zip

Change History (27)

comment:1 Changed 7 years ago by Philip Taylor

Keywords: simple added

For anybody who's interested in working on this, there's descriptions of the PMD (mesh) and PSA (animation) formats, and bone name lists, and the Collada to PMD/PSA code (though PMD/PSA to Collada doesn't need to be done by the game engine so it could probably be written in e.g. Python more easily than C++).

(Ideally we'll distribute the game with only .dae files, but to do that we'll either need to re-export all of the old models and animations (from before we started using Collada), or we'll need this conversion tool.)

comment:2 Changed 7 years ago by Matt Minton

Owner: set to Matt Minton
Status: newassigned

Currently working on this, see comments in the forums.

comment:3 Changed 7 years ago by Matt Minton

Resolution: worksforme
Status: assignedclosed

PMD to Collada converter added. Unzip the archive to your directory of choice and follow the directions in the README. Enjoy!

comment:4 Changed 7 years ago by Philip Taylor

Resolution: worksforme
Status: closedreopened

Thanks, will have a look at this soon!

("worksforme" is for bugs that are closed when they can't be reproduced or verified - it's not meant for this kind of case, and it'll remove the ticket from the list of open issues so it's liable to get lost and forgotten. Best to leave it open until the tool gets added to SVN.)

comment:5 Changed 7 years ago by Robert Schultz

Hey I'm getting a syntax error when running the Launcher (trying to convert all PMD files)

Changed 7 years ago by Matt Minton

Attachment: pmd2collada.zip added

comment:6 Changed 7 years ago by Matt Minton

Syntax error resolved (duh), need external confirmation. New files uploaded.

comment:7 Changed 7 years ago by Philip Taylor

Looks good for static meshes - now it just needs support for props and bones and we can get rid of our old .pmd format :-)

Have you tried using lxml? It has an API for generating XML that's quite concise, which might make the Collada-generation less horrid.

Some very pedantic points: README.txt says GPLv3 or later, but LICENSE.txt is GPLv2. The code says Quaterion instead of Quaternion. pmd2collada.py says it's called PMD_to_Collada.py.

comment:8 Changed 7 years ago by (none)

Milestone: Unclassified

Milestone Unclassified deleted

comment:9 Changed 7 years ago by Andrew

Milestone: Backlog

comment:10 in reply to:  description ; Changed 7 years ago by Robert Schultz

This does not work for me, is there any specific format you have to enter the path as?

comment:11 in reply to:  10 ; Changed 7 years ago by Matt Minton

Replying to Brightgalrs:

This does not work for me, is there any specific format you have to enter the path as?

Standard path format: <drive>:<path>, ex: D:\Profiles\b28670\My Documents\Downloads\0ad\binaries\data\mods\public\art\meshes

What error message are you getting?

comment:12 in reply to:  11 Changed 7 years ago by Robert Schultz

Replying to mattminton:

Replying to Brightgalrs:

This does not work for me, is there any specific format you have to enter the path as?

Standard path format: <drive>:<path>, ex: D:\Profiles\b28670\My Documents\Downloads\0ad\binaries\data\mods\public\art\meshes

What error message are you getting?

Yeah, that's how I've been entering it. I'm actually getting no errors, the console just closes: -Double clicked pmd2colladaLauncher.py -Entered C:\ (keeps things simple) -Console closes, no error or popup

comment:13 Changed 7 years ago by Robert Schultz

Bump? :p

comment:14 Changed 6 years ago by Ben Brian

Keywords: review added
Milestone: BacklogAlpha 6

comment:15 Changed 6 years ago by Ben Brian

Summary: .pmd/.dae converter[ATTACHED] .pmd/.dae converter

comment:16 Changed 6 years ago by JeffG

Owner: changed from Matt Minton to JeffG
Status: reopenednew

comment:17 Changed 6 years ago by JeffG

Status: newassigned

Changed 6 years ago by JeffG

Attachment: pmd2collada_adjusted.zip added

Updated python script

comment:18 Changed 6 years ago by JeffG

Fixed several issues includeing the crash due to prop points. Bones are not yet implemented in this version.

comment:19 Changed 6 years ago by Kieran P

Milestone: Alpha 6Alpha 7

comment:20 Changed 6 years ago by Kieran P

Priority: Nice to HaveIf Time Permits

comment:21 Changed 6 years ago by Kieran P

Status: assignednew

comment:22 Changed 6 years ago by Kieran P

Milestone: Alpha 7Backlog

comment:23 Changed 6 years ago by Ben Brian

Keywords: review removed
Owner: changed from JeffG to Ben Brian
Status: newassigned

Working on a new version that handles prop points and bones.

Changed 5 years ago by Ben Brian

Attachment: pmd2collada_v3.zip added

comment:24 Changed 5 years ago by Ben Brian

Milestone: BacklogAlpha 9
Resolution: fixed
Status: assignedclosed

Attaching latest version of the converter, works for bones and prop points. There's not much point to it anymore because I converted most of the PMDs to DAEs, with the exception of skeletal ones which aren't very useful anyway (see this forum topic for discussion).

I think the better plan will be to redo those models and corresponding animations (they aren't great and need "updating" anyway).

Note: See TracTickets for help on using tickets.