You are not logged in.

1

Sunday, May 22nd 2011, 10:46pm

simplex noise idle plugin

I've made a small plugin to replace the default autorotate. This one goes up, down, left and right and zooms in and out by Simplex noise (which is interpolated random numbers). (see live js example of Simplex vs Perlin noise here)

Source is here (for now)
http://test.ronvalstar.nl/krpano/scripts…xIdle.source.js

Minified version here
http://test.ronvalstar.nl/krpano/scripts/simplexIdle.js

Example here (js version only so use safari)
http://test.ronvalstar.nl/krpano/

Implement by using this xml

Source code

1
2
3
4
5
6
7
8
9
10
<plugin name="simplexIdle" 
	url="../../scripts/simplexIdle.source.js"
	idleTimeout="2000"
	keep="true"
	forceh="2"
	forcev="1"
	forcez="3"
	frequencyv="1"
	attractz="1"
/>


XML attributes are
force[h|v|z] :: the speed or amount of force applied (where z is the fov)
frequency[h|v|z] :: the frequency of the noise
attract[v|z] :: attracts the vertical offset or the field of view to the middle or default
offseth :: a value similar to the original autorotate, added to forceh

So what do you think? Any suggestions?
Maybe I should put in a toggle or a dis- and enable function?
Or maybe I should replace the Simplex by Perlin noise (speed increase but less good noise)?

gr...

Ron

ps: Klaus, if you're reading this, is there any reason why this is not working in swf mode? I get a [ERROR: decoding failed - scripts/simplexIdle.js].

2

Monday, May 23rd 2011, 9:57am

RE: simplex noise idle plugin

I tried it in Safari. It starts out with quite a bit of stutter, but once it gains some speed the effect is a welcome change to the standard autorotate.

Quoted from "Sjeiti"

is there any reason why this is not working in swf mode? I get a [ERROR: decoding failed - scripts/simplexIdle.js].


The flash viewer can only load swf plugins (or static images, but no js). So you would need to port the plugin to swf to support both.

Zephyr

Professional

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

3

Monday, May 23rd 2011, 10:18am

I think porting this to Actionscript isn't that hard. I could help when I have time. We dutchies have to help eachother ;)
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

4

Monday, May 23rd 2011, 10:31am

Yeah the stutter is a bit weird... as if the starting framerate is less.

As to porting to as3, I think it would be ideal if there's just one code that fits both js and as3. I first created this javascript for a different Krpano project and calling an swf from js works just fine. It just fails for swf when the code is poored into this js plugin form.
(I've already ported both Perlin and Simplex noise from Java to as3 should we eventually need it)

Tuur

Sage

Posts: 3,184

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

5

Monday, May 23rd 2011, 11:01am

Hi
Great!

Can you make it that it detects the amount of hertz?
When hrtz is 440 lookat x etc?

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

6

Monday, May 23rd 2011, 9:15pm

Don't exaxtly know what you mean by hertz but if you mean multiplying the average framerate by the speed then that's a very good point.

-update-

Implemented...
This does seem to fix the stuttering, only now I have a speedy start... maybe I should wait a few frames for deltaT to settle down.

...and oh yeah... brainfart : what about randomly/automatically clicking (nearby) hotspots... is that a nice feature?

This post has been edited 2 times, last edit by "Sjeiti" (May 23rd 2011, 11:25pm)


Tuur

Sage

Posts: 3,184

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

7

Monday, May 23rd 2011, 11:41pm

*g*

i think i fully didn't understand your plugin..
*g*

let me think ..

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

8

Monday, March 26th 2012, 2:23pm

hi Sjeiti!

first of all congratulations for your plugin...is beautiful to see it working on an iPad...this random movement is...wow!!

i'd like to ask y if it would be possible to implement a plugin like this simplex idle / perlin but instead of altering the movement of the pano, altering the quality of the image

some years ago i made with fpp and flash a pano where the image was altered....i would like to know if it would be possible to do a thing like that if not so wild due to the iPad processor but something to alter it

here is the link with the altered pano made with FPP and flash in order to show the idea

http://homepage.mac.com/imge/sp/index.html

thanx in advance