New A.I. system, PhysX 3.1.1 and fixed that damned water transparency and depth sorting issue

The A.I. part:

For a final’s exam this semester, I had to develop a multi-agent system that could play team-based 2-on-2 tenis (with a soccer ball) and came up with this:

It’s just the first test of the AI Framework used to create multiple agents for single or team-based interactions. Just a test of visual sensors, communication, coordination and stuff like that.

Also a test of thread safety for the SceneGraph as each entity’s local transformation matrix is modified by the AI thread and rendered in a separate thread. 3 threads, one pointer đŸ™‚

Some shadow artifacts occur during mid-video, but that’s due to the not yet finished PSSM system I’m working on. Also. don’t mind the complete lack of animations :)) I have better things to code for now.

Performance is choppy due to the Profiler from VS2010, Fraps, the code being compiled as a debug build, shader failing on the ball. Also, the quality is low as this video is used to pass my AI exam, and I don’t have a lot of time to waste on compression.

The PhysX part:

nVidia released the 3.x iteration of it’s PhysX SDK which you can read about  >>here<< so I thought of adding it to the framework. Specifically the 3.1.1 iteration (info >>here<< )

After some long coding sessions, the API was up and running, driverless and really fast. Only simple box-collisions for now, but it proves that the API is syncing data with the SceneGraph nicely and in a thread-safe manner:

The water transparency stuff:

Water wasn’t really transparent, because 2 very important states, culling = off, blending = on, weren’t set correctly while rendering. This was due to the absence of a Render State Manager and a Render Queue. Everything was rendered via a recursive callback on the SceneGraph. Adding a Render Queue sorting method and some minor changes to the State Manager, I finally managed to properly switch states and render transparent objects in a back-to-front order. The result? Well, semi-transparent water:

Underwater transparency

Facebooktwitterredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.