It’s skeletal animation(skinning), the earlier MD2 format for example is vertex animation(morphTargets).
Here’s how you use it:
1. Drag and drop a *.md5mesh file.
2. Drag and drop a *.md5anim file.
3. Drag and drop a jpg/png for texture.
Any image containing ‘normal’ will be used as a normalMap, ‘bump’ as bumpMap, ‘specular’ as specularMap. None of these and it will be used as the diffuseMap. (this is for preview only and is not saved in the json)
Then save the file.
You can also tick “Lock rootbone” this locks the root bone to position 0,0,0 and the rotation to 0,0,0.
There is also an option to only export the animation data.
Also posted a fairly simple example of how to load a model and some animations, see here. Also shows how you could position other objects relative to the bones.
A small note about materials. I made it so every “mesh” in the *.md5mesh gets it’s own material index. And the idea is that you override the materials in the json-file with your own materials. The above example does that for example.
Three.js does currently not support blending of animations(like interpolating between animations for smooth transitions), hopefully someone will add that sometime in the future. Would be a great feature to have. :)
Edit (Feb 13 2014): Someone added basic support for blending a few months ago to three.js. Did a first test here, using the troll from the Hobbit-project.
Been working with a really fun project earlier this spring. Thought I´d try to give some brief insight in to part of the development process here, and some of the fun we´ve been having.
It can be described as a mash-up between Google Maps and LEGO®, where you can build LEGO on top of Maps. It´s called “Build with Chrome”. Here’s a YouTube video explaining it more visually.
We start out with what we call the “Discovery phase”. This is basicly where each dicipline tries to see the biggest challenges with the project and start exploring different options/paths/etc. Anything goes..
I saw two big challenges here. The first one being the builder, like how do you make some 3d-tool simple enough so normal people can use it. The second thing was how do you display peoples builds, several at the time without hitting to big performance issues.
We started with the second challenge.
Having recently worked with particles, my mindset was set to that.. So my initial idea was to treat the LEGO bricks as particles or several particles makes up a brick, etc.. The idea is to use a sprite/particle of the smallest brick and so on. 1 vertex = 1 sprite. So this is not “real” 3d, but more isometric/ortographic, no perpective. Here´s the first test, so you can see what I mean:
(Small note. There is a bug with gl_PointCoord with certain older ati-drivers(like osx uses for example), where it flips the sprites vertically. Never bothered to fix a workaround, so if it looks weird for you, it´s probably that, and you should use the (flipped versions).)
Isometric 1 (flipped)
I wanted to get rotation in there. So we rendered out a png-sequence of a 90 degree spin, then based on the viewing angle we update the sprite texture. Here´s and example of that:
(Mousedown and drag left/right)
Isometric 2 (flipped)
This was sort off a long shot track. So at the same time Mikael Emtinger was working on the more classical real 3d approach. But with a twist. So he also saw the challenge in how to draw potentially lots of geomtery in a really a optimized way, or as few drawcalls as possible.
The idea is basicly to construct the geometry in the shader. So the “geometry” is basicly a cube that is defined as a uniform. Then the geometry is “built up” in the shader with an attribute stream, with sizes, offsets and colors being sent in.
He started out with a texture stream, but then converted to a attribute stream for compability-issues, but kept the idea of storing models in a bitmap, like using rgb-channel, pixel values for width, height, depth, x, y, z, colorindex, etc.
The pegs in this approach is done with “camera mapping”, basicly a high poly peg is rendered to an offscreen buffer at the current camera angle and then that is used as a repeated texture. And this is basicly what is used in the “explore” mode to display models.
There are drawbacks with each approach of course, but always good to have different directions. The client eventually wanted the real 3d approach.
Kind of a relief in retroperspective, not sure how we would have solved certain thing with the isometric approach.. ;)
So the next thing was to decide framework, since we had Micke onboard and he have developed Glow, we decided to go with that to be able to have an optimized render-pipeline since this is very much a single purpose thing. That is rendering LEGO bricks.
Still that needed much behind-the-scenes development to get to a point where we front-end-folks could make something nice with it.
So I started using my usual weapon of choice, Three.js, to prototype with, and by this time the other big challenge have been pushed on to my desk(#¤#!ers). The builder. I was a bit scared of this.. but it was just to “bite the bull” or whatever you say… ;)
So we entered what we call the “Definition phase”, the goal is to define what it is we should produce, functions, visuals, etc.
Started by trying to find inspiration in other similar tools, like voxel-editors, etc.. I wanted to find something really simple as the target audience here was normal people and not tech-savvy geeks. Saw something interesting in 3d-paint, a voxel tool, like you had a gridplane that you could move around, so it basicly became like drawing in 2d.
That was the first thing I tried.
The feeling of being able to “draw” bricks was kinda nice, but building something became quite weird.
So I tried with the more classical approach, that is more on par with the LEGO Digitial Designer, which is really nice, but it’s more advanced and more “cad” than what we were aiming for here.
How it works is that when you point the mouse to the top-surface, a invisible plane gets positioned on top of the brick and is sized and positioned depending on the target brick and the “in hand”-brick + rotation. So the ray hits that instead and you can position at any peg. Also made it auto-stack upwards.
Incremental version. Added preview pegs to the ghostbricks so you could more easily see where it would go.
One that tested autosaving with local storage.
A version with more bricks, updated dummy-gui, also thin bricks.
A version with real pegs added. Also trying to figure out how to deal with tall builds, hence the y-slider in the top-right corner.
Added the sloped bricks.
Test with a maps-texture. In animation and more..
Visual tweaks, trying to get the ADs/gfx people happy… I saw mission impossible 4 that night btw.. just sayin…
So now Micke had gotten to a point with his LEGO-version of Glow, dubbed GLego, that it was time for me to stop prototyping and build it “for real”. The production phase. Which basicly meant tearing everything down and start from scratch, using GLego instead of Three.
Might add that I had hard time explaining this to PMs, ADs, clients, etc… “But it´s working…, We´re almost there!” Anyway…
I got up to speed pretty quickly, Micke had done a great job, and I constantly bugged him for new features/fixes etc.
And here´s a first version of GLego-version that I showed:
GLego Builder 0
An incremental one with loads of fixes after feedback, etc.
GLego Builder 1
And the last one using my horrible dummy-gui. Added environment mapping and more.
GLego Builder 2
From there on it went in to the app-engine version, where a real gui was applied, bugfixes, small tweaks, changes and so on. And eventually it became what is on the live site.
This was LOADS of fun to work with and I´m quite alright with how it turned out, for once.
LEGO and WebGL in one project is like a real nerd-fiesta..
As always it´s a collaboration between many parties. We at North Kingdom. Agigen helped with both the backend and html/css-frontend. Mikael Emtinger did the WebGL framework, shaders, etc. Mark in Australia was the agency client together with Google Chrome and LEGO. The clients were really cool btw. (which is freaking rare…). ;)
And if you read this far I can give you some pro-tips regarding the Builder. You can change colors with the 0-9 keys on the keyboard. There is also a “special” hidden “my-little-pony-inspired” color(easter egg) available if you do a certain key-combination(or go by the console). Rotating bricks is quickest done by using the left/right arrowkeys… And that´s about it!
Got a chance to play with a Kinect recently, I know.. about 2 years after everyone else. :)
So I found KinectJS, that makes it really simple to get started. Just run the server and through a websocket you get access to the nodes, etc.
There are others of course, like as3NUI if you want to go with as3. Or obviously c# and c++ examples that comes with the sdk.
Since this is really hard to show online, I have tried to screenrecord some of the tests.
The first thing was just to try and get the nodes showing.
So this is just a canvas plotting the nodes as a skeleton:
Next thing I tried was some headtracking and moving a camera around accordingly to get some sort “holographic” effect.
It´s filmed with a crappy mobile-camera, sorry for that. But you should get the idea:
Then the most obvious geek-thing, control a light saber with your arm:
Test to emit particles from your hands, feels good:
Draw some trails:
Always wondered what it feels like to be a flower :D
Then a test with connecting some box2d stuff to the nodes:
Jumped around a bit to much while tesing that, broke my fucking lamp…
Then an attempt at making something more installation-like. The idea is to project this on to one wall of a room. When it detects a person it lights up like a long corridor and extends the room. And then uses headtracking to change the camera position so the perspective is correct from that persons pov. That´s the theory anyway.
Also to have some sort of interactivity and some references in the extened room, you can “throw” some balls by moving your hands in Z above a certain velocity, the balls then “inherits” the velocity of the hand.
And a variation with an object you can spin around by moving your hands.
So I have mostly tested the Kinect as an input device(which is what is.. duh), but I mean I haven´t touched the video and depthmap stuff.
And as an input device it certainly got some pros and cons. Like doing precission stuff and for example controlling something with lots of accuracy is really hard. I guess also partly cause there is no tactile feedback(a bit of the same problem as touchscreens have imo). As a result control interfaces have to be quite forgiving(for example like this)…
But on the other hand there are stuff that can feel really nice and responsive, like for example emitting particles or drawing and stuff like that. I guess you could say, creating or influencing something with motion in a void feels nicer than trying to control something with motion in a void. :)
In our business it certainly got potential for installations and similar stuff, have obviously just peaked at the surface here. Was lots of fun though!
You simply open the page, and then drag and drop a *.md2 file and it will be converted and a preview of the mesh should appear. You can then drag and drop jpg/png images for the texture to be previewed as well.
Left click and drag to rotate, right click and drag to move. Scrollwheel to zoom.
If it looks ok, enter a filename and hit “Save”.
It should now be downloaded(in Chrome at least, Firefox opens it in a new window).
You can then load in the json files into your three.js projects and use them as morphTargets.
I have only tested this in Chrome and Firefox, so not sure if it works anywhere else. Mostly done as an exercise for myself to understand the format, drag and drop and filehandling etc. But might be useful to someone else out there.
Edit (Mar 08, 2012): Looks like I had the exporter output a horizontally flipped model, should be fixed now. Thanks to @alteredq for letting me know.
Edit (May 11 2013): Updated it to export to the latest format(3.1).
Edit (Feb 10 2014): Fixed it, was broken due to some webgl changes in recent browsers.
For a recent project there was a need for lots of particles, in flashplayer 10. Here´s some of the experimentation that came out of that. There are no preloaders, so just wait for something to show(some are quite heavy).
2x pixels, heightmap/colormap
2x pixels, heightmap/colormap shapes
1x pixels, heightmap 200x200px
1x pixels, heightmap 300x300px
1x pixels, heightmap 400x400px
1x pixels, 3d teapot 50k
1x pixels, 3d teapot 100k
1x pixels, 3d teapot 200k
1x pixels, morph A (click anywhere to morph)
1x pixels, morph B (click anywhere to morph)
1x pixels, morph C (click anywhere to morph)
Lesson learned is that linked lists are way faster than arrays.. ;)
Another busy year have (almost) passed, and more projects behind me. We have one site nominated at The Fwa:s Peoples Choice Awards 2010 this time, it’s July.
Things slowed down a bit towards the end of the year though. Great for me, had time to play with some mobile/android stuff. And later also try a bit of js+canvas and some WebGL. I can really see the potential. Really fun to play with from a developers point-of-view.
I also actually ended up using twitter, it’s a good work-tool/channel to see trends and what people are up to etc. You can ‘follow’ me @oosmoxiecode.
This site is nearing 10 years without a remake/update… lol. I would really like to convert it to a wordpress-solution.. some day.
Have a great 2011 everyone!
Have uploaded some inital tests using Flash 10(in the Experiments section). Have also done some tests with Papervision3D. More to come, hopefully.
There have been a 32k swf competition over at flashscene.org. Head over there and check out the entries and vote for my lame entry :P, or whoever you think should win. I have an idea of which entry will win anyway :) (Hint: starts with an A… that was just great stuff!)
Was great fun making it though, although I guess I should have used AS3/Flash9 instead of Flash8.
I´ve uploaded a beta of a simple YouTube style FLV player. It´s meant to be small and hopefully easy to implement. I tried to keep the features simple and not bloat it to much.
Might be useful for someone out there, it´s free to use for anything by anyone :). I might release the source or make it skinnable in the future.
More information about ansi-files can be found here.
I´ve made an Online Nfo Reader for a friend of mine. I decided to release it for anyone to use, maybe someone else also founds it useful…
Check it out here, any suggestions for more features are welcome.
More information about nfo-files can be found here.
André Michelle have developed a modplayer in Flash 9, called 8bitboy(preview). It´s not done yet, but it looks incredibly cool so far.
The mod format was originally developed for the Amiga, read more about it on wikipedia. This essentially means we can create soundeffects etc. on the fly in Flash 9, among other things. Looking forward to try it out when it´s finished.
I have posted some of my early Flash 8 tests in the examples section. Haven´t been able to play around as much I wanted to though…
The bitmapdata api is what really could change some approaches to making games, damn cool stuff.
Had some sparetime this weekend, so I made a remake of one of Oskar van Deventer’s awesome puzzles. It´s called Threesome. You control three players who have to work together to exit a maze. Have a try.
Have made a couple of simple games. First up was a dice game, Dice Poker(called Yatzy in swedish). Hadn´t done anything with dices before so that was fun. A game like that should be Multiplayer though..
Second one was BlackOut, a classic simple puzzle game. Have had it on my HD for quite some time, but never gotten around to finish it until now. There´s always plenty of unfinished stuff, can´t be arsed to to graphics for them…
Have made another remake. This time of great little puzzle game called Reflexion. Hadn´t done anything in quite a while, so it was fun! Try it out.
Did a small tile engine test in director a while back. Just to get an idea of much faster than flash it would be.. Tile engine test.
Made some Yin Yang particle experiment: youtube.com/watch?v=VOZQp4…
We are recruiting! Producer and Tech Director needed for our HQ in Skellefteå! northkingdom.com/careers/
Order from Chaos: vimeo.com/196269431 Max Cooper and Maxime Causeret Stunning...
Played a bit with particles in Unity. :) youtube.com/watch?v=UXpWtV…
- actionscript microcosmos
- Alternativa Platform blog
- Andre Michelle
- Antti Kupila
- Ars Thanea Blog
- astatic notes
- b-log – betriebsraum weblog
- Chris O'Shea
- Coding Cowboys
- Darren Richardson
- Dead End Thrills
- Everyday Flash
- Everything Visual
- flash platform!
- gaming your way – blog
- Keeping track of myself
- KevLinDev Blog
- lessrain blog
- Mike Chambers
- MoiK78 blog
- North Kingdom
- Over Here
- Peter Elst
- peter nitsch.net
- Photon Storm
- PICNIC WITH PANIC
- Play with Motion
- polygonal labs
- Power-up Media Blog
- Razorberry's Adobe Flash Blog
- ricardo cabello
- Simon Wacker
- Sönke Rohde
- The efnx code blog
- December 2016
- December 2015
- December 2014
- December 2013
- May 2013
- April 2013
- December 2012
- July 2012
- June 2012
- January 2012
- December 2011
- October 2011
- December 2010
- December 2009
- January 2009
- December 2008
- December 2007
- June 2007
- February 2007
- December 2006
- October 2006
- September 2006
- August 2006
- June 2006
- December 2005
- October 2005
- September 2005
- August 2005
- March 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- June 2004
- April 2004
- March 2004
- December 2003
- September 2003
- August 2003
- July 2003
- May 2003
- April 2003
- February 2003
- January 2003
- December 2002
- November 2002