WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General WoW Chat (https://www.wowinterface.com/forums/forumdisplay.php?f=143)
-   -   [WIP] Javascript-based Model Viewer (https://www.wowinterface.com/forums/showthread.php?t=49266)

Digital_Utopia 05-07-14 07:36 AM

[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. :p

ravagernl 05-07-14 11:32 AM

Quote:

Originally Posted by Digital_Utopia (Post 292591)


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. :p

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!

Digital_Utopia 05-07-14 08:47 PM

Quote:

Originally Posted by ravagernl (Post 292595)
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! :p

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. :D

Resike 05-08-14 03:37 AM

Looking good, how is going the camera position sets?
On the other side i hate javascript so bad.

Digital_Utopia 05-08-14 04:48 AM

Quote:

Originally Posted by Resike (Post 292617)
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" :p

Resike 05-08-14 05:48 AM

Quote:

Originally Posted by Digital_Utopia (Post 292618)
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" :p

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.

Digital_Utopia 05-09-14 06:50 AM



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.

Quote:

Originally Posted by Resike (Post 292619)
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 :p

ravagernl 05-09-14 11:24 AM

Quote:

Originally Posted by Digital_Utopia (Post 292647)
[...]
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 :p

Is Objective C on your list next :P? *hint hint*

Digital_Utopia 05-09-14 12:11 PM




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!


Quote:

Originally Posted by ravagernl (Post 292654)
Is Objective C on your list next :P? *hint hint*

Yeah, I really should get OS X back up and running. :o

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.

Skullbot 08-17-14 03:31 PM

Any plan on releasing what you've done here ?
Can be very useful for my html5 character creation screen project.

Digital_Utopia 11-07-14 08:52 PM

Quote:

Originally Posted by Skullbot (Post 295554)
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.


All times are GMT -6. The time now is 04:27 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI