Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 10:42 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 62 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 23rd, 2011, 1:23 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Thanks for the clarification.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 23rd, 2011, 1:24 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
One last tweak. Added random colour option. By default it will pick a random colour regardless of current colour. Is selected is false, it will switch between colours. IE Black will become white.

Run and switch whilst playing. It makes quite a drastic affect on the effect (is that the right way round?).

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 23rd, 2011, 1:55 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Attached is the same principle in Opus but scaled to 400 dots.

Mack


You do not have the required permissions to view the files attached to this post.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 23rd, 2011, 2:06 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

As to the Adobe Flex version, seems correct speed is with the random color off.

The IMP you sent is impressive. Makes me think that if only I could get those 6400 objects all on the page, it could work. A wish, anyway.

Not sure how to Quickbuild this and get each one properly named. Can see smoke coming out of the machine. :)

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Last edited by Stephen on February 23rd, 2011, 3:20 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 23rd, 2011, 2:12 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
They don't need naming. It uses the GetChild method which accepts an index not a name.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 23rd, 2011, 2:50 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Thanks, Mack.

That's good news.

So far, I have not been able to Quickbuild or multiple paste to create a 640X640 canvas with 6400 dots. Knew that this would be a challenge.

I wonder if the dots can first be created as 1 X 1, then the frame somehow scaled up to 8 X 8?

Probably needs a 'super-computer' to build this overwhelming number of objects (and have it run OK). :)

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 27th, 2011, 8:23 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Based on the developing discussions, it seems that Opus will not have the capability to manage the few thousand objects (Stephen's 6400 points). I suppose you could cut that 'load' be 50% by maintaining a white canvas and then 'placing' 3200 black objects in some randomly distributed pattern. Then operate on the randomly selected subset of 400. The challenge would be figuring out the logic to only place and land the moved objects on white space (ie, not land on another black point).

I found an error in the script I posted above, and even though you are not likely to use it now I should correct it in the event some other reader later tries to use it or adapt it somehow. I changed one Line in the earlier post. Below code reflects that change (to the if statement). You could also move the GetState and SetState action commands to outside of the While Loop (so that points change at approximately the same time) -- use appropriate for Loop.

Code:
while ( kup < 40 ) {
ran =  Math.random( poolsize ) ;    //NOTE: according to the Help files, the script command 'random' is supposed to return Integer values when a Limit is specified;  if this does not work as intended (want integers 0 to 99), then simply use  parseint, or Math.floor() in conjunction with the random function.
   //incorrect//if ( AR[ ran ] ) {
   //corrected//
   if ( AR[ ran ]  !=  -1 ) {
   AR[ ran ] = -1 ;                  //we simply want to tag or flag this one ELEMENT as taken -- this simultaneously enforces 'no repeat'
   bstate = Pool01.GetChild( ran ).GetState() ;
   Pool01.GetChild( ran ).SetState( !bstate )         //  ********* this action is what flips the pixels *********
   kup++
   } //end if

} //end while

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 27th, 2011, 2:29 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Larry,

Yes, I have not been able to get 6400 8X8 dots into a frame, using Quickbuild or multiple copy/paste. Came close but not close enough.

I had also thought of cutting these down to 3200, keeping the background white (or other work-a-rounds, like creating smaller dots, 1X1, and scaling them up), but this will not produce the truly random pattern needed to meet the "standard" for dynamic visual noise, which is a nicely meandering animation in which the dots almost twinkle like stars.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 28th, 2011, 9:47 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Had a brainwave. Use the drawing function instead.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 28th, 2011, 1:10 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Early on, I had thought about using that (drawing function to draw the dots into a frame) but couldn't figure out a way to script it. I got stuck, when trying to devise a "proof of concept" sample script, with how to get each dot's name for storage into an array, so these could become part of the pool from which a specific number of dots could then be randomly chosen every 100 ms for changing/flipping their color.

Could you suggest a small sample script to try that out? (Then it could be extended for 6400 dots.)

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 28th, 2011, 2:59 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
The theory is quite simply really:


Code:
myPositions = new Array()

for (var x=0;x<80;x++)
   {
   for (var y=0;y<80;y++)
      {
      myPositions[y+(80*x)] = new dot(100+x,100+y)
      
      Debug.trace(myPositions[y+(80*x)].x+','+myPositions[y+(80*x)].y+'\n')
      }
   
   
   }



function dot(x,y)
{
this.x=x
this.y=y
this.colour = null
}


This will create a new array containing the 6,400 dots which are just USER objects instead of HOST objects such as buttons or frames. Start by shuffling the array, as discussed previously and then focus on the use of the drawing functions to create the noise. For example:

Code:
Frame.DrawRectangle(myPositions[0].x, myPositions[0].y, 8, 8)


Would draw a square in the frame called 'Frame' at the positions defined in the USER object held in element '0' of the array myPositions. If the array is shuffled, something like:
Code:
for (var i=0;i<3200;i++)
{
Frame.DrawRectangle(myPositions[i].x, myPositions[i].y, 8, 8)
}


Will create 3,200 randomly placed squares in the frame that could be used to create the initial noise effect. From then on, it's a case of just shuffling the array again and drawing 400 new squares on top over a period of 1 second.


Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: February 28th, 2011, 3:55 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

A little complex for me to get my brain around and implement.

But very interesting possibilities!

Am stuck trying to figure out what to do next? (When I call the dot function, nothing seems to happen.)

I'll attach an IMP.

Kind Regards,


You do not have the required permissions to view the files attached to this post.

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: March 1st, 2011, 9:17 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Ah. I think you might need to take several steps back and get your head around the OOP aspect. There should be various post looking at this and many starter guides on Javascript cover it - look for anything up 1.2.

I believe that if you need to build it, Opus can do this with the drawing tools.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: March 1st, 2011, 10:33 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Thanks for your help and suggestions.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: TV static/white noise animation in Opus Pro
PostPosted: March 1st, 2011, 11:55 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Sounds like a contest/giveaway -- re: 'random drawing'. :wink:

I regress here, back to the statement about limitation of Opus and so many host objects...
Quote:
I have not been able to get 6400 8X8 dots into a frame, using Quickbuild or multiple copy/paste. Came close but not close enough.
I wonder if the following might work for your 80 x 80 grid.

Would Opus perform any better if you just created 80 vector objects, each with 80 child Polygons?
The random generation routine could use a single array of 400 length to assign the flags.
You would still operate on addressing the polygons by GetChild(), but now using nested FOR LOOPS to run through the children.
Then you simply 'flip' the polygon color (flip by fill colour, transparency, or hide/show).

Maybe a great simplification could be to take that address, AR[ ran ] = 3457 for example, which is one of the 400 selected or flagged. And convert that into a row and column index.
Code:
var colX =  Math.floor( 3457/80 ) ;  //corrected to result in an integer.  Expression originally posted was:   var colX =  3457/80
var rowY = 3457%80
Frame8080.GetChild( colX ).GetChild( rowY ).SetFillColour("black")
Implements direct addressing of children. That would eliminate any need for LOOPING through the Vectors and polygons.

The above is theory -- that is I have not verified. Would need to at least make sure the indexing is correct zero-based or not.

[Lar EDIT:] I think I assumed that one Vector object would represent an entire column (think Excel, Col C row 1 to 80)
[Lar EDIT 2] I detected a mistake in the above approach/code. I needed an integer value for an index, so var colX = 3457/80 needs to be reduced to an integer only. Use parseInt, or var colX = Math.floor( 3457/80 )
Of course, this is illustrating the example and the real code would use variable such as earlier: AR[ ran ]

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Last edited by Lar_123 on March 2nd, 2011, 6:46 am, edited 3 times in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 62 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group