Minko, what is CP3D?

A 3D video game engine developed by a student

Julien Moreau-Mathis
Community Play 3D

--

Hello JM, this is a special article for you. An article to present Community Play 3D, its features and how about programming with the engine.

Introduction

Community Play 3D (or CP3D) is a 3D video game editor and a complete C++ SDK. The SDK is following the most important new features of C++11 and provides a real-time collaborative edition feature (see this article to know how). The biggest part of my work on this editor and the SDK was to make them intelligently thought and CP3D’s main strength resides on its rendering capabilities. I’m currently working on the D3D11 device and mobiles support.

Fast Edition tools

CP3D provides complete tools to load, edit and draw 3D models. It is based on the concept CTRL+Key = Simple tool, and CTRL+SHIFT+Key = deep tool.

Here a simple tool to manipulate materials, physics body, etc. of a model
Here an example with a deep tool to manipulate less common parameters

The second screenshot (materials editor) provides an in-house algorithm that is able to create normal maps only on the basis of the diffuse texture.

Multi render targets support in any drivers (GL & D3D)

And then multiple passes become only one.

Example with two different render targets : normal shader and depth shader. MRT allows you to generate these two renders in only one pass

Depth-Of-Field control

The dof effect is available in both methods image-based and object-based. You can see this article to know more about this effect embedded into CP3D.

Filters development using LUA as a callback program (shaders)

Programming filters with CP3D is easier than ever and view the result in real-time.

Godrays shader in HLSL version + scripting with LUA
A simple post-process is using the normal pass and reflects the entire world (this is only an example)

Normal Mapping & POM

Those shaders were rewritten to work and take benefits from the latest drivers (especially D3D11)

POM example
NM example

Programming your custom material shaders

CP3D provides a tool to develop your custom material shaders in both languages GLSL & HLSL. In the case of a D3D device, you can select the version of the shader and then compile with the appropriate compiler. (from 1.1 to 5.0). An output console notifies you where are your errors.

To configure the most common constants or static constants, the engine provides an easy language that declares pixel or vertex constants. Give its type (v or p), the name of the constant, and the values.

Normal mapping example found on the internet
Using the output console (error in line 27)
Resolved using the output console

Create particle systems

The particle system embedded into the engine is based on the SPARK particle systems engine. You can see this article for more informations about it and see it in action.

Creating a fire system with smoke. It recreates the fire+smoke example of SPARK using 0 line of code

Shadows management

CP3D rendering pipeline integrates a shadows manager. Three types of light are available : spot, point and directional. Point lighting computation is asynchronous : if you have more than 30 FPS then you’ll not see that it’s asynchronous.

Spot light example
Point light example

Physics integration and controllers

Physics integration is still WIP. It uses the bullet physics library and is able to switch between CPU and GPU computations. See this article for more informations.

Using the SDK with animations

The SDK will provide fast ways to create animations and scenarios. Because the “Scenario Maker” and “Animators Creator” tools are still WIP, no screenshots are available yet.

You can still watch this video that shows character animation using a scenario and combinations (I made the music, I’m a composer at my lost hours). The titles and black screens were just made on iMovie to make it more fun. If the black screens were absent, you should see fast transitions between the camera positions to switch between the view angles. Because the GUI tools were still inexistent, the dynamism of this video is only using the C++ SDK. More informations here. Ran on a Win8 virtual machine, MacBook Pro i7 & HD4000.

Here, I’m using the new normal mapping algorithm with the D3D11 device, that was still experimental when I took the video.

https://www.youtube.com/watch?v=MuOGDiNGMhg

See you at Futur en Seine !

--

--