This is G o o g l e's cache of http://www.flashsandy.org/forum/lofiversion/index.php/t573.html as retrieved on 24 Jul 2007 11:39:00 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:9pbJk-RUEsIJ:www.flashsandy.org/forum/lofiversion/index.php/t573.html+site:www.flashsandy.org+index.php&hl=en&ct=clnk&cd=110


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: index php

Alejandro Gonzalez
Hello, I just wanted to say thank you! we successfully implemented the DistortImage Class on our website's portfolio areas.

the url is http://www.zerofractal.com

We wanted to show the content as projected on a screen or on a notebook rendering. This was easily done with Sandy's class. We even added the possibility to animate a maximize which tweens the distorted image to a font view.

We had to do some tweaks to achieve image smoothing and distorion to transparent movieclips. This of course resulted in 100% CPU usage, but was easily solved not making the 3d distortion on every frame of the movie but rather on demand each time something actually changed and needed to be rendered.

Any crits and comments on our new site are welcome.

Thanks again,

Alejandro.
kiroukou
Really clean and cool website.
Few parts are a bit heavy, but it is ok for me.

The use of the DistortImage class is nice. I see that you handle nicely smoothing especially for text input! Good work!

I'm sure that a lot of people would love to see your modifications. I didn't do that myself because I thought that anyone can adapt the idea to fits his needs after that.
And text distortion is a common problem for users here smile.gif

Otherwise, I do like your website. Video is nicely integrated, no bugs here on my mac and opera with latest beta flash player

Good work !
Thomas
Alejandro Gonzalez
QUOTE(kiroukou @ Jun 29 2007, 03:26 AM) *

Really clean and cool website.
Few parts are a bit heavy, but it is ok for me.

The use of the DistortImage class is nice. I see that you handle nicely smoothing especially for text input! Good work!

I'm sure that a lot of people would love to see your modifications. I didn't do that myself because I thought that anyone can adapt the idea to fits his needs after that.
And text distortion is a common problem for users here smile.gif

Otherwise, I do like your website. Video is nicely integrated, no bugs here on my mac and opera with latest beta flash player

Good work !
Thomas



Basically added smoothing (__render):
Original -> c.beginBitmapFill( texture, sM, false, false );
Modified -> c.beginBitmapFill(texture, sM, false, true);

Added Transparency:
var b:BitmapData = new BitmapData(wid, hei, true,0x000000);
var d:DistortImage = new DistortImage (Interface3D, b, 6, 6);

This had to be moved to the render frame to clear the bitmap or else the frames would add onto the previous frame giving a funky effect.

This resulted on a huge CPU usage. To avoid rendering all of the frames, i did a function which evaluates a flag on the on enter frame only rendering on demand. Also, because AS2 does not let the user change the FPS on runtime as does AS3, I made a counter that would let me render only every nth frame depending on the performance chosen by the user. It looks something like this:

CODE

//3D Rendering-------------------------------
//Tesselation
var bitRes:Number = 6;

//Activate 3D rendeing indefinitely
var render = false;

//Activate 3D rendering once next frame
var renderNextFrame = true;

//Countdown to render only nthFrame (when active)
var renderNthFrame = 0;

//State Flags
var maximizing = false;
var maximized= false;
var paging=false;

this.onEnterFrame = function ()
{
    /*
        Optimizes medium and low performance:
        
        FPS
        ===
        Fast      full fps
        Medium   fps/2
        Slow      fps/3
        
        3D Rendeing
        ===========
        Fast:     7 tesselations (original)
        Medium:     6 tesselations (okish)
        Slow:     5 tesselations (jerky images)
        
    */
    switch(_level0.perf){
        case 0:
            bitRes=6;
            renderNthFrame++;
            if (renderNthFrame >= 2) renderNthFrame=0;
            break;
        case 1:
            renderNthFrame++;
            if (renderNthFrame >= 1) renderNthFrame=0;
            bitRes=6;
            break;
        case 2:
            bitRes=7;
            break;
    }
    
    if ((renderNthFrame == 0) && (Interface3D._visible) && ((maximizing) || (paging) || (renderNextFrame))) {
        renderNextFrame = false;
        var b:BitmapData = new BitmapData(uiWidth, uiHeight, true,0x000000);
        var d:DistortImage = new DistortImage (Interface3D, b, bitRes, bitRes);
        d.texture.draw(Interface2D);
        d.setTransform(marker1._x, marker1._y, marker2._x, marker2._y, marker3._x, marker3._y, marker4._x, marker4._y);
    }
}


Once again, thanks for such a handy class.

Alejandro.




This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2007 Invision Power Services, Inc.