I have use RENDER TEXTURE blur effect but it is not proper blur. This is not real time view, I want real time blur effect like ios given effect.
I have use this tutorial now what i want to achieve is when there is something (some animation)is running behind image i want to see some blur effects (dynamically). the link gives static blur image.
Related
I need to draw a circle with a radial gradient on the canvas in my custom control (XAML). But Windows::UI::Xaml::Media contains LinearGradientBrush only. I know about design guids but my control requires so feature to the user can see the color gamma.
Below that I need to get:
P.S. I ask how to draw it at least programmaticaly without XAML.
P.P.S. I know that I can draw a picture in some editor with radial gradient and after draw it on the canvas but it seems not good solution for the adaptive design.
You can check the RenderColorPickerHueRing() method for a sample of how you could do it on a CPU in a WriteableBitmap. It's not super fast (at least in the C# version), but at least it saves you from packaging another image with your app or from using DirectX, which is a bit more tricky to get set up correctly and stabilize.
I need to render simple brush stokes, with support for the following properties:
A circular brush head, with feather and opacity
Resolution independent (e.g. Drawing on a down-scaled version of the image should be indistinguishable from drawing on the full-resolution image and downscale the result).
Real-time rendering (it should be very efficient)
Software rendering should be an option (So I can reproduce the result without OpenGL)
I can also use C++ or OpenCL for this.
The input is given as a set of points and radius. The points are connected with straight lines. Supporting bezier curves would be nice.
What's the best / easiest way to implement this?
I want to use a full color PNG image as a particle in cocos2d with an emitter designed in ParticleDesigner.
I dragged in the image I want to use and set-up everything how I want it in ParticleDesigner and it looks good.
Problem is when I import into cocos2d, the particles appear to have grey squares over them (a small bit of the yellow image is visible on the side, but they gray covers the rest including transparent areas).
Code:
CCParticleSystemQuad* particleSystem = [CCParticleSystemQuad particleWithFile:#"coin magnet.plist"];
particleSystem.position = ccp(320, 320-16);
[self addChild:particleSystem z:1000];
I'm guessing it might be an issue with blending options...
I've tried GL_SRC_ALPHA to GL_SRC_MINUS_ALPHA (set by the normal button in ParticleDesigner), additive combinations, and trying different things with GL_ZERO and GL_ONE
Why are the particles appearing grey? Does cocos2d support using full color images as particles?
Figured it out!
Turns out the image didn't embed properly in the plist (bug in ParticleDesigner) so that's why it was appearing grey.
Exporting with the png separate solved the issue.
And yes, you can definitely use color images as particles in cocos2d!
I'm looking to create a glowing line effect in BlitzMax, something like a Star Wars lightsaber or laserbeam. Doesn't have to be realtime, but just to TImage objects and then maybe saved to PNG for later use in animation. I'm happy to use 3D features, but it will be for use in a 2D game.
Since it will be on black/space background, my strategy is to draw a series of white blurred lines with color and high transparency, then eventually central lines less blurred and more white. What I want to draw is actually bezier curved lines. Drawing curved lines is easy enough, but I can't use the technique above to create a good laser/neon effect because it comes out looking very segmented. So, I think it may be better to use a blur effect/shader on what does render well, which is a 1-pixel bezier curve.
The problems I've been having are:
Applying a shader to just a certain area of the screen where lines are drawn. If there's a way to do draw lines to a texture and then blur that texture and save the png, that would be great to hear about. There's got to be a way to do this, but I just haven't gotten the right elements working together yet. Any help from someone familiar with this stuff would be greatly appreciated.
Using just 2D calls could be advantageous, simpler to understand and re-use.
It would be very nice to know how to save a PNG that preserves the transparency/alpha stuff.
p.s. I've reviewed this post (and others), have the samples working, and even developed my own 5x5 shader. But, it's 3D and a scene-wide thing that doesn't seem to convert to 2D or just a certain area very well.
http://www.blitzbasic.com/Community/posts.php?topic=85263
Ok, well I don't know about BlitzMax, so I can't go into much detail regarding implementation, but to give you some pointers:
For applying shaders to specific parts of the image only, you will probably want to use multiple rendering passes to compose your scene.
If you have pixel access, doing the same things that fragment shaders do is, of course, possible "the oldskool way" in 2D, ie. something like getpixel/setpixel. However, you'll have much poorer performance this way.
If you have a texture with an alpha channel intact, saving in PNG with an alpha channel should Just Work (sorry, once again no idea how to do this in BlitzMax specifically). Just make sure you're using RGBA modes all along.
I would like to render volumetric clouds in OpenGL.
I found an interesting paper that describes a simple technique to render volumetric clouds.
(http://www.inframez.com/events_volclouds_slide18.htm)
However I don't know how to create their "fractal cube" (or perlin-noise cube).
My question is: how to create the 6 tileable fractal textures of a cube?
Edit: my aim is to make a volumetric cloud object, not a cloud skybox.
A nice introduction to Perlin noise, written by Ken Perlin himself, is here. He talks about generating a one or two dimensional noise function in some detail, and then generalises it to show how it would work in 3D, to generate a solid cube of noise like you want.
When using a 2D billboarded cloud texture, you create an alpha-blended 2D texture where the transparency looks cloud-like. What they're asking you to do is almost the same thing, only the texture wraps around a cube seamlessly (like a skybox). The perlin-noise filter looks like an algorithm to make something look cloud-like.
My shortcut approach to this would be to use Photoshop's cloud filter to create your texture. Follow the basic concept of this tutorial for the alpha blending, but don't do the circular gradient. Cut it into a seamless skybox-like grid (i.e. so it has 6 sides and folds properly around a cube).
I think the 'fractal cube' texture they refer to is an FBM (Fractal Brownian Motion) fractal generated from a number of octaves of Perlin noise. This Game Programming Gems Chapter discusses how they are formed. The basic idea is to combine multiple 'octaves' of Perlin noise, with each octave having around twice the frequency of the previous octave. You can make this seamlessly tiling by modifying the noise function. Photoshop's cloud filter is basically FBM noise and is seamlessly tiling so you can just use that if you have access to Photoshop.
If you're really interested in nice cloud rendering, then Mark Harris's algorithm is quite good albeit complicated: http://www.markmark.net/clouds/