Blog
-
New scenes & website updates
1 comment(s)published on 10/16/2011 3:24 PMI'm currently working on v2.0 of the visualizer and it will be a while longer until it can be launched since its a complete rewrite of the configuration and scene editor. Because of this I will start to upload a few new scenes as a normal user and eat my own dog food so to speak by going though the real scene upload system. I have found and fixed a few issues so far and if I find any more I'll correct them too. So if you have a nice scene feel free to upload it.
The front page has received a 'new scenes' section. It should help when trying to quickly see if any new scenes has been uploaded. The scenes page have received a few extra tabs also to filter the existing scenes and quickly find scenes that are not included in the installer.
Since new scenes are now uploaded to the site you have to go to the site and download the scenes manually if you like one. The visualizer already captures the scene specific file extension so it should be a quite streamlined experience. The process should works something like this.
- Click to download scene
- Go to the folder where the scene was placed or double click on it in the browsers file download window
- Answer yes that you want to import the scene
- Answer yes that you want to open the configuration window
- Go to the scenes tab and you should find the new scene under the 'Imported' branch
The website have also received a few visual tweaks however you need a fairly modern browser to see them.
Lastly the statistics page have been updated with a few new values including memory and core counts. -
Plane9 v1.8 has been released
2 comment(s)published on 6/5/2011 6:43 PMThe main features in this release is distance field fonts and ColorNext output port.
The distance field fonts creates much nicer font using the same installer size and performance as before. It also allows for creation of outline effect and the like.
The render to texture node now has a 'ColorNext' output. It contains the next buffer to be rendered to. The texture can be used as a texture input further down the graph and thus create mirror effects, 'life' simulations, 2d fluid effects and the like.
Added- Engine: 30 new scenes
- Engine: RenderToTexture has a ColorNext that contains the texture that will be reused in the next frame. Can be used for 'ping-pong' effects
- Engine: Shatter node
- Engine: Added font type to clock node
- Engine: Clock uses shader port for font shader
- Engine: TextWriter uses shader port for font shader
- Editor: Select a template when creating a new scene
- Editor: Strings delay port updates for 0.5s before updating the engine. Helps when quickly writing in large shaders
- Editor: FPS lock toggle
- Engine: CopyToTexture added effect ports to allow filtering during the copy
- Engine: Auto skip slow scenes after 5 seconds
- Engine: A scene now knows what other scenes it will fit well/not well with
Modified/fixed- Engine: Much improved font rendering using distance fields
- Engine: numchars doesn't work in the textwriter expression
- Engine: Changed default font size to 1.0 Breaking change
- Engine: Clock/Textwriter color port has been renamed to color1 Breaking change
- Engine: Updated to Cg Feb 2011 Release
- Config: Monitors that didn't exists was shown on the render tab
-
Statistics
0 comment(s)published on 5/11/2011 8:57 PMPreviously I had to use the steam hardware survey to try to get an idea of what users actually have for machines. But their survey is from gamers that play games. To help in dealing with this lack of screensaver/music visualizer oriented information the anonymous usage statistics was added to the visualizer.
I though I share some of these findings for others to use. So if you want to create a demo, music visualizer or screensaver this information should hopefully match your intended target audience better than the steam hardware survey does.
The statistics are updated once a day and shown on the plane9 statistics page.
Statistics is also gathered on what scenes are most viewed and this did really have a few surprises for me.
The top 10 scenes are as followsScene name Run count Run time Average FPS Number of installations things\android.p9s 200702 237 days 15 22.93 % misc\matrixtrails.p9s 493544 179 days 24 24.47 % particle\starfield.p9s 470176 126 days 28 28.56 % nature\galaxy.p9s 463027 125 days 22 28.64 % text\crimescene.p9s 242669 122 days 29 23.68 % demoscene\metaice.p9s 215094 118 days 20 24.85 % abstract\colorstorm.p9s 288543 114 days 25 24.22 % particle\particlespray.p9s 339066 113 days 29 25.10 % demoscene\totheroadofribbon.p9s 229125 112 days 20 24.74 % demoscene\chasingthedream.p9s 229974 109 days 20 24.78 %
Run count is counted as anytime the scene is viewed.
Average fps is the average frames per second.
Number of installations is the amount of installations that have viewed the specific scene.
Seems like there is a lot of android users out there since it tops the list. I have to thank Simon green again for allowing me to use his shader for that scene. 15 fps for average fps on a realtime raytraced scene is rather good. It's interesting to see starfield in the top 3. I guess nothing beats the old classics. But what surprised me is that the crimescene scene is in the top 5. Its a scene I was very close to removing since I though it to be quite pointless. But I'm happy to have been proven wrong on that.
We also have 3 demoscene related scenes that got their shaders from various intros. This is exactly what I hoped for. That great intros that would have been viewed once or twice and then forgotten now are running on monitors across the world for all to see. Totheroadofribbon & metaice are created by XT95/FRequency. Chasingthedream is just a slight modification I did on totheroadofribbon.
Now all I need to do is to figure out how to create a scene featuring a android in a crimescene in the matrix while flying though a starfield... then again. Maybe not.
Lastly we have the run count for the various applicationsApplication name Run count Run time Average FPS Config 5140 17 days - Editor 1863 30 days - Screensaver 4912640 11 years 318 days 23 Winamp 18585 409 days 57 WMP 5986 112 days 17
The screensaver is by far the most used with a bit low average fps of 23. The screensaver is locked to run at a maximum of 30 fps since it is a screensaver and should use a low amount of resources. The reason is probably that the complex android scene is the most viewed that has a average fps of 15.
Winamp comes next but with a much higher average fps of 57. Winamp is locked to 60 fps and is usually run in a smaller window so that can explain the comparatively high fps. The lower fps in windows media player is because windows media player handles the frame locking and only calls the visualizer ever so often.
I'm happy to see that the editor is run quite a lot. I had plans on removing it since no one seemed to use it but with this data in hand it will stay. -
Shatter
0 comment(s)published on 4/4/2011 6:28 PMOn the morning of 26th of March I finally came up with an idea that I could use to join the DBF Destruction competition 2011. The problem was that the deadline was the very same day. The idea I had was to simulate the shattering of glass and as such it was a fairly ambitious idea for the 8 hours that was left until the deadline but I though I might as well try. A while before the deadline I had a entry that I though was good enough to enter the compo with.
The original entry finished 3rd but work continued on the effect and this is the end result of a few days of polishing.
The process to do this effect is as follows.- Create 4 points and add to a list
- Depending on the destruction done on the window
- For a explosion randomize a number of points inside the rectangle formed by the 4 points
- For a bullet hit pick a random point and generate rings with the initial point in the center
- Triangulate the point list. Paul Bourkes triangulation works fine for this
- From the triangle soup create one shard per triangle.
- Depending on the destruction done on the window
- For a explosion calculate the distance from ground zero and apply a force equal to that to each point in the shard list
- For a bullet hit calculate the distance from the ray and apply a force equal to that to each point in the shard list
- Use a verlet integrator to simulate the shards particles. The verlet integrator is very simple, fast and stable so perfect for shards.
- After the integrator has moved the shards forward a time step move all points out from any collision surfaces
- Let the effect run for a few seconds then apply a linear interpolation that takes the shard particles back to their original location to create the rebuild effect
- Apply an appropriate shader to the triangle list and the effect is complete
Only one window is simulated and then cloned 3 more times to create the illusion of a fully simulated box.
The first explosion in the video is about 2000 shards in each window the 2nd and 3rd explosions are closer to 30000 per window.
No textures where used or harmed in the making of this entry. It's all procedural.
You can try it yourself. Start it with the "run.bat" file. Most of the scene can be changed in the scenes/shatter.p9s file -
Large font support
0 comment(s)published on 3/6/2011 10:13 PMA while back I found a paper by valve on how they have done their font system in Team Fortress 2. I wanted to add such a system to the visualizer but didn't find any good test scene for it. That all changed one day when I noticed the colour clock on delicious. It looked rather nice and since the most favorite scene current is the digital led clock I though it could make a fine addition to Plane9.
After a bit of work it was added and this new distance field font system is one beast with plenty of potential. However the only way to really give the scene creator that power is to allow him/her to edit the shader that is used for rendering and that is exactly what has been added. Slightly more complex but a lot more flexible.
So how did it go with the color clock? Here is the end result of that
Since you now have the complete shader system to play around with you can easily use the various noise functions to make the scene more interesting. For example make the text look like it's made from bubbles.
It's just the voronoi shader function doing its work so one line of shader code.
The end of the last line of text seems to be in a mess because it's using the character expression that exists in the last few versions of plane9. It works by letting each character have its own expression and move independent of all others. The expression used in the screenshot is simplypos.x = pos.x + noise2(age, charnr*12)*(1-age)*3; pos.y = pos.y + noise2(age, charnr)*(1-age)*3;
-
Plane9 v1.7 has been released
0 comment(s)published on 2/22/2011 7:31 PMThe next version of the visualizer is hot of the presses and its one very feature packed release.
But before we go into the release details I want to show my appreciation to the paying supporters of the visualizer and announce that 10 scenes are released exclusively for them. Registered users should receive them shortly. You can also log in to your web page account, or register one if you don't have one, and enter in your serial number under your accounts page. This will open up the customer page of the website where you can download the exclusive scenes.
Thanks again for you support.
Here are the changes that have gone into this release
Added- Engine: 46 new scenes
- Engine: Editor and screensaver can now react to what is currently playing. So even if you have an unsupported application like itunes or spotify running in the background it will now react to the music! Only works on Vista/Windows 7.
- Engine: CopyTexture node. Copies another texture to a new possibly smaller texture
- Engine: Blur node can now specify radius of blur
- Engine: 2d fluid node
- Engine: Multicolor gradient texture node. Can create linear, radial, cone and square gradients with any center or rotation. Very good for color lookup tables
- Engine: Lightning bolt node
- Engine: Ribbon node. Creates ribbon strips using an expression
- Engine: SignalGenerator node that can generate sine,triangle,square,sawtooth and random waveforms
- Engine: Noise node creates a tillable noise texture in 1-3 dimensions
- Engine: Shader ports have a few, very powerful, predefined functions. See the Wiki for details
- Engine: expression ports now have the functions rand() and srand() that uses seed value from a special port and has a much better random than the functions that take in a seed
- Engine: expression port new functions time() and date()
- Engine: PI,PI2 as define in shaders
- Engine: Shader ports define tex1size/tex2size/tex3size that contains the texture size in pixels
- Engine: Stop logging after writing more than 100kb during one session
- Engine: File texture node handles any texture size
- Engine: Support for 1d and 3d textures
- Engine: Added tangent and binormal to mesh objects
- Engine: Waveform & spectrum supports a mono channel output when specifying channel as -1
- Engine: Added Camera FOV to RenderObject node Breaking change. Previous fov was 28, it's now 45
- Engine: Anonymous usage information is periodically sent to help improve the visualizer. For details see the faq
- Engine: Screenshots now include the name of the scene(s) that where rendered
- Editor: New much improved editor for shaders and math. Supports search & replace, intellisense, snippets, goto, unlimited undo and a lot more
- Editor: Color ports now show the color and have a picker dialog that can be shown
- Editor: Frames per second is shown on the status bar
Changed- Engine: Rewritten blur node
- Engine: Rewritten multimonitor support
- Engine: Changed expression ports noise1/2/3 to use simplex noise instead of perlin noise
- Engine: Resource leak when using renderbuffers like the blur/glow effect
- Engine: Disc/Cylinder nodes places a center vertex in the end caps now to make it easier with vertex manipulation on the meshes
- Engine: CloneExpressionNode center option now always centers all objects. No matter the distance between each object
- Engine: Large visual improvement on texture quality
- Engine: Fixed truncation of log if its larger than 100kb when starting
- Engine: Oscilloscope node was missing to update one line
- Engine: RenderObject scale by aspect now works correctly even if the object is rotating
- Engine: Point and Line primitive types works
- Engine: All old scenes have been improved with the new glow/blur, fullscreen render node and the like
- Editor: Crash when no node is selected and clicking create folder
- Editor: Double click on folder showed empty scene
- Engine: Expression smoothstep arguments have been changed to match smoothstep in shaders to avoid confusion. Now they are in the form "smoothstep(min, max, value)" Breaking change
- Engine: 'Dont render this monitor' didn't cover the screen with a black window
- Editor: Crash when clearing rect port values
- Editor: Random crashes when editing variables/functions in expression ports
- Editor: Moved galaxy, grass & starfields nodes into a 'nature' group
- Editor: Nicer property descriptions
- Editor: Fixed bug that overwrote port values when selecting another node that had the same port names
- Engine: Handle scene load failure better
- Config: Remade registration dialog to be easier to enter serial
Deprecated/Removed- Engine: Sin node has been deprecated. Use the new SignalGenerator instead
- Installer: Removed noise1,noise2,noise3,noise4,noise5 file textures. Use RandomTexture,NoiseTexture or a shader instead Breaking change
- Installer: Removed snowflake file texture. Only one scene used it so not worth the added size. Replaced with simple shader Breaking change
-
Gradients and the magic they can do
0 comment(s)published on 1/6/2011 7:31 PMI have spent a lot of time working on the visualizer the past few months so the next release is going to be a big one. Quite a lot of new nodes and scenes are going to be included. One of the new nodes that is going to be in the next release is a gradient node. A gradient in itself isn't the most interesting thing in the world but it can act as a component in a lot of interesting effects. For example if you combine a yellow and red gradient with a noise effect you have yourself a fire effect. Combine a gradient with mostly black and a spike of color in it, apply it to a turbulence noise effect and you have yourself a energy beam.
The gradient node handles linear, radial, conical and square gradients that can have a custom center point and it can also rotate the gradient to any angle. This makes for a very flexible gradient setup that should cater for most needs.
Here is an example of the gradient types applied to a cube
The project has been growing quite a bit now. It wasn't long ago it past 110000 lines of code. If you wonder what those lines looks like here is an example to still your curiositystar->m_StartCol = startColMin + ((startColMax-startColMin) * CRGBA::Rand()); star->m_EndCol = endColMin + ((endColMax-endColMin) * CRGBA::Rand());
The winamp page has another nice big number the project crossed over. Since the visualizer has now been downloaded over 300000 times from winamps web page! -
The work it takes to be random
0 comment(s)published on 12/1/2010 8:00 PMCreating flexible programs like Plane9 does present some rather unique challenges.
For example when creating a visualizer that is basically a single effect, like most other screensavers and music visualizers are, you can rather quickly put something together. If it looks ok and gives you the desired effect your done and you can quickly move onto the next feature you want to add. This however doesn't really work when a end user can create their own content so each part can be used in ways you didn't plan on from the start. This is of course both a blessing and a curse.
Randomizer
For a more concrete example of this lets take the randomizer in Plane9. Randomizers, or rather psedorandomizers as is the proper term in this case, is a well studied subject and normally adding one shouldn't take long at all. Using the build in library functions is the easiest option since its already created for you. However then we run into the problem that Plane9 requires two forms of randomizers. One that generates more true random and another that is based on a specific seed value and will generate the same random values each and every time.
The standard randomizer has two things against it. You only have one random function so you can't easily have multiple randomization seeds going at one time. The other thing is that the standard library randomizer is a linear congruential generator. So it doesn't generate very good random values from the start and further more it creates hyperplanes in multiple dimensions. This could be seen if you used the cloneexpression node and randomized the x,y and z position of the objects. Soon enough you would start to see planes form among the points. Here is the problem I mentioned at the start. Normally you could get away with the simple randomizer for the specific effect you wanted. But since this can be used in any number of ways I need to find something better than this. So there in the hunt began.
The hunt for two randomizers
The first one was rather easy to solve. The one where you want as true random as possible since there is a known good randomizer for this. It's called mersenne twister. It's fast and creates very good random values. But this has another problem. It requires a rather large work buffer and seeding it is problematic if you need to do it many times per frame. But if you only need one its very good.
So that takes care of the first problem. The second one however was more difficult. It should also create very good random values but have as small work buffer as possible and be very fast to reseed. I though this was going to be simpler than it was but just about all good randomizer fail in usually both of the requirements.
I eventually found what I was looking for in the xor shift randomizer. It also passes the die hard tests so it should be good enough for a visualizer.
So in the expression ports. If your calling random() you will get a value from the mersenne twister. If you however call rand() or rand(&myseedvalue) you will get a value created by the xorshift randomizer. Hopefully this will now take care of the randomizer once and for all so I too can go onto adding the next feature and you can get what you expect in your own scenes. Random values that are random. -
Noise and volumetric shaders
0 comment(s)published on 10/31/2010 12:05 PMAfter the last release I have been looking into adding noise to the visualizer. Gradient noise to be more specific. A lot of nice effects can be created using such a noise so I though it would make a fine addition to the visualizer.
However there is more than one form of gradient noise out there and quite a lot of false information that claim to be gradient noise but isn't. They all also have different pros and cons that needs to be taken into account.
A few of the variant I have looked into are
Perlin noise
The most common form of gradient noise and the 'original' gradient noise.
Simplex noise
Ken Perlin noticed a number of problems with his original perlin noise and came up with a more hardware friendly noise called simplex noise. However it's slower than perlin noise in less than 3 dimensions but much faster to calculate in over 3 dimensions.
mnoise
A very efficient noise implementation on the GPU. But has artifacts that can be seen as patterns in the noise as seen in a paper called Implicit procedural textures as a means of saving texture memory.
Gabor noise
This noise looks interesting but has the problem that its 4-20 times slower to generate when compared to perlin noise. Tillable and anisotropic is just two of the nice properties the noise has.
I ended up implementing simplex noise in a node that can output a texture in 1 to 3 dimensions. This seems to be the fastest way to generate noise even though it has it's limits. I have also changed so the noise in the expression ports now use simplex noise instead of the perlin noise that they generated before.
Here is a example of what such a noise can look like when you combine it with a volumetric ray tracer. This runs at 30fps on my fan less GeForce 9600GT on a dual monitor setup (3200x1200).
Thanks to a 5 year old paper from nvidia for the idea.
Another example is to create wood using the noise
In other news
- My name change went though so now I'm not Joakim Eriksson any more but instead Joakim Dahl since I took the surname of my lovely wife.
- Plane9 now has over 250'000 downloads on the winamp plugin page
- Scenes lists have been updated to be more compact
-
Plane9 v1.6 has been released
0 comment(s)published on 9/7/2010 5:48 PMSo finally the time has come to release the next version of Plane9. It took a bit longer than expected because of the website redesign.
I also managed to end up in the 'lets just add this feature or try that shader effect also' state. It's rather dangerous to come to that point since
time will fly past you without you noticing. So here we are over a half year after the last release.
But a lot has gone into this release and the complete set of changes are as follows
Added- Engine: 16 new scenes
- Engine: Expression node has a new command "band" for different channels, damping and bands
- Engine: Text writer node that uses expressions for character animation
- Engine: Galaxy node
- Engine: Transform mesh node
- Engine: Clone mesh node
- Engine: Clock node
- Engine: Added texture coordinates to lines
- Engine: Mesh transform node
- Engine: Command line -f and scene file allows for manual start
- Engine: Handle .p9d files and unpack them to the users scene directory
- Engine: Preview of .p9s files if double click in windows explorer
- Editor: Restore camera position when adding nodes/connections
- Editor: Export button in explorer view. Exports a scene to a p9d file that can easily be sent to others
- Editor: More node icons
- Engine: Added version, created and last modification time to scene files
- Config: Preview selected scene in fullscreen
- Winamp: Context menu is also shown when using classic skin
- Winamp: Shortcut keys added. F1 for a list of keys. Only works in detached mode
- Winamp: Added link to webpage from context menu
Changed- Editor: Dont clear ismodified flag on all scenes when saving current scene
- Editor: Updated gui
- Screensaver: Exit correctly when alt+tab is pressed
- Engine: Adjusted a number of scenes to look better
- Engine: During scene randomization a strong preference is placed to keep one of the layers when moving from a layered scene to another
- Engine: If different display sizes are used some scene run slowly
- Engine: IsPQTorus port added to the torus node breaking change
- Engine: Lowered memory usage
- Engine: Expression ports 'permrand' value was always 0
- Engine: Front scene wasn't always seen depending on background scene used
- Engine: Sphere mesh sets color to 0 so nothing is seen using default shader breaking change
- Engine: Forced MinMax node to only update itself once a frame
- Engine: Updated to Cg 3.0 library
- Engine: Better switching to fullscreen
- Winamp: Installer correctly detects custom winamp directory
- All: Nicer program icon
Removed- Engine: Removed line emitter since is was only confusing. Use a Cube emitter with width/height/depth set to 0 as needed breaking change
- Engine: Remove object emitter since it wasn't used
- Engine: Removed 'Twister' node. Use the shader node instead breaking change
- Engine: Removed blur ports since they where not used
- Engine: 'BasicEffect' nodes will be removed in the future. Use the shader node instead
Some existing scenes have received a nice visual improvement. For example the cubefloor scene
The old v1.5 version
The new v1.6 version
The new scene version would actually work in v1.5. It's just a change in the scene itself that created this visual upgrade.
