Ways to apply multiple filters in Adobe Pixelbender? - actionscript-3

How to apply multiple filters in Adobe Pixelbender in Flash (=limited version)?
For example 3 different kinds of video displacement effects (1 displacement on the left, one on the right and one the top).
I know, it possible to just copy paste the code multiple times, but this wouldn't be very elegant.
It supposes to apply the second filter after the first filter is applied and the third filter after the second filter is applied.

You can apply pixel bender filters as Shader objects. Then just use:
myDisplayObject.filters = [shader1, shader2, shader3, ...etc];
Specifically, you use the ShaderFilter object. You can find a complete code sample in the documentation here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/ShaderFilter.html#includeExamplesSummary
You can also see a tutorial from Adobe here: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS6FCADA8A-C82B-4d55-89AC-63CA9DEFF9C8.html

Related

Dynamically change line color dcc.Graph Plotly Dash between annotations

I'm writing a 'template creation' app using the dcc.Graph image annotation features in Plotly Dash.
The user adds multiple rectangles for specific features in the image (an invoice) and my callback captures the coordinates of each rectangle via the relayoutData variable. I want to use a different color for each rectangle, but can't figure out how to do it.
It seems like the only way to change the newshapes fillcolor
property is to replace the whole figure, but then I lose all previous shapes
All and any help appreciated.
Andrew
I have just found the following demo that does exactly what I am trying to do:
https://dash-gallery.plotly.host/dash-image-annotation/
Now to unpack the logic and adapt it to my context ... Happy 2021!
Andrew

How to combine multiple captures through 123D Capture?

I was wondering if there is a way to combine multiple captures using either the ipad app or desktop application for 123D Capture through Autodesk. I want to take a capture of an object, flip it, take a second capture of the bottom of the object, and then combine the two captures so I have the entire object captured from every angle (top, bottom, sides).
Ideally after this I would see which sections of the object are blury and take new photos of those sections and manually stitch them on.
Thanks for any advice.
Check Autodesk ReCap, it can manipulate & handle point clouds
http://www.autodesk.com/products/recap/overview
You can go even further to generate 3D models from these pictures with ReCap 360( http://recap360.autodesk.com). And it is also possible to do this with API, here are some samples on github (http://developer-recap-autodesk.github.io/)

AS3: Reading Filters currently applied to MovieClips

I'm having a MovieClip on the stage with an "Adjust Color" filter applied to it through the properties panel not through action script, however, I need to read the filter values from AS3 to be able to use them on other classes.
I know how to apply the effect through AS3 but not to read it back if its applied from outside the code.
Thanks in advance :))
There's a filters property, which is an array of the current filters.
trace(target.filters);
The 'adjust color' filter creates a ColorMatrixFilter object. This class does not actually expose the properties brightness, contrast, saturation or hue - these are niceties that the UI provides, which actually translate to the more complex data found in the matrix array.

Shadow-casting shaders in Stage3D

I've been working a lot with AGAL vertex and fragment shaders. I've got individual objects lit correctly (including specular shading) but I'd like to have objects cast shadows on OTHER objects. I have looked online, but I think most people working directly with AGAL have built custom Stage3D libraries and the shadow-casting solution doesn't seem to be in the public domain. Anyone willing to change that?
I'd like to know how to get an object to cast a shadow on another. I can't post what I've tried, because I can't get my head around where to begin on this problem. How would you pass the information (whether other objects are blocking the light) into another object's shader?
Thanks.
IT's called Deferred shading, you have to do 2 pass of vertex and fragment shaders.
In the first pass you accumulate informations about distances, normals, occlusion...
In the second pass you render and apply the informations of the first pass to make shadows.
Another options is ShadowMapping:
Basic shadowmap
The basic shadowmap algorithm consists in two passes. First, the scene is rendered from the point of view of the light. Only the depth of each fragment is computed. Next, the scene is rendered as usual, but with an extra test to see it the current fragment is in the shadow.
The “being in the shadow” test is actually quite simple. If the current sample is further from the light than the shadowmap at the same point, this means that the scene contains an object that is closer to the light. In other words, the current fragment is in the shadow.

SceneJS graphing examples

Are there any good open source SceneJS examples that can graph functions similar to those demonstrated in http://www.graphycalc.com/?
I haven't seen any but it should be relatively easy to simply use a custom vertex shader that transforms the vertices of a grid into your desired function: https://github.com/xeolabs/scenejs/wiki/shader
You can also use a data source plugin with a geometry node, to continually update it's mesh:
http://scenejs.org/examples.html?page=geometryPluginPullStream
http://scenejs.org/examples.html?page=geometryPluginPushStream
And here's the available vertex deformation examples (selected by tag, see left column, click one to load it):
http://scenejs.org/examples.html?tags=vertexDisplacement