DOF help

8 messages Options
Embed this post
Permalink
Daniel O' Brian

DOF help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi,

 

I’m new to Papervision so excuse any ignorance of what are seemingly simple concepts to you all.

 

I’m trying to build a project with a similar depth of field effect to the Absolut clouds in the submitted visions section at http://www.absolut.com/iaaw

 

I’ve seen the impressive Mr d00b DOF demo, but this approach (of creating a sequence of preblurred materials) will not work in ttis instance as I understand it as each blurred object needs to contain interactive material.

 

So, I went down the route of applying blur based on distanceTo(camera) and have a function triggering on ENTER_FRAME which runs a for loop to update the blur on each item in the scene.

 

Problem is that this seems to only be taking a value from the last item accessed in the for loop and changing the materials for all items based upon this.

 

If I blur one item will this also blur any other item with the same material or is each instance treated as a separate entity? I have tried creating one material bper object but this slows things down to a crawl and the same problem as above still applies.

 

Any ideas? Anyone?

 

Cheers

 

Danny O’Brian


This email transmission is confidential and intended solely
for the person or organisation to whom it is addressed. If you
are not the intended recipient, you must not copy, distribute
or disseminate the information, or take any action in relation
to it and please delete this e-mail. Any views expressed in
this message are those of the individual sender, except where
the sender specifically states them to be the views of any
organisation or employer. If you have received this message
in error, do not open any attachment but please notify the
sender (above). This message has been checked for all known
viruses powered by Messagelabs. For further information
visit www.messagelabs.com/stats.asp Please rely on your own
virus check as no responsibility is taken by the sender for
any damage rising out of any virus infection this communication
may contain.

LIDA Ltd 36 Golden Square, Soho, London, W1F 9EE, United Kingdom
Reg No. 03860916, registered in the United Kingdom.

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
cyberpunk

R: DOF help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

If you use the Effects branch, you can create a set of layer each with a blur filter with different intensity.

Then you will switch the objects from one layer to another based on the item’s distance from the camera.

 

In this way you can also use the same non-animated material for every object. And, most important, layer doesn’t slow down things.

 

I’ve to build a DOF in the next days, and that’s the way I’m planning to do it :)


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Daniel O' Brian

Re: R: DOF help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Thanks for that, you mention not animated materials, does this include materials with dynamic content?

 

D


From: [hidden email] [mailto:[hidden email]] On Behalf Of CyberPunK
Sent: 11 April 2008 13:13
To: [hidden email]
Subject: [Papervision3D] R: DOF help

 

If you use the Effects branch, you can create a set of layer each with a blur filter with different intensity.

Then you will switch the objects from one layer to another based on the item’s distance from the camera.

 

In this way you can also use the same non-animated material for every object. And, most important, layer doesn’t slow down things.

 

I’ve to build a DOF in the next days, and that’s the way I’m planning to do it :)


This email transmission is confidential and intended solely
for the person or organisation to whom it is addressed. If you
are not the intended recipient, you must not copy, distribute
or disseminate the information, or take any action in relation
to it and please delete this e-mail. Any views expressed in
this message are those of the individual sender, except where
the sender specifically states them to be the views of any
organisation or employer. If you have received this message
in error, do not open any attachment but please notify the
sender (above). This message has been checked for all known
viruses powered by Messagelabs. For further information
visit www.messagelabs.com/stats.asp Please rely on your own
virus check as no responsibility is taken by the sender for
any damage rising out of any virus infection this communication
may contain.

LIDA Ltd 36 Golden Square, Soho, London, W1F 9EE, United Kingdom
Reg No. 03860916, registered in the United Kingdom.

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Lofih

Re: DOF help

Reply Threaded More More options
Print post
Permalink
In reply to this post by Daniel O' Brian
Some javascript/style in this post has been disabled (why?)
Hi Daniel,

The I do it, is to just have a reference Z, usually 0, and apply a blur accordingly to the movie.

hope it helps,
Pedro.

On 4/11/08, Daniel O' Brian <[hidden email]> wrote:

Hi,

 

I'm new to Papervision so excuse any ignorance of what are seemingly simple concepts to you all.

 

I'm trying to build a project with a similar depth of field effect to the Absolut clouds in the submitted visions section at http://www.absolut.com/iaaw

 

I've seen the impressive Mr d00b DOF demo, but this approach (of creating a sequence of preblurred materials) will not work in ttis instance as I understand it as each blurred object needs to contain interactive material.

 

So, I went down the route of applying blur based on distanceTo(camera) and have a function triggering on ENTER_FRAME which runs a for loop to update the blur on each item in the scene.

 

Problem is that this seems to only be taking a value from the last item accessed in the for loop and changing the materials for all items based upon this.

 

If I blur one item will this also blur any other item with the same material or is each instance treated as a separate entity? I have tried creating one material bper object but this slows things down to a crawl and the same problem as above still applies.

 

Any ideas? Anyone?

 

Cheers

 

Danny O'Brian


This email transmission is confidential and intended solely
for the person or organisation to whom it is addressed. If you
are not the intended recipient, you must not copy, distribute
or disseminate the information, or take any action in relation
to it and please delete this e-mail. Any views expressed in
this message are those of the individual sender, except where
the sender specifically states them to be the views of any
organisation or employer. If you have received this message
in error, do not open any attachment but please notify the
sender (above). This message has been checked for all known
viruses powered by Messagelabs. For further information
visit www.messagelabs.com/stats.asp Please rely on your own
virus check as no responsibility is taken by the sender for
any damage rising out of any virus infection this communication
may contain.

LIDA Ltd 36 Golden Square, Soho, London, W1F 9EE, United Kingdom
Reg No. 03860916, registered in the United Kingdom.

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org




--
Pedro Furtado
http://www.dreaminginflash.com
http://dailypv3d.wordpress.com
_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Richard-219

Re: DOF help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hey Pedro,

Do you have a code snippet of this?

Richard

On 11-Apr-08, at 7:47 AM, Pedro Furtado wrote:

Hi Daniel,

The I do it, is to just have a reference Z, usually 0, and apply a blur accordingly to the movie.

hope it helps,
Pedro.

On 4/11/08, Daniel O' Brian <[hidden email]> wrote:

Hi,

 

I'm new to Papervision so excuse any ignorance of what are seemingly simple concepts to you all.

 

I'm trying to build a project with a similar depth of field effect to the Absolut clouds in the submitted visions section at http://www.absolut.com/iaaw

 

I've seen the impressive Mr d00b DOF demo, but this approach (of creating a sequence of preblurred materials) will not work in ttis instance as I understand it as each blurred object needs to contain interactive material.

 

So, I went down the route of applying blur based on distanceTo(camera) and have a function triggering on ENTER_FRAME which runs a for loop to update the blur on each item in the scene.

 

Problem is that this seems to only be taking a value from the last item accessed in the for loop and changing the materials for all items based upon this.

 

If I blur one item will this also blur any other item with the same material or is each instance treated as a separate entity? I have tried creating one material bper object but this slows things down to a crawl and the same problem as above still applies.

 

Any ideas? Anyone?

 

Cheers

 

Danny O'Brian


This email transmission is confidential and intended solely
for the person or organisation to whom it is addressed. If you
are not the intended recipient, you must not copy, distribute
or disseminate the information, or take any action in relation
to it and please delete this e-mail. Any views expressed in
this message are those of the individual sender, except where
the sender specifically states them to be the views of any
organisation or employer. If you have received this message
in error, do not open any attachment but please notify the
sender (above). This message has been checked for all known
viruses powered by Messagelabs. For further information
visit www.messagelabs.com/stats.asp Please rely on your own
virus check as no responsibility is taken by the sender for
any damage rising out of any virus infection this communication
may contain.

LIDA Ltd 36 Golden Square, Soho, London, W1F 9EE, United Kingdom
Reg No. 03860916, registered in the United Kingdom.

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org




--
Pedro Furtado
http://www.dreaminginflash.com
http://dailypv3d.wordpress.com
_______________________________________________
Papervision3D mailing list


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Lofih

Re: DOF help

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Not really a snnipet as much as copy from my working code but it should give you a rough idea.

public function calcFocus(e:* = null):void
{
material.movie.alpha = getValueForInterval(0, 30, 1, .6, pivotDo3d.z)

if(!ApplicationFacade.getInstance().specialFX)
{
material.movie.filters = new Array()
return;
}
var blurQual:int = 2
var myBlurValue:Number = getValueForInterval(-10,30, 0, 30, pivotDo3d.z)
if(pivotDo3d.z > -10)
material.movie.filters = new Array(new BlurFilter(myBlurValue*.2,myBlurValue*.2,blurQual))
else
material.movie.filters = new Array()
}


public static function getValueForInterval(min1:Number,max1:Number,min2:Number,max2:Number,input:Number):Number
{
return min2+(input-min1)*(max2-min2)/(max1-min1);
}



On 4/22/08, Richard <[hidden email]> wrote:
Hey Pedro,

Do you have a code snippet of this?

Richard

On 11-Apr-08, at 7:47 AM, Pedro Furtado wrote:

Hi Daniel,

The I do it, is to just have a reference Z, usually 0, and apply a blur accordingly to the movie.

hope it helps,
Pedro.

On 4/11/08, Daniel O' Brian <[hidden email]> wrote:

Hi,

 

I'm new to Papervision so excuse any ignorance of what are seemingly simple concepts to you all.

 

I'm trying to build a project with a similar depth of field effect to the Absolut clouds in the submitted visions section at http://www.absolut.com/iaaw

 

I've seen the impressive Mr d00b DOF demo, but this approach (of creating a sequence of preblurred materials) will not work in ttis instance as I understand it as each blurred object needs to contain interactive material.

 

So, I went down the route of applying blur based on distanceTo(camera) and have a function triggering on ENTER_FRAME which runs a for loop to update the blur on each item in the scene.

 

Problem is that this seems to only be taking a value from the last item accessed in the for loop and changing the materials for all items based upon this.

 

If I blur one item will this also blur any other item with the same material or is each instance treated as a separate entity? I have tried creating one material bper object but this slows things down to a crawl and the same problem as above still applies.

 

Any ideas? Anyone?

 

Cheers

 

Danny O'Brian


This email transmission is confidential and intended solely
for the person or organisation to whom it is addressed. If you
are not the intended recipient, you must not copy, distribute
or disseminate the information, or take any action in relation
to it and please delete this e-mail. Any views expressed in
this message are those of the individual sender, except where
the sender specifically states them to be the views of any
organisation or employer. If you have received this message
in error, do not open any attachment but please notify the
sender (above). This message has been checked for all known
viruses powered by Messagelabs. For further information
visit www.messagelabs.com/stats.asp Please rely on your own
virus check as no responsibility is taken by the sender for
any damage rising out of any virus infection this communication
may contain.

LIDA Ltd 36 Golden Square, Soho, London, W1F 9EE, United Kingdom
Reg No. 03860916, registered in the United Kingdom.

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org




--
Pedro Furtado
http://www.dreaminginflash.com
http://dailypv3d.wordpress.com
_______________________________________________
Papervision3D mailing list


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org




--
Pedro Furtado
http://www.dreaminginflash.com
http://dailypv3d.wordpress.com
_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
markosana

Re: DOF help

Reply Threaded More More options
Print post
Permalink
In reply to this post by Daniel O' Brian
How can I do with a movieassetmaterial for my planes?

var material_mc1:MovieAssetMaterial = new MovieAssetMaterial("mc_1", true, true, true);
material_mc1.smooth = true;
material_mc1.interactive = true;
//material_mc1.doubleSided = false;
plane1 = new Plane(material_mc1, 1300, 2000, 8, 8);
scene.addChild (plane1);

es. http://www.openspaces.it/2009/
speedok1

Re: DOF help

Reply Threaded More More options
Print post
Permalink
In reply to this post by Daniel O' Brian
Aloha Danial,

Here's how i would do it to get the lowest cpu usage:

1. Make a particle and a bitmapparticlematerial

2. At start, generate a array (or vector / dict.) of the clouds with x blurlevels. So you end up with one normal bitmap, second is blurred with value 2 for example, then 4 etc. to the max levels you going to use.

3. Make a blur level switcher based on for example the screenZ value of the particles to the camera. Aldo you can make all type of switchers. This is switch the bitmapparticle material for each particle at each frame.

The only downside to this is the memory usage but it saves a lot of cpu usage.

Here a old demo using the above:
http://www.flashbookmarks.com/demos/dofdemo2/ move over it and click to next formation.

Good luck with it.

Daniel O' Brian wrote:
Hi,

 

I'm new to Papervision so excuse any ignorance of what are seemingly
simple concepts to you all.

 

I'm trying to build a project with a similar depth of field effect to
the Absolut clouds in the submitted visions section at
http://www.absolut.com/iaaw

 

I've seen the impressive Mr d00b DOF demo, but this approach (of
creating a sequence of preblurred materials) will not work in ttis
instance as I understand it as each blurred object needs to contain
interactive material.

 

So, I went down the route of applying blur based on distanceTo(camera)
and have a function triggering on ENTER_FRAME which runs a for loop to
update the blur on each item in the scene.

 

Problem is that this seems to only be taking a value from the last item
accessed in the for loop and changing the materials for all items based
upon this.

 

If I blur one item will this also blur any other item with the same
material or is each instance treated as a separate entity? I have tried
creating one material bper object but this slows things down to a crawl
and the same problem as above still applies.

 

Any ideas? Anyone?

 

Cheers

 

Danny O'Brian


This email transmission is confidential and intended solely
for the person or organisation to whom it is addressed. If you
are not the intended recipient, you must not copy, distribute
or disseminate the information, or take any action in relation
to it and please delete this e-mail. Any views expressed in
this message are those of the individual sender, except where
the sender specifically states them to be the views of any
organisation or employer. If you have received this message
in error, do not open any attachment but please notify the
sender (above).  This message has been checked for all known
viruses powered by Messagelabs.  For further information
visit www.messagelabs.com/stats.asp  Please rely on your own
virus check as no responsibility is taken by the sender for
any damage rising out of any virus infection this communication
may contain.

LIDA Ltd 36 Golden Square, Soho, London, W1F 9EE, United Kingdom
Reg No. 03860916, registered in the United Kingdom.
_______________________________________________
Papervision3D mailing list
Papervision3D@osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org