I am going to enter the viewport slices into the alpha channel for fog, and use grass maps and tree maps. The completion of this demo will make Graph3D finally finished!
Thursday, December 8, 2011
Demo04 ( Re-visited )
Finally finished the volume rotation strategy. This means all volumes, like the T-Rex from Demo04 can now walk around and rotate. Firstly I am going to make the T-Rex out of 16 volume slices, the original only had 4 slices ( lazy ). This will make the T-Rex a lot more detailed and realistic when viewed from an angle.
Saturday, November 26, 2011
Texture time!
Need some high quality seamless textures, been looking on the net and MB3D, CG TEXTURES, and SPIRALGRAPHICS have the best range of free textures.
I was able to create road tiles for rally game using PAINT.NET.
With a little trial and error the straight piece of road can create three different turn radii. So one straight tile and three corner tiles can make kilometers of road. Quick and simple.
Not bad for 5 minutes work.
This is how it works. For a bitmap 512 x 256, the canvas size is 4096 x 4096. The polar scale is equal to 2.00, this will give a 45 degree turn. Change the canvas to 2048 x 2048 and the turn becomes 90 degrees etc...The bitmap road and turn perfectly align, look at the pixel perfect alignment.
Remember can be used for chains etc...
Use a grid to make roads for tile pieces.
I was able to create road tiles for rally game using PAINT.NET.
With a little trial and error the straight piece of road can create three different turn radii. So one straight tile and three corner tiles can make kilometers of road. Quick and simple.
Not bad for 5 minutes work.
This is how it works. For a bitmap 512 x 256, the canvas size is 4096 x 4096. The polar scale is equal to 2.00, this will give a 45 degree turn. Change the canvas to 2048 x 2048 and the turn becomes 90 degrees etc...The bitmap road and turn perfectly align, look at the pixel perfect alignment.
Remember can be used for chains etc...
Use a grid to make roads for tile pieces.
Friday, November 18, 2011
Volume Rendered Motocross Track ( Low res)
Finally stopped testing and exploring ways of making volumes. The Motocross track is always a good choice, all the bumps and ruts. To make the bumps and ruts I went into Paint.NET, I selected the road using magic wand. Then with just the road used the Stencil tool to highlight only bumps, then using an alpha blending Layer added the slight indentations.
Hi res is going to be special. It's the Phone7 engine running on a browser, not bad at all.
Here's some screens of the track surface detail.
Start a new Phone7 project and copy and paste this code, voila mobile phone App!
Big fan of Silverlight.
Hi res is going to be special. It's the Phone7 engine running on a browser, not bad at all.
Here's some screens of the track surface detail.
Start a new Phone7 project and copy and paste this code, voila mobile phone App!
Big fan of Silverlight.
Saturday, November 12, 2011
Demo 01
Well I am revisiting the Windows Phone 7 demo 01. Notice the blending used by the internet, looks unbelievably realistic and adds a professional edge.
All I have to do is add some walls and grandstands. Then it's adding the bike sprites and it's basically a finished product. Used a Google / texture map, alpha channel combination for maximum detail.
This is looking from the motorbike.
Turning a corner.
All I have to do is add some walls and grandstands. Then it's adding the bike sprites and it's basically a finished product. Used a Google / texture map, alpha channel combination for maximum detail.
This is looking from the motorbike.
Turning a corner.
Thursday, November 3, 2011
Volume Rendering Demo Scene
So on Visual Studio 2010, I now have three templates. In the old days on builder I would save each template to the projects repository. So when the user selects the template, builder would create a new project with template loaded into it. Visual Studio 2010 has this ability however the entire volume rendering engine is copy and pasted three times and the complete engine is ready to go.
Method 1 :
I am making a demo of a landscape. No grass, so somewhere in a desert. Must have a river that seamlessly joins the river at opposite side of landscape texture.
Now after the landscape is created I plan to insert my own grass and trees.
Method 1 :
I am making a demo of a landscape. No grass, so somewhere in a desert. Must have a river that seamlessly joins the river at opposite side of landscape texture.
Now after the landscape is created I plan to insert my own grass and trees.
Saturday, October 22, 2011
Graph 3D ( Voxelized 3D Cartesian Co-ordinate system)
Well looks like I am to release my technology. It's a basic 3D Cartesian Co-ordinate system. Uses advanced Fuzzy Logic just to achieve minimal rendering performance. Please note, does not include space leaping which is the final optimization that achieves 8 times performance through-put as a minimum. For an understanding of this system reading on Jim Blinns mathematics a must.
Saturday, October 8, 2011
Writeable Bitmap Alpha Channel
Was able to move the 3D engine to SilverLight and create aspx file ready for the web. So happy I have the alpha channel back thought I would make some tests.
Here is a wall of glass, from single line of code.
Here is a wall of glass, from single line of code.
Adding another wall of glass is simple. The alpha value starts at 255, every time it hits a wall 64 is subtracted from alpha.
This is the glass with less opacity.
Just simply use screen.Pixels[offset] = Alpha << 24 | Red << 16 | Green << 8 | Blue;
A Voxel Engine is just a stack of slices in front of the camera. So as each slice is rendered alpha is decreased by one. It gives this effect.
The next screen shots show a basic 3D World. Moving up and down changes the light effect.
With a little trial and error, I came up with this background. Adding a desert map from Google would give me a World representing Mars for a space adventure.
Sunday, October 2, 2011
Writeable Bitmap on the Web
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace Silverlight
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
System.Windows.Threading.DispatcherTimer tmr;
System.Windows.Media.Imaging.WriteableBitmap screen;
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
screen = new System.Windows.Media.Imaging.WriteableBitmap(320, 204);
tmr = new System.Windows.Threading.DispatcherTimer();
tmr.Interval = System.TimeSpan.FromMilliseconds(100);
tmr.Tick += OnTimer;
tmr.Start();
}
void OnTimer(Object Sender, EventArgs args)
{
int px,py;
int offset = 0;
for (py = 0; py < 204; py++)
{
for (px = 0; px < 320; px++)
{
screen.Pixels[offset] = 64 << 24 | 0 << 16 | 0 << 8 | 255;
offset++;
}
}
image1.Source = screen;
}
private void UserControl_Unloaded(object sender, RoutedEventArgs e)
{
tmr.Stop();
}
//fin.
}
}
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace Silverlight
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
System.Windows.Threading.DispatcherTimer tmr;
System.Windows.Media.Imaging.WriteableBitmap screen;
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
screen = new System.Windows.Media.Imaging.WriteableBitmap(320, 204);
tmr = new System.Windows.Threading.DispatcherTimer();
tmr.Interval = System.TimeSpan.FromMilliseconds(100);
tmr.Tick += OnTimer;
tmr.Start();
}
void OnTimer(Object Sender, EventArgs args)
{
int px,py;
int offset = 0;
for (py = 0; py < 204; py++)
{
for (px = 0; px < 320; px++)
{
screen.Pixels[offset] = 64 << 24 | 0 << 16 | 0 << 8 | 255;
offset++;
}
}
image1.Source = screen;
}
private void UserControl_Unloaded(object sender, RoutedEventArgs e)
{
tmr.Stop();
}
//fin.
}
}
Open Visual Studio and choose new project C# -> SilverLight. Make sure it's SilverLight 4. When the solution is created select the Grid and press Delete key. Then go to Toolbox select Image component place it in the IDE and make sure Stretch is equal to Fill.
The pixel format is Alpha | Red | Green | Blue. I used Blue = 255, and Alpha = 64. This blends the background white color with the image color.
This gives us a Bitmap that can be updated 10 times a second for games and animations. For 50 updates per second set timer interval to 20 instead of 100.
Your first internet application! And it's working on my Browser Google Chrome, fantastic result. I have a book that shows a silverlight app running on Mozilla Firefox as well. Just shows how powerful and well done Visual Studio 2010 Professional really is. The Toolbox is my favorite, allows me to set up projects quickly.
Change :
screen.Pixels[offset] = 64 << 24 | 0 << 16 | 0 << 8 | 255;
to :
screen.Pixels[offset] = py << 24 | 0 << 16 | 0 << 8 | 255;
And get this :
Silverlight Website of note : http://10rem.net/ C64 emulator, synthesizer, what else has to be said?
Subscribe to:
Posts (Atom)