Quantcast
[WIP] Javascript-based Model Viewer - WoWInterface
Thread Tools Display Modes
05-07-14, 07:36 AM   #1
Digital_Utopia
A Flamescale Wyrmkin
 
Digital_Utopia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 110
[WIP] Javascript-based Model Viewer



Using WebGL/Three.js

M2/Skin/Anim parsing via jDataView/jParser

PHP/MySQL back end - for dbc info retrieval, texture assembly and Armory API parsing.

Character name & realm goes in, character, as it appears in game, comes out.

Model, textures, and animation done.

Attachments (helm,shoulders,weapons, etc.) left to go.

Oh, and y'know - UI, and some place to host this beast.
__________________
  Reply With Quote
05-07-14, 11:32 AM   #2
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by Digital_Utopia View Post


Using WebGL/Three.js

M2/Skin/Anim parsing via jDataView/jParser

PHP/MySQL back end - for dbc info retrieval, texture assembly and Armory API parsing.

Character name & realm goes in, character, as it appears in game, comes out.

Model, textures, and animation done.

Attachments (helm,shoulders,weapons, etc.) left to go.

Oh, and y'know - UI, and some place to host this beast.
As a web developer I can say this looks very interesting to me NodeJS?

Is this a spare time project?

EDT: my 1,111th post !!!!1!
  Reply With Quote
05-07-14, 08:47 PM   #3
Digital_Utopia
A Flamescale Wyrmkin
 
Digital_Utopia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 110
Originally Posted by ravagernl View Post
As a web developer I can say this looks very interesting to me NodeJS?

Is this a spare time project?

EDT: my 1,111th post !!!!1!
grats!

But no, no Node.js. There shouldn't really be a need for any real-time server communication. All the non-image assets, and PHP generated JSON can be loaded with simple Ajax.

Yeah, this is just for fun really - at least at this point. There might be some opportunity in the future to get something in return for it; but for now, it's exiting enough just figuring this stuff out.
__________________
  Reply With Quote
05-08-14, 03:37 AM   #4
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Looking good, how is going the camera position sets?
On the other side i hate javascript so bad.
  Reply With Quote
05-08-14, 04:48 AM   #5
Digital_Utopia
A Flamescale Wyrmkin
 
Digital_Utopia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 110
Originally Posted by Resike View Post
Looking good, how is going the camera position sets?
On the other side i hate javascript so bad.
Well, as far as the model itself goes - the only camera position in the file is the one for the portrait - which really doesn't help much.

So for the time being, I've positioned the camera/model so an average sized character would be centered in the scene, and controls basically just rotate/move the model itself. Currently has mousewheel zoom, middle mouse pan (x & y) and left mouse rotate (x & y).

Once I get the attachments done, I'll probably play more with the camera, most likely setting it on load to point at a bone in the middle of the character, so regardless of character size, it will always be centered.

As far as JavaScript goes - I'm just far more comfortable with C-style languages, than those laced with a heaping dose of syntactic sugar like vbasic or lua. I find I'm always forgetting a "then" or an "end"
__________________
  Reply With Quote
05-08-14, 05:48 AM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by Digital_Utopia View Post
As far as JavaScript goes - I'm just far more comfortable with C-style languages, than those laced with a heaping dose of syntactic sugar like vbasic or lua. I find I'm always forgetting a "then" or an "end"
I'm much more conforatble with the then end style, could be because i started programming on pascal at the age of 8.

Also the placement of the { } charaters on my native language keyboard is just terribad.
  Reply With Quote
05-09-14, 06:50 AM   #7
Digital_Utopia
A Flamescale Wyrmkin
 
Digital_Utopia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 110


Attachments are done - now I need to find out where the scaling information (per race/gender) is. After that, comes the blinking...which should be fun.

Once I get that done, I think I'm going to have to either parse the M2 server side, or just generate and store the JSON format for each race/gender. Considering there's about a 15 second delay between loading the m2 and it being ready for conversion, I'd say it's definitely choking.

Originally Posted by Resike View Post
I'm much more conforatble with the then end style, could be because i started programming on pascal at the age of 8.

Also the placement of the { } charaters on my native language keyboard is just terribad.
Ah, I understand.

Sadly, before the turn of the century, the only thing I ever learned was BASIC - mostly because I had a C64 growing up, and my high school insisted on teaching two years of BASIC before going onto anything else.

Of course then, C-style languages were everywhere, and with the exception of VB, BASIC was nowhere. Javascript, Actionscript, PHP, C#, etc...and ever since I've been bouncing around. Learn enough to accomplish the project at hand, and move onto the next thing that seems like a cool idea
__________________
  Reply With Quote
05-09-14, 11:24 AM   #8
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by Digital_Utopia View Post
[...]
Of course then, C-style languages were everywhere, and with the exception of VB, BASIC was nowhere. Javascript, Actionscript, PHP, C#, etc...and ever since I've been bouncing around. Learn enough to accomplish the project at hand, and move onto the next thing that seems like a cool idea
Is Objective C on your list next :P? *hint hint*
  Reply With Quote
05-09-14, 12:11 PM   #9
Digital_Utopia
A Flamescale Wyrmkin
 
Digital_Utopia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 110



Scaling done. It was actually a lot more straightforward than I thought it'd be. The attachment bone itself has a scaling key. Simply set the mesh's scale to that, and bingo!


Originally Posted by ravagernl View Post
Is Objective C on your list next :P? *hint hint*
Yeah, I really should get OS X back up and running.

A while back I had a 2TB hard drive die, and I barely salvaged most of my windows stuff - but sadly, lost my OS X partition. Beyond that though - Photoshop plugins in OS X look like development hell, with anything older than CS5 (not including CS5 x86), requiring use of Carbon, instead of Cocoa. I'm not trying to make excuses mind you, just some forewarning that there might not be nearly as wide of a version support range as there is with the Windows one.
__________________
  Reply With Quote
08-17-14, 03:31 PM   #10
Skullbot
A Kobold Labourer
Join Date: Aug 2014
Posts: 1
Any plan on releasing what you've done here ?
Can be very useful for my html5 character creation screen project.
  Reply With Quote
11-07-14, 08:52 PM   #11
Digital_Utopia
A Flamescale Wyrmkin
 
Digital_Utopia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 110
Originally Posted by Skullbot View Post
Any plan on releasing what you've done here ?
Can be very useful for my html5 character creation screen project.
I'm pretty sure I will, once I'm happy with the performance, and give it flexibility. When I was working on that, my goal was to understand how everything fit together, as well as the file formats themselves. The good news is, that I got almost everything working (except for particle effects), the bad news is that it's currently a one trick pony, that takes a good two minutes to load everything.

The main issue is simply the bad decision (apparently) to parse everything at once, and process it into a format that needs to be parsed and processed again. So I've been working on getting a better understanding of Threejs, as well as the various formats, so I can parse only what I need, when I need it, and hand it directly to Threejs's API, instead of processing it into a intermediary format first.

So, to handle the first part, I've been working with the formats in a new application project, and to better understand Threejs, I went with a simpler format from a different game.
__________________
  Reply With Quote

WoWInterface » General Discussion » General WoW Chat » [WIP] Javascript-based Model Viewer

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off