PDA

View Full Version : New autorotator plugin


nidrig
11-04-2008, 08:42 AM
Hello,

Denis was kind enough to provide me the source code of the autorotator plugin. I could then modify it so it will support the new parameters of fpp 2.3. It means that the autorotator plugin now supports fpp Flash10 improvements.

Of course, it's backward compatible and flash 9 users won't see the difference.

Note that you must have the v2.3 of fpp for this plugin to work correctly.

On powerful computers, the cpu dropped from 90% to 30%, with quality set to medium. On slow machines, the panos are now rotating smoothly even if the CPU is still 100%.

In attachment, you have both the source and the compiled files; distributed with Denis approval.

Enjoy.

myksa
11-04-2008, 12:10 PM
Hi,

thanks for publishing plugin, it helped me to solve problem I was talking about in this post:

http://flashpanoramas.com/forum/showthread.php?t=1852

With source, funcionality I was talking about was easy to do, I just added parameter start, when it's set it fires go() function, and panorama starts playing immediately.

Tuddi
11-04-2008, 10:01 PM
Thanks nidrig!

That was needed.

How about doing an autopsy on the lensflare, and see if it can run more smoothly in Flash 10 and with FPP 2.3 ?

It's terrible on 2.3 in comparison to 2.2.1 and Flash 9 ... which was still not perfect or smooth.

user101
11-06-2008, 08:28 AM
Thank you both.

HansNyberg
11-06-2008, 02:46 PM
I have been testing the new plugin and there is no difference at all on my Mac 2.0 dualcore.
Same on my Intel MacBook Pro

Safari uses 120% on both for autorotation in Fullscreen and 110% in a fullscreen browser window.

Hans

ayrton
11-06-2008, 03:42 PM
Hello guys,
I'm trying to download the autorotator.zip from here but I only get a ATTACHMENT.PHP and not the autorotator at all. Any ideas ?
I tried to change the name to autorotator.swf but it did not work at all ?!?!
Thanks for any help
best
AYRTON

nidrig
11-06-2008, 05:06 PM
Hello guys,
I'm trying to download the autorotator.zip from here but I only get a ATTACHMENT.PHP and not the autorotator at all. Any ideas ?
I tried to change the name to autorotator.swf but it did not work at all ?!?!
Thanks for any help
best
AYRTON

Are you logged in? I think to need to be identified to download files.

nidrig
11-06-2008, 05:12 PM
I have been testing the new plugin and there is no difference at all on my Mac 2.0 dualcore.
Same on my Intel MacBook Pro

Safari uses 120% on both for autorotation in Fullscreen and 110% in a fullscreen browser window.

Hans

Its curious, on my Intel based Mac, safari was at 150% and now "happily" remains at 140%.

The performances are far better under windows, but that's all about flash 10 implementation.

I'm not a Mac user at all; what does it means for a processor being used above 100%? dual-core = 200%, thus 150 = 75% each proc?

HansNyberg
11-06-2008, 06:52 PM
Yes the processor use on Mac seems to measure 2 processors as 200%
I have no idea if this goes on to 400% for the ones with 4 cores.

However I have also found that the FPS speed on Mac is not at all worse than on PC.
There is a special thing on Mac, Panning becomes much smoother when entering fullscreen Mode.

I done some measures

I have added the FPS meter to Steve Dorans City of Arts
http://www.panoramas.dk/2008/flash/valencia-city-of-arts.html

Here are mine
Autorotation
Mac G5 dualcore 2.0 This is my standard workhorse from june 2003.
I have 2 monitors attached to it. Videoram is only 128mb, 64 to each monitor.
Cinema 23" 1920x1200
Browser FPS 6 - Fullscreen FPS 12
32" LCD 1344x768
Browser FPS 12 - Fullscreen FPS 20

MacBook Pro 17 2,16 mhz 1660x1050
Browser FBS 16 - Fullscreen FPS 18

It looks like the Fullscreen super performance is a Mac PPC speciality because when I tested it on my test Windows PC a very average AMD 2210 mHZ I got the opposite results.

At 1280x1024 I got FPS 8 for Fullscreen and 10 for Browser window,

The difference seems to be that on PC the Framerate doubles for manual panning while on Mac I can not get it higher than the autorotation.

Hans

nidrig
11-06-2008, 07:19 PM
hi,

According to Adobe, to have good performances (for ex. 20-30fps@1280x720) with flash 10, you need a recent hardware:

http://www.adobe.com/products/flashplayer/systemreqs/

Hans, I tried your pano:

With my Mac Mini, Intel Core duo 1.83GHz, I have 24fps both browser and full screen with autorotator. 40fps without autorotator. Manually panning remains to 26.

With my Pc, phenom 9850 (quad core), ati crossfire (2xReadon 3870 512), I have 40fps all the time. No matter what I do. I guess this is the max allowed.

Thus, flash 10 really takes advantage of the hardware.

Yet, I cannot imagine displaying a message on my visits "please update your hardware for better performances.." ;)

ftrippie
11-10-2008, 12:04 PM
Hi,

I posted below question in another thread, but actually should have posted it here. So here goes:

Thanks for the new autorotator plugin, but I have a problem. It doesn't seem to work with OnOver on a hotspot (the old one does). Any idea?

My code:
<spot id="ggle-sev" linked="ggle-mad" url="../common/ggle-mad.png" pan="-65" tilt="-20" alignX="-0.67" alignY="-0.98" scale="1" depth="1" smoothing="1" shadow="1" shadowDistance="5" shadowAlpha="0.7" shadowBlur="10"

onOver=" pano.pan_v=0; pano.tilt_v=0; pano.zoom_v=0; external.autorotator.disabled=1 "
onOut="external.autorotator.disabled=0 "
/>

(however, it does seem to work on OnOut and OnClick, but that's not what I want of course)

cheers,
FTrippie

nidrig
11-10-2008, 12:27 PM
hi,

It's strange. You can look at the source code, there's nothing within that either modify the "visible" parameter or deals with MouseOver events.

thus I've no clue what's going on.

Do you have live pano where this behavior can be seen?

cu

ftrippie
11-11-2008, 09:19 AM
Hi Nidrig,

Weird, I just found out that even with the new autorotator, it seems to work in Flash9 (and the FPP2.3).
So, only the combination NewAutorotator+Fpp2.3+Flash10 seems to have the problem of not stopping at OnOver.


Btw, I cannot show the tour in public yet (will do in the future), but I will send you a private message.

Cheers,
FTrippie

ftrippie
11-11-2008, 08:53 PM
Had a discussion with Nidrig and we think the problem lies in the fact that I am using the movDecoder plugin and MOV files.
I think I have seen discussion about using the MOV files and being advised not to use them, but for other reasons which didn't really concern me.

So, now the question is; is anybody else having quality issues with movDecoder and FPP2.3+Flash10+autorotator?

DMCDigital
11-12-2008, 02:28 PM
I have a Mac Dual 2.0 identical to Hans machine but with 256meg GeForce video...no difference at all with new autorotate plug in..will try on PC

thatkeith
11-21-2008, 09:43 AM
MacBook Pro 2.16GHz Core2 Duo, 4GB RAM.

No difference between the old and the new autorotate plugin; both show the same obvious aliasing while rotating, whatever quality parameter I set.

(And I quit and relaunched Safari, emptied the cache, tried Firefox - no dice.)

k

jaaaab
01-12-2009, 10:52 AM
hey,

i find a better usage replacing line 142 with


if (flash10) {
pano.quality = "high";
}
else {
pano.quality = "low";
}


someone did any other changes?

cheers

Scott Witte
01-13-2009, 04:39 AM
i find a better usage replacing line 142 with


if (flash10) {
pano.quality = "high";
}
else {
pano.quality = "low";
}



jaaaab,

If I understand this correctly (and that is a BIG if) your modification overrides any user setting of quality while autorotating, setting it to high if you have Flash 10, otherwise to low. Even before Flash10 some people preferred setting autoroation quality to medium. Those folk would not appreciate being overridden.

What I think is needed are two quality settings for autorotation, "quality" for Flash9 and "quality2"for Flash10. Of course, we would have to add parsing of those new parameters to the newParams and setAttribute functions. If there were no quality2 parameter it should be set equal to quality.

Does that make sense?

This is the first time I've actually looked at the code. But at risk of sounding dense, I am confused by the following code starting at line 64:

if (flash10) {
pano.qualityStatic2 = pano.qualityStatic2;
}
else {
pano.qualityStatic = pano.qualityStatic;
}


Looks like we are setting a variable equal to itself, which seem somewhat futile. What am I missing? I vaguely suspect we should be setting pano.quality equal to pano.qualityStatic or pano.qualityStatic2.

jaaaab
01-15-2009, 08:44 AM
hello Scott,

yeah you right, i override, that was just for example of course ;) in case of flash 9 we should apply the xml settings.

I'm also confused about the code @line 64, which is useless to me.

I also use a debug version of Flash 10, and i often get errors about qualityMotion2.

Some old panos are displayed with Flash 10 quality, and others not, while xml isn't that much different.

Do you got same issues?

Maybe something's still wrong in v2.3...

nidrig
01-15-2009, 07:04 PM
Hi,

Thanks to Scott who pointed me to this thread.

I would like to apologize for this nosense plugin. I don't know what I put in my coffee that day, but I was flying high..

Denis introduced two parameters in fpp 2.3: qualityMotion2 and qualityStatic2, whose goals are to have different quality dependings on the flash version.

Example; you set qualityMotion (and static) to "low" for flash 9 users (as there's no hardware acceleration) and qualityMotion2 (and static2) to "medium" for flash10 users.

Thus, the only possible thing that the autorotator plugin could do, is adding a quality2 parameter so it would behave the same as fpp2.3

Example for autorotator; you set quality to low for flash 9 users and quality2 to medium for flash10 users.

This is how I modified the new version of autorotator I'm publishing now.

As for the line "pano.qualityStatic = pano.qualityStatic", I removed it. Denis must have put something similar to me in his coffee that day.

Again, I apologize for the mess. There's obviously no improvement with the "new" autorotator. Only a more convenient way of usage for different versions of flash.

So, the only things you need to do for this plugin is to add the "quality2" parameter within the <autorotator> tags.

Example:

<autorotator>
speed = 0.04
interval = 30
pause = 2000
quality = low
quality2 = high
</autorotator>

Means that flash 9 users will have a low quality and flash 10 users high quality.

Per default (if not specified in the xml file), the values are "low" for quality and "medium" for quality2.

I'll go for water from now on ;)

Thanks for your input.

jaaaab
01-15-2009, 09:35 PM
where did you buy that coffee?

Scott Witte
01-15-2009, 10:33 PM
Nidrig,

Thanks for the update! I tried to open your new fla and couldn't, getting an "unexpected file format" error. I'm guessing you saved this as a Flash10 file. Is there any way to save for Flash 9?

Now let me toss another monkey wrench your way: You would only want to use the quality2 setting if you were running in Flash10 and using FPP2.3 or greater. Otherwise you would want to use the quality value.

Assuming I'm right about that we need a way to test which version of FPP is running. I did a describeType() on panoController (aka panoMain) and see nothing like a version variable that can be queried. I found a variable named flash10 that is new to v2.3, however, so we could test for that. At the same time we could check its value and in that way determine if we are running in Flash 10 or not. Two test for the price of one check! So, I would suggest a modification something like this:
var flash10:Boolean = false;

var params:Array=[];

function init (panoMain:Object) {
try
{
if(panoMain.flash10) {
flash10=true;
}
}
catch (err:Error)
{
// trace("-----------This is FPP2.2 --------");
}

if (panoMain.addExternal(this)) {
moveTimer = new Timer(interval);
moveTimer.addEventListener("timer", doMoveStep);
moveTimer.start();

stage.addEventListener(MouseEvent.MOUSE_DOWN, doPress);
stage.addEventListener(MouseEvent.MOUSE_UP, doRelease);
}
}

Start by setting the flash10 variable=false, making that the default.

If you are running FPP2.3 the if statement will find that panoMain.flash10 exists and if it's true will set the local variable, flash10, to true. If false, flash10 is left at its default value = false.

If you are running FPP2.2 (or earlier) the test will throw an error, caught by the catch statement. Processing continues but the flash10 variable keeps its default value of false

As a result, quality2 will only be used if FPP2.3 is running in Flash10.

There may be a more elegant way of achieving the above. If so I hope someone points it out.

nidrig
01-16-2009, 08:14 AM
hi Scott,

It's a nice improvement to test if we have both flash 10 and fpp2.3.

I think you found the only possible way to test fpp's version as there's no variable that stores the version. As you pointed out, the flash10 variable is new to fpp2.3.

As for the file format, I'm using Flash CS4.

Here are the new version with your modification and saved in Flash CS3 format.

cu

Scott Witte
01-16-2009, 03:57 PM
Nidrig,

Sweet! Thanks for your work on this.

jaaaab
01-16-2009, 05:28 PM
Hi,

Please tell me if i'm wrong,but i noticed something strange.

Denis said it was silent update.

I noticed in an old xml, that if you change the parameter pano.qualityMotion=low in xml, Flash 10 is affected.

Even if specifying:


<parameters>

qualityMotion=low
qualityStatic=high

qualityMotion2=high
qualityStatic2=high

</parameters>


and writing somewhere in the xml (for a starting animation with tween for example)


pano.qualityMotion=low;
pano.qualityMotion2=high;
pano.pan=150,800;


v2.3 goes low on moving the panorama (independent of the autorotator).

Is it true for you?

Cheers.

nidrig
01-16-2009, 07:03 PM
Jaaaab,

I'm not sure I understand.

I noticed in an old xml, that if you change the parameter pano.qualityMotion=low in xml, Flash 10 is affected.

What does it mean?

I looked at the pano.swf code (don't hurt please), trying to understand how the static/motion/static2/motion2 are working and here is what the code says:

1. if flash 10 and the motion2/static2 parameters are defined, use them. If not defined, use the motion/static.
2. if not flash 10, use motion/static.

I cannot find the post, but I remember Trusti writting that for best performance you should use the same value for static and motion(resp. motion2, static2). For instance, static=medium and motion=medium.

Again, if I reference to the code, the quality parameter simply set the stage quality.

I never played with this. If time permits, I'll try to find out how the stage.quality parameter works for flash 9 and 10.

Tuddi
01-16-2009, 08:22 PM
I remember Trusti writting that for best performance you should use the same value for static and motion(resp. motion2, static2). For instance, static=medium and motion=medium.

That was more like a method to stabilize the hotspot images (preventing them from "dancing/jumping"). Of course, by using "high/high" it will be more resource demanding (CPU)...

Post is here: http://flashpanoramas.com/forum/showpost.php?p=8677&postcount=1

jaaaab
01-17-2009, 12:31 PM
Hi,

I mean even if you set motion2 and static2 to high, if you set pano.qualityMotion=low on a motion tween (for Flash 9 users), flash 10 goes to low quality

and i think it should not

Cheers

Scott Witte
01-17-2009, 08:23 PM
Jaaab,

The qualityStatic (or qualityStatic2) setting determines the quality during a pan function (or tilt or zoom). The qualityMotion settings apply when you click and drag the pano and with panKey, tiltKey or zoomKey. I just ran tests which show clearly that quality does not drop to low from a higher setting during a pan function in FPP2.3. You can see this best if you zoom in on a scene containing straight, diagonal lines and make your movements go slowly. With qualityStatic2 at low those lines exhibit a stair step quality (no aa). At higher settings the lines are smooth. Start your pan function and you will see clearly that the quality does not change unless we are doing something different.

But there may be another quality bug in v2.3. There seems no difference in quality settings of medium, high and best. You can see this clearly if zoomed in, especially on diagonal lines, and changing quality static settings using the editor. All higher settings exhibit the same medium quality. Denis told me that is because Flash10 handles anti-aliasing differently. But I wonder...

Nidrig, could you kindly check "under the hood" again and see if Denis accidentally sets StageQuality only to medium regardless whether the XML specifies medium, high or best? Thanks.

Scott Witte
01-18-2009, 05:13 AM
OK. Got way too wrapped up in testing and found strange things which I will pass on to Denis.

First, a "pano.qulityStatic2=" command does nothing to change quality in FPP2.3. qualityStatic2 in the <parameters> tag affects the initial setting but after that only pano.qualityStatic causes chages. That is plainly wrong.

Second, the attached animated GIF compares qualityStatic settings in FPP 2.2 and 2.3. It was generated from screen shots and blown up to 200%. The "Midwest Express Theater" label is a png spot object so it sits above the pano layer. The qualityStatic setting was changed using the editor plugin. Notice:

1) Comparing Best between 2.3 and 2.2, the label in both show the same, smoother AA but only the 2.2 pano does.

2) Comparing Best and Medium in 2.3, the label changes quality (AA) but not the underlying pano.

3) Comparing Best and Medium in 2.2, both the label and pano change quality.

4) Comparing Medium in 2.2 and 2.3, the label again is the same between them but 2.2 still shows more AA, especially in the diagonal in the lower left.

All these were run in Flash10. The only difference was the version of the FPP pano.swf used. From a practical standpoint there may not be enough difference between medium and best quality in either version of FPP to get overly concerned about. But sometimes the difference really bites. See the 5th post in this thread (http://flashpanoramas.com/forum/showthread.php?t=1983). But it seems strange there would be any difference between 2.2 and 2.3 if both are issuing the same command to Flash, stage.quality=.

FWIW.

nidrig
01-18-2009, 09:35 PM
Nidrig, could you kindly check "under the hood" again and see if Denis accidentally sets StageQuality only to medium regardless whether the XML specifies medium, high or best? Thanks.

At first sight, I see nothing of sort. What I noticed is that the quality value is changed *a lot* of time. When a pano is loading, when it's moving, when it's static, when it's parsing and so on. I wouldn't be surprised to discover side effects.

For a more in depth understanding and debugging, I need to add traces within the code to see in real time what the values of the various quality parameters are.

Currently, I just peeked into the code to understand the API and I'm already violating the license terms. Modifying and recompiling is something I dare not do.

Asking Denis would be a wiser option.

I hope you understand. Sorry not being much help.

Scott Witte
01-18-2009, 09:48 PM
Nidrig,

I understand and absolutely agree. Just wondered if you saw something obvious. I have sent an email to Denis. Hoping he can at least fix the bug with pano.qualityStatic2= having no effect.

HarleyBoy
07-07-2009, 05:51 AM
Thanks nidrig!

That was needed.

How about doing an autopsy on the lensflare, and see if it can run more smoothly in Flash 10 and with FPP 2.3 ?

It's terrible on 2.3 in comparison to 2.2.1 and Flash 9 ... which was still not perfect or smooth.

yes I'm agree with him I need too that. tanks :rolleyes: