Opened 7 years ago

Closed 5 years ago

#461 closed task (fixed)

[ATTACHED] .pmd/.dae converter

Reported by: Brightgalrs Owned by: historic_bruno
Priority: If Time Permits Milestone: Alpha 9
Component: Non-game systems Keywords: simple
Cc:

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 mattminton 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 historic_bruno 5 years ago.

Download all attachments as: .zip

Change History (27)

comment:1 Changed 7 years ago by Philip

  • 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 mattminton

  • Owner set to mattminton
  • Status changed from new to assigned

Currently working on this, see comments in the forums.

comment:3 Changed 7 years ago by mattminton

  • Resolution set to worksforme
  • Status changed from assigned to closed

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

  • Resolution worksforme deleted
  • Status changed from closed to reopened

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 Brightgalrs

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

Changed 7 years ago by mattminton

comment:6 Changed 7 years ago by mattminton

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

comment:7 Changed 7 years ago by Philip

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 6 years ago by anonymous

  • Milestone Unclassified deleted

Milestone Unclassified deleted

comment:9 Changed 6 years ago by wacko

  • Milestone set to Backlog

comment:10 in reply to: ↑ description ; follow-up: Changed 6 years ago by Brightgalrs

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

comment:11 in reply to: ↑ 10 ; follow-up: Changed 6 years ago by 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?

comment:12 in reply to: ↑ 11 Changed 6 years ago by Brightgalrs

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 6 years ago by Brightgalrs

Bump? :p

comment:14 Changed 6 years ago by historic_bruno

  • Keywords review added
  • Milestone changed from Backlog to Alpha 6

comment:15 Changed 6 years ago by historic_bruno

  • Summary changed from .pmd/.dae converter to [ATTACHED] .pmd/.dae converter

comment:16 Changed 6 years ago by JeffG

  • Owner changed from mattminton to JeffG
  • Status changed from reopened to new

comment:17 Changed 6 years ago by JeffG

  • Status changed from new to assigned

Changed 6 years ago by JeffG

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 k776

  • Milestone changed from Alpha 6 to Alpha 7

comment:20 Changed 6 years ago by k776

  • Priority changed from Nice to Have to If Time Permits

comment:21 Changed 6 years ago by k776

  • Status changed from assigned to new

comment:22 Changed 6 years ago by k776

  • Milestone changed from Alpha 7 to Backlog

comment:23 Changed 5 years ago by historic_bruno

  • Keywords review removed
  • Owner changed from JeffG to historic_bruno
  • Status changed from new to assigned

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

Changed 5 years ago by historic_bruno

comment:24 Changed 5 years ago by historic_bruno

  • Milestone changed from Backlog to Alpha 9
  • Resolution set to fixed
  • Status changed from assigned to closed

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.