4eb0da / war3-model

TypeScript-based mdl/mdx (Warcraft 3 model formats) converter/renderer
MIT License
97 stars 30 forks source link

Use war3-model in Ice Sickle project? #1

Closed ChiefOfGxBxL closed 5 years ago

ChiefOfGxBxL commented 7 years ago

Hello 4eb0da,

(Sorry for the issue... this is the only way I know of to contact you 😃)

I've been looking at this repo for several weeks now and am impressed with the work that you've done. I'd like to ask if you would like to work with me on using this library to draw a WC3 world as you see in World Editor.

I work on a project called Ice Sickle, which is a re-write of World Editor in Node.js, built on Electron. I've already finished some work on the object editor and other windows in the app. The data is all stored in an object, and I've also written the WC3MapTranslator to convert JSON to the various war3map files to be inserted into a .w3x MPQ.

So if you'd like, we can discuss further. I really need someone else developing the WebGL components to create the actual world view so users may see placed objects, modify terrain, and add new entities to the world.

Feel free to email me at langgb@clarkson.edu, and maybe we can set up a time to discuss more details!

Best, ChiefOfGxBxL

4eb0da commented 7 years ago

Hello

Sorry, I'm not interested in anything like that. Maybe I can fix something or give an advice, but nothing bigger. Rendering whole wc3 level requires a lot of work, for example scene/resource management, terrain editing/rendering, interaction with user and other. Also, I'm semi-newbie in 3d graphics: I can do something, but I have no experience (with many things) and in 3d engines (Three.js?) in particular. You definitely can use current project (war3-model) as a model preview in editor, but it will require some changes if it would be used as a part of whole scene: textures must be managed somewhere outside, team color's also should be rendered as textures for performance, particles right now use local model coordinate system, etc.

ChiefOfGxBxL commented 7 years ago

That's alright.

I'm looking at Three.js and it looks reasonable to use. I'd like to be able to load in an .mdx file to Three, but of course since mdx is a WC3 spec there are no loaders for this. However, it looks like they have a lot of different formats supported here:

https://github.com/mrdoob/three.js/tree/master/examples/js/loaders

When you have the mdx -> mdl converter, what format is the output? I see a JSON structure to it, but is it an actual JSON format supported by one of the THREE loaders? For instance, compare the structure of your output:

{
  "Version": 800,
  "Info": {},
  "Sequences": [],
  "GlobalSequences": [],
  "Textures": [],
  "Materials": [],
  "TextureAnims": [],
  "Geosets": [],
  "GeosetAnims": [],
  "Bones": [],
  "Helpers": [],
  "Attachments": [],
  "EventObjects": [],
  "ParticleEmitters": [],
  "ParticleEmitters2": [],
  "Cameras": [],
  "Lights": [],
  "RibbonEmitters": [],
  "CollisionShapes": [],
  "PivotPoints": [],
  "Nodes": []
}

to the structure on one of these DDS formats: https://github.com/mrdoob/three.js/blob/master/examples/obj/male02/Male02_dds.js

I've also tried using the BinaryLoader on an .mdl file with no success.

4eb0da commented 7 years ago

I see a JSON structure to it, but is it an actual JSON format supported by one of the THREE loaders?

I do not know anything about Three.js loaders, I've just created something that fits my own needs :) I think, where may be the way to convert one JSON to another