• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

About this blog

Author of the Power Render 3D Engine

Entries in this blog

Please download and test out the scene editor from PR7. This is still in development but it should show you the direction things are going with the next version.


You will also need to get the Ageia runtime drivers from http://www.ageia.com/drivers/drivers.html. The editor will use Ageia hardware if available.

Remember this software is still in development. I'd like to hear your comments on how I can improve it.
I've looked back at all my blogs since January, since I built this new computer to work on. I had a clear idea of what I wanted to build in terms of the engine, but I had no idea the engine was going to grow this much. The computer was built originally to run DX10 on Vista but I haven't used DX10 much at all.

At times it feels like my work will never be done. However I know every feature and bug can be described and eventually I will complete them all.

Looking forward, I'm thinking about releasing Power Render 7 with full source code for $100 like I am currently doing with Power Render 6. Imagine an almost Unreal 3 quality engine for ridiculously cheap. I will ask for royalties though. I'm considering making the code available even before the engine is done so people can influence my decisions on what needs to be completed.

It's very tough building an engine by yourself when there are so many components working together. With the code available other people could contribute. Good things happen with collaboration. I will never be a big company by keeping all my work to myself. I hope that releasing PR7 in this manner will bring about some kind of advancement in the field of computer graphics, and people will use it to make some great games. That is the ultimate goal. Hopefully people will benefit from my work and remember me.
August 20, 2007

This weekend I spent a little time on getting depth of field and bloom effects running in the new editor. The code was already written in 2003 but I had to link up the properties to the scene settings node so I could change them in the editor.

I spent a few hours trying to implement the bloom routines from my HDR renderer but it turned out the ones I had written ages ago looked better and didn't have any bugs. With some tweaking of the values and textures it can look pretty nice.

I've also created a movie while playing around with this scene.
August 13, 2007

Today I'm going to talk a little about something that isn't very common in realtime graphics. Most lights used in games are computed mathematically on hardware or in vertex/pixel shaders. The TrueLight rendering engine offers a more flexible way to calculate light attenuation. Rather than using a mathematical function to calculate the falloff, TrueLights allow you to use an attenuation texture. For example it could be a sphere, a box, a bunch of dots, or even a happy face. You get the idea. Additionally most lights are uniformly scaled, meaning the attenuation falls in a spherical shape.

The ability to scale lights nonuniformly gives the level designer more power to create unique lighting effects that haven't been possible in older game engines. For example say you have a long fluorescent light. In older engines you might have made several point lights along the light in order to make a line. We no longer have to resort to such hacks. The x,y or z axis of a light can be scaled down until the light is a strip instead of a sphere.

Take another example. Say we have a rectangular pool of water and we want to have a cool blue light coming up near the surface. We can squash a blue light so it fits the pool exactly, and only emits light for a foot above the surface.

I've created a video of this in action inside the PR7 editor.
August 13, 2007

Just a quick update to let you know that I've completed added per pixel bump mapped skinning with the TrueLight renderer. I've also been able to improve the quality of shadows by changing to a 32 bit per color floating point format. Obviously this will run slower but it will be an option in the detail settings of the engine. I'm quite happy with the progress since this was a very difficult bit of code involving many shaders for variance shadow maps, attenuation, lighting and so on.

I've created a video of this in action inside the PR7 editor.

Movies of PR7

August 6, 2007

Here are a few movies of PR7 in action. Keep in mind these are technical demonstrations and I have not spent any time creating nice assets. Note that the movie capture slows down the program and makes the physics seem like there is lower gravity than normal.

These movies were taken from inside the PR7 Editor, but only the 3D output was captured and you can't see the editor's user interface in them.

This is a simple scene with a building mesh used as a backdrop for the physics engine. The TrueLight renderer is used with 3 lights and the characters are using convex hull for collision. Forces are applied to the characters using the mouse. After a while the scene is reset and then the lights are moved around.

This is an indoor scene using the TrueLight renderer. Per pixel bump mapping is used along with a few lights that are turned on and manipulated. We use cows for testing because it's a complex shape that could represent any character in a game. Several cows are dropped into the scene and moved around. The play button is then pressed which activates the AI scripts. A simple script that rotates the node plays for all instances of the cow, and then the camera is moved around.

This is an outdoor terrain scene with water and the HDR renderer. The water properties are being manipulated.

This is a PPU cloth simulation running using the TrueLight Renderer. The cloth is dropped onto a cow test model and then manipulated with the mouse.

This is a PPU inflatable tube simulation running using the TrueLight Renderer. Here a torus filled with air is manipulated with the mouse and interacts with a simple indoor scene.

PR6 vs PR7

August 5, 2007

I've compiled a list of the differences between PR6 and PR7 here

In some ways PR6 has more features than PR7. Over time some of this functionality will be restored under the new editor, and everything will be much easier to use. Please don't ask me when PR7 will be ready, because I don't know. I'm aiming for 2007 and working on it full time until it's done though.

July Update

July 31, 2007

It's summer and that means vacation time! I've spent 3 weeks of July up north in cottage country with my girlfriend, so I have not accomplished much on Power Render 7. August will be more productive though. The 20 inch LCD that broke has been fixed, even though the delivery man left it outside on my deck in the rain.

I've successfully added the following to the editor:

- Sky cube node
- Revolute, Spherical, and Fixed joints
- Added the TrueLight renderer (formerly PRX/Prototype)

- Changed TrueLight renderer to use omnidirectional variance shadow mapping instead of stencil shadows. I am still experimenting with features in this new renderer.
- Added the ability to switch renderers on the fly (normal, HDR, TrueLight)

Here are my major goals remaining:
- Switch to OpenAL
- New asset manager that keeps track of dates so it can automatically load updated files at runtime
- User defined variables within nodes
- Finish joint nodes
- Save and load subtree with the ability to treat subtree like a single entity
- Make array of objects
- A game test mode that lets you walk around the world with full simulation and scripts running
- Particle Systems
- Edit multiple scenes at once
- New Character animation routines
- FBX converter
- Large scale terrain manager with paging
- Terrain LOD
- Networking

June Update

June 1, 2007

I've successfully added the following to the editor:

- Cloth physics using hardware
- Lens flare nodes
- Script nodes
- Font nodes
- Copy and paste nodes

I've got scripts working so you can drag a script to the scene graph, then set the name of the callback functions in each node and it will run the scripts while playing the simulation. In order to make this a complete game creation system I've started adding my GUI functions to the scene graph as well. You'll be able to drag GUI elements around and create all your menus or game overlays with the same tool.

Impostor Rendering

April 24, 2007

I've successfully added impostors to the scene graph. This lets you render a group of entities to a texture when they are far away and draw a textured quad instead of the full geometry to speed up rendering of scenes with large numbers of objects such as trees. There are a few minor things to add like when to update the impostor, and generating the impostors at the end of a frame instead of the middle as needed. Eventually I'll add a tool to create forests and automatically set up groups of close trees with impostors.

I've also added the following to the editor:
- x y z scale buttons
- shows name and axis of current entity
- Ability to set initial angular and linear velocity to rigid bodies
- Global scene settings node for things like movement scale, snap settings
- Collision with triangle meshes and convex hulls, saving cooked data to disk for fast load times

Here are my major goals remaining:
- Save and load subtree with the ability to treat subtree like a single entity
- Finish joint nodes
- Cloth physics using hardware
- Make array of objects
- Copy and paste nodes
- User defined variables within nodes
- Sky cube node
- Lens flare node
- New asset manager that keeps track of dates so it can automatically load updated files at runtime
- A game test mode that lets you walk around the world with full simulation and scripts running
- Particle Systems
- Edit multiple scenes at once
- New Character animation routines
- FBX converter
- Large scale terrain manager with paging
- Terrain LOD
- Networking

April 3, 2007

Time for an update. I haven't posted any blogs lately but that's because I've been hard at work. I've started creating an FBX converter. It can import static meshes and I got as far as keyframing. This will be a small side project that isn't critical but will be handy later on.

I've added the following to the editor:

-Water node
-Ground plane node
-Convex hull primitives
-Terrain physics
-Keyboard shortcuts on menus
-Toolbar help tips
-Please wait window while loading/saving
-Distance joints
-Pulling objects using physics forces with the mouse

I've started adding in impostor rendering for rendering impostors of groups of objects in the scene graph. Right now there is a large list of things that need to be finished and I'm working my way through them. PR7 is probably 6 months from being ready for testing yet.

More Physics, Editor

Feb 19, 2007

I've been busy adding physics to the scene graph and editor. There has been some success at dragging and dropping physics entities, rigid bodies, and assigning meshes to them. Complex physics entities are now constructed from the scene graph but I haven't added any joint nodes yet. I wasn't sure if I needed a separate tool to do this, but it seems to have worked out fine and it's very easy.

The editor has a few bugs that need to be fixed. I plan on adding more node types such as water, ground plane, cloth, global scene properties, and joints.

Today I am looking at the FBX SDK and going to see how easy it will be to make a converter.

Ageia PhysX Part 2

Feb 5, 2007

I have the character controller classes working but could be cleaned up a bit. I also made a few changes to get hardware support working and it seems to be fine. Pretty quick and painless but I'm only doing the basic rigid body simulation now. I've added a flag to all the primitives to tell what collision group it belongs to (pushable, non pushable, non collidable).

The SDK was crashing when I released the scene so I removed that for now. However after a few runs the hardware locks up and won't respond so I need to fix this bug properly or it will be a pain to reboot all the time.

I have also removed references to the Newton SDK from the code. PhysX is more powerful, has GPU support, and runs faster so I won't be going back to Newton.

Feb 3, 2007

A few more pieces of hardware arrived today: A 20 inch Sceptre LCD, 2 80mm fans for the front of the case, and a BFG physics card for Ageia's PhysX. I am also putting in an old 160 gig IDE hard drive from my previous computer which I am no longer using. I also found a temperature probe off an old heatsink that I hadn't used before. The one that came with my case was broken.

The fans go in first. These are very quiet at only 14db. They provide a little airflow to the hard drives. I had a bit of trouble fitting them into the front since once I attached the circular UV cold cathode to one, I couldn't fit them behind the hard drive cage. Took a couple tries before I managed to arrange them properly.

Now I'm wishing I bought a larger case. With 2 hard drives, the 8800's power connector gets in the way. I had to take both drives out and change their position in the cage to leave room for the video card. The double size of the 8800 means the PCI slot directly underneath is is useless, so I stuck the external connector from the Audigy in that slot instead. It's only half a card in length so the fan on the 8800 is clear. The BFG physics card is in the bottom PCI slot, but there are USB and IDE cables down there that could get into the fan. I taped the IDE cable to the case to hold it down and out of the way. There is no way I could fit any more in this case. I can't even reach in to the motherboard unless I take the cards out now.

The Sceptre monitor is quite nice, considering it was $210 CDN ($50 rebate) from TigerDirect. It's bigger and brighter (1000:1) than my previous LCD. The old one looks blurry and faded compared to this. Thinking of getting another one so I have an even setup.

Ageia PhysX

Jan 30, 2007

I resumed work on the Ageia PhysX support today. So far I've added the ability to save and load cooked meshes for faster preprocessing. Going to start working on character controller classes now. Right now I have #ifdefs depending on if the engine is compiled for PhysX or Newton. I am going to remove Newton completely and add in things from PhysX that Newton doesn't have. This means the physics classes will be slightly different than PR 6. Don't see a point of keeping the API the same to support an inferior physics library. PhysX has a good character controller and I want to integrate it tightly with the engine. Once I have the character controller in I'll add flags to scene graph nodes which tell if an object should be part of the static level geometry. A physics control panel will be added to cook the meshes, pause the simulation, and load and save states.

I've ordered a BFG Ageia card so I can make sure the hardware support is working well, and add advanced things like cloth simulation.

Jan 30, 2007

Support for Borland C++ has been completed after a few frustrating problems:

1. Borland doesn't like #pragma once in the headers. I had to add #ifndef HEADER_H #define HEADER_H statements to the top of every header file. This took about a day.

2. Getting all of the external image libraries compiled under Borland was a bit of a pain since I didn't write that code. Libraries like DirectX and Newton needed to be converted into another format.

3. It took about 4 days to get the library compiling under Borland. Once it did, as soon as I accessed anything from the DLL it would crash. There was a problem in a constructor in one of my classes but it wouldn't show me where. This was a huge problem. To solve this made a copy of everything and started with a DLL that only contained the main engine class. It ran fine. I then started adding in the rest of the engine and retesting to see when it would crash. This took a couple of days, since the more I added the longer the compile times became. Borland also doesn't work well with precompiled headers so a full build would take up to 5 minutes. I finally narowed it down to a divide by 0 error in the HDR class. For some reason VC never picked this up. I went back to my original version of the source, fixed that and it worked great. I also created a small VCL app that renders an object in the form to test the engine.

Now that I have PR 6.8 compiling under Borland I'll have to apply those changes to the PR7 codebase later. Windiff will come in handy :)

Jan 24, 2007

I spent most of yesterday working on a Borland C++ 2006 port of PR6 for a potential customer. Things like this come up once in a while so the DX10 and PR7 work is on hold for a couple days. To get the engine working under Borland I needed to modify all the headers since it doesn't handle #pragma once. There are some other changes required for compiling DirectX applications and I'm going through them one at a time.

Jan 23, 2007

After spending a couple days installing Windows Vista and all the software I need for work (and a few I don't), the new system is stable and very sweet. I now have it set up to my dual monitors and can ALMOST put the old machine away.

Vista is still lacking print drivers for my printer and I'm sure there will be a few things I forgot to move over.

As for speed, 3DMark 06 gets around 8400 with the CPU overclocked to 2.6 ghz. The Windows Experience Index is 5.5, which is good considering the Vista documentation states that at the time of Vista's release, 5 was the fastest computer available (and Vista isn't officially out yet).

1. The final setup

2. Nice looking machine

3. Still tweaking the parts

4. Nvidia's 8800 Demo

5. Vista Desktop running DX10 apps
Jan 18, 2007

The case arrived today and I have started putting together the system.

1. Aspire X-Discovery Case

2. Motherboard tray removed

3. Motherboard and CPU in

4. Ultraviolet fan lights

5. Aspire clear case PSU with blue led and custom UV sleeving

6. Asus P5W mounted

7. Core 2 Duo opened

8. PSU in

9. Almost done

10. It's alive!

11. New and old, flash off

12. New and old, flash on

Well the new system is together and booting fine. It took almost an entire day to put this machine together. You'll notice the door opens from a different side in the earlier pics. I had to take that all apart and flip the 4 mounts around. I also put in an 80mm fan in the front since the case didn't include one.
I'm having some trouble getting Vista and XP to install. I think it may be with the cdrom drive I put in so I'm trying an external one. The front fan I put in is also quite loud so I may replace it later. I had to adjust the timings on the ram in the bios since it was being recognized as PC 5300 instead of 6400. Once I get an OS installed I'll play around with overclocking and benchmarking the 8800 GTS.
Back to main...

Jan 17, 2007

This week I have started working on the new terrain engine. After a couple days of work and nothing showing, finally I have terrain displaying in the scene graph. You can drag and drop sections of terrain, set the textures and detail scale, and move, rotate or scale them.

Click here for a picture.

Right now it's using brute force. The next step is to add quadtree culling and level of detail.

Jan 16, 2007

Power Render 6 took about 2 years to port from C to C++ and I'm happy with the foundation that was created. It is a solid rendering engine and there won't be any major changes to the core code. Power Render 7 aims to be a more complete game engine with better tools and some features that were never in the previous engines.

Here are some of the milestones that are expected:

1. Scene Graph
In previous versions you had to manage the world yourself. You could make an array of entities and organize everything in a way that was easiest for your game. The addition of a scene graph provides a common way to describe a scene that is suitable for hopefully all situations. It also provides a save/load game storage format. The scene graph allows for faster rendering by organizing the world in a hierarchy of bounding spheres. Group nodes can be hidden at a certain distance to speed up rendering of large scale scenes. I may be removing the idea of Game Entities (scriptable entities used by the high level engine) and integrate that extra functionality in the base classes of all renderable scene nodes.

2. Different Terrain Engine
The previous terrain engine was designed for arcade or RTS games, and simulated a spherical world that never ended. The new terrain will be more suitable for massive terrains used in games like Oblivion or MMORPG's. Terrain will be divided into zones, with each zone having a scene graph containing the objects on the terrain. Zones can be placed next to each other to form a world as large as you desire. Terrain splatting will likely be removed. I spent a lot of time developing this so it's sad to see it go, but for now each terrain will be using a large precomputed texture with a detail texture.

3. Integrated Physics
In PR6, the Newton physics engine was used. For PR7 I plan on switching to the PhysX engine. This will cause some challenges since Newton had more suitable ragdoll and terrain collision routines. Since the new terrain engine will not be using a wrapping world, PhysX may be able to provide all that is needed without additional work. I have already partially ported the engine to PhysX last year, but ragdolls support still needs to be added. PhysX will also provide hardware support for Ageia physics acceleration cards.

Physics will be more tightly integrated with the scene graph. A physics entity editor will be created for describing complex physics objects composed of primitives and joints. Once a physics entity is designed, instances of it can be drag and dropped into the world's scene graph. In the editor, the initial state of the scene will be stored. Physics can then be turned on and simulated. The original state can then be restored and adjusted, or the current state stored as the initial state. This allows you to let physics objects settle into a stable state before storing it as an initial scene to load later.

4. New Character Animation routines
Previous versions allowed playback of single animations (ie running, shooting) for a character. A new set of routines and tools is in development that allows for blending of animations (ie legs running while arms shooting). Higher level routines for controlling characters including pathnodes and lip syncing will be added (commands like, MoveToLocation, Speak, LookAt, or Follow). Characters are a big part of any game and these routines needs to be more flexible and user friendly.

5. Networking
Previous versions of the engine have not included networking but I would like to provide some examples using an existing networking library such as Raknet.

6. Other Ideas
These are ideas I've thought about but will wait until the rest of the engine is created
- 2D GUI elements could be turned into scene graph items, allowing the creation of menus inside the content previewer
- Drag and drop AI modules
- Cut scene editor
Jan 16, 2007

DirectX 10 and Windows Vista are coming on January 30th, 2007. My current development system consists of: Intel 2.8 Ghz P4, Nvidia Geforce 6800 GT, 1 gig of ram, GA-8PE667 Ultra mb. Right now the only cards that support DirectX 10 are the Nvidia 8800 series (GTS or GTX). These are PCI express cards, and my motherboard is AGP, which means I need to upgrade the video card, motherboard, and CPU to support DirectX 10. The 8800 GTS is a beast of a card. Here is an interesting picture that compares the 8800 with a Voodoo1 obsidian reference board, the first 3D card I ever had.

In addition multicore processors are now available and require a new way of thinking when developing for them. For this reason I have decided to build an entirely new development machine rather than upgrade, and have ordered the following parts (click to see image):

EVGA Geforce 8800 GTS Video card
Intel Core 2 Duo E6400 processor (2.13 Ghz)
Seagate Barracuda 320GB SATA HD
Asus P5W DH Deluxe motherboard
OCZ Gold XTC PC2-6400 RAM
Apevia X-Discovery blue case, 420W PSU (will swap PSU with my current 500W one)

I have also preordered Windows Vista which will be released 2 weeks from now. I won't be developing on the machine until Vista arrives, but I will be putting it together to make sure the components work fine.

I am still waiting for the case to arrive. When it does I'll start putting the components together.
Sign in to follow this  
  • Advertisement