Away3D Light pre-baking V1

Demos, Flash

Away3D prebaking of light v1

Flat: that’s how Flash 3D looks like if you do not fake some light information. Sure we do have materials, but if you have a large scenery, it’s eating too much of precious cpu resources that we need to allow other tasks. So we do fake a lot…Watch Full Movie Online Streaming Online and Download

No more fake! We can now runtime or at dev time apply some lighting that runs at same speed as the basic material, but looking a whole lot better! With this version 1, I’m hoping to fill a gap between devs and designers.

The demo above shows how an ugly scenery like this can be transformed into something almost mysterious with this code. So imagine what you’ll get with this code in your hands! ?

There are tons of stuffs I want to add/improve to that one, but so far I’ve already added a few features such as:

  • Extended TraceEvents.
  • Getters for exports of the bitmapdata’s to disc in Air or F10.
  • Single materials: the same material can be set only once, the engine does apply new ones on itself.
  • Multiple lights: fully compatible with existing code.
  • Scene ambient light value.
  • Default material: if a Mesh object doesn’t have any material set of the wrong type, it generates a default one.
  • Alpha’s are respected.
  • Chunk process.
  • Object3D support: this means you can pass a whole container populated with Meshes or objectContainer3D’s objects.
  • And of course ease of use: Believe it or not, this is a one liner!!
  • var LPB:LightPrebaker = new LightPrebaker(Object3D, [lights array], ambient, maxtris);

    This version 1 of the LightPrebaking class will be added soon to the Away3D trunk, I need to do some clean up’s before.
    In future posts, I’ll try to show more code and hopefully some progress!

    Away3D FaceLink

    Flash

    AwayFaceLink1Logan live streaming movie

    A new comer to the Away trunk is the FaceLink class. This one is also made for the
    animators among the Away users. This handy little class allows you to link
    objects to a face of a Mesh.
    Think here the sword that must follow the leg of the moving avatar, the optional weapon your hero just won during battle… of course you can do totally different things with it as well, like the demo above. In this case a light and a model are coupled to a FaceLink instance. I’ve even been able to make some very funcky Ik chains with it.

    The demo beneath shows an animated AS3 output being linked to a moving md2 model.

    AwayFaceLink2

    The code is very easy to implement:
    import away3d.animators.FaceLink;
    [..code..]
    facelink = new FaceLink( item, mesh, mesh.faces[index], offset, align, target);

    Lets say you have a gun, and you have prepared an avatar with a hand dedicated for this purpose. The code required when you want the model starts “wearing” the gun would then be: facelink = new FaceLink( gun, hero, hero.faces[index], 0, true);

    Now the warrior you have made, has a gun thats opens from the leg
    you code triggered the opening and you want the gun go outside the opening.
    You just need to increase the offset. facelink.offset += myTweenValue;
    The offset is calculated from face center, from there positive or negative values
    will position the object along the normal vector of this face. You can change at runtime the face or any other properties of the class.

    The align property triggers a lookat: the gun following a leg while its walking.
    The last optional is another lookat. The gun would point at a specific coordinate.
    That’s the gun pointing at the target.

    Finally the engine needs to know if you want keep it alive, because you want be able to let the gun fall, or assign another weapon to the warrior.

    Add just this line when the model position are updated, in case of static models.
    facelink.update();

    On moving item or geometry change like for animated md2, pass a boolean :true
    facelink.update(true);

    if you do not want the gun to be updated: don’t update, or pass another object to the class.

    AwayFaceLink1

    This little demo is also using the class, but is an excuse to show you the new added property for the BitmapMaterial: showNormals, which comes very handy to debug model geometry.

    Away3D Smooth transitions

    Flash

    normalmaps1

    This is something I wanted add to Away for quite a while now and I’m pretty sure animators and game makers will be pleased with this one: Be able to have smooth transitions between actual playing animation state and the next one while still playing own smooth animation.
    The engine was already able to interpolate smoothly between keyframes of an animation, but when a new animation was started, if the animator did not provide any logical keyframes to start the next one, the result was a sort of hard cut between sequences. Even with the addition of smart keyframes, there was allways a gap. Not anymore!

    This little demo illustrates the differences. Just clik on the objects to toggle the animations and be able to see the transitions at work.Watch movie online The Transporter Refueled (2015)

    This behavior is now standard to the engine, and can be updated at runtime.
    It works for all the supported mesh animations of the engine: md2, AS3 animated exports and the Animator class. It will be automatically triggered when a new animationSequence is started.

    The standard transition duration is set to 10. Witch means that during the next 10 render sessions, the animation will be interpolated using its own animation information and will gradually get 1/10 less information of the last state of the previous animation.

    To change it runtime it’s easy (like most Away code):
    (myanim as Mesh).transitionValue = 20;
    This value for instance would, depending on swf playrate, display a very smooth transition.
    Ideal for changes between logical states such as “sit” to “stand”.
    For transitions that should go faster, like “jump”, just set the value lower.

    To keep the previous engine behavior, set it to 1 witch is the lowest value possible.
    (myanim as Mesh).transitionValue = 1;

    You do not need to set it per enterframes unless you want to. You can set it just once if you want another value than the default 10 or set it runtime on animation changes to get most logical movements between your animation sequences. If you are pleased with the default value: do nothing!

    Watch movie online 1916: The Irish Rebellion (2016)

    Flash

    WATCH NOW


    Quality : HD
    Title : 1916: The Irish Rebellion
    Director : Ruan Magan,Pat Collins.
    Writer :
    Release : 2016-03-16
    Language : English.
    Runtime : 85 min.
    Genre : Documentary, History, TV Movie.

    Synopsis :
    Movie \’1916: The Irish Rebellion\’ was released in March 16, 2016 in genre Documentary. Ruan Magan was directed this movie and starring by Liam Neeson. This movie tell story about The documentary – featuring a combination of rarely seen archival footage, new segments filmed on location worldwide, and interviews with leading international experts – also uncovers the untold story of the central role Irish-Americans played in the lead-up to the rebellion. Although defeated militarily, the men and women of the Easter Rising would wring a moral victory from the jaws of defeat and inspire countless freedom struggles throughout the world – from Ireland to India.

    WATCH NOW

    Away3D Normalmaps Generation (2)

    Flash

    normalmapsMike and Dave Need Wedding Dates movie download

    This demo shows the combination of a normalmap after its generation with a bumpmap.
    The settings are of course overkill, but they should show you enough how powerfull and good looking this combination can be. Even with this amount of faces.

    Two events for the monitoring of the trace are available, TraceEvent.COMPLETE and PROGRESS. Handy if you generate from very large models.
    You can set the amount of polygons to be handled per iteration to avoid to crash the player as well and even add a little blur to smooth the results.

    The demo shows also one of the feature the new NormalUVModifier class has to offer.

    First a sphere is generated and the bump information is applyed to it with the NormalUVModifier class. (I will soon show more of what this baby is capable of)

    normalmaps

    Then the Dot3Material is generated with the following maps and of course the generated normalmap.

    normalmaps
    normalmaps

    A Flash 10 dedicated version is in the make. And should be available soon in a good svn near you.

    Away3D Normalmaps Generation

    Flash

    normalmaps

    How frustrating is it to have a Dot3Material in Away3D and not be able to use it because you need to have a special map generated by some expensive or not easy to use tool? Especially knowing how smooth and natural surfaces can look like…
    Wouldn’t it be a bit easier to ask Away to make one for you?

    Like this:
    var mapgen:NormalMapGenerator =
    new NormalMapGenerator(myMesh, width, height);
    var normalmap:BitmapData = mapgen.normalmap;
    var mat:Dot3BitmapMaterial =
    new Dot3BitmapMaterial(myColorBMD, normalmap);

    Wow wow… please critics calm down!! I’m aware that the very concept of a normal map is to simulate high polygon look to low polygon models. You soon can write an Air app, load some heavy models into it and output a map in the same spirit if you want. BUT what if a normalmapped model was looking damn good with a map defined by its own low polygon geometry? That’s exactly the question I had while doing some F10 research. And best way to find out is to write a generator and see how it goes.

    To be honest, I’m absolutely surprised it looks that good even with the few glitches I still need to fix. Look at the definition of the highpolygon model and the generated one. A lot less information is in there, yet it still looks good once applied. The next step will be to merge bumpmaps to it in order to get some detailing back.

    normalmaps2
    The highres output from highres model

    normalmaps3
    The Away output from low res model

    Let me do some polish/clean ups, add a little system where you can make more of them without freezing Flash for a few seconds to that class before it lands into the svn and you will be soon able to try it by yourself.

    Thx Arno! This one’s for you!