New team member: Pavel Rojtberg

The new year has just started and already we have good news for the Ogre community: Pavel Rojtberg officially joined the development team. Many of you will already be familiar with him and his work in his Ogre 1.10 fork. Many / most / all of his changes will step-by-step make their way into the official 1.10 branch for which Pavel took over the maintenance. Some of you might already have noticed that based on him having commit/merge privileges now in the repository and him already making use of those since a few days.

Since most of the team resources are currently locked up in Ogre 2.x development, Pavel’s support is most welcome to make sure that the current Ogre 1.x versions don’t get left behind.

So, welcome on board Pavel!

Ogre Progress Report: December 2016

Merry XMas! if you don’t celebrate it, good wishes anyway!

It’s been 9 months since our last progress report. We think it’s time for a new one! Oh boy. So much has been done and still in the works.

 

Metal Support

In case you didn’t notice: Ogre 2.1 now runs on Apple’s API Metal. And it’s stable! It only works on iOS for the moment, since a few tweaks are required to make it work on macOS as well.

You’ll need to use the 2.1-pso branch in order to use Metal. The 2.1-pso branch is scheduled to be merged with 2.1, once testing of the branch 2-1-pso-cache-legacy finishes (which implements a PSO cache utility meant to help users port their immediate style rendering code such as GUIs to support PSOs without major/significant changes).

 

MSAA resolving for D3D11

MSAA for Render Textures has been broken on D3D11 since like…forever. Not anymore. D3D11 MSAA targets will now be resolved appropriately, according to our implicit resolve rules (explicit resolve support still pending, but in that regard OpenGL is in the same state).

 

Parallax Corrected Cubemaps

PCC for short, aka Local Cubemaps, Local reflections, Cube projection.

PCC reflections are very important to achieve accurate local reflections.

View post on imgur.com


Our PCC implementation has two modes of operations: Automatic & Manual. Both have their strength and weaknesses.

Automatic “just works”. Probes get automatically blended together (based on camera position) and applied. However automatic may have trouble showing reflections from distant probes, and in some cases the blending may be too evident.

Manual solves the problem of distant reflections not showing up and the blending issue, but it requires you to explicitly set the probe to the material. Also if you don’t perfectly subdivide the geometry to fit the probe’s bounds, you may see gaps (since there is no blending happening at all).

You can actually mix automatic and manual behaviors.

Once the texture refactor is ready (keep reading) we may provide more powerful and superior automatic methods (by using Clustered Forward to select which probe to use and cube arrays to do the actual selection, which are only supported on DX11 class hardware or better).

For more information and experimentation you can look at our two samples LocalCubemaps and LocalCubemapsManualProbe.

Important note: The samples don’t make it yet too obvious that the PCC system reserves one visibility mask + Render Queue for their internal computations (i.e. it stores its Items into a RenderQueue of your choosing, set with a visibility bit also of your choosing). If you accidentally try to render those items, it will look funny. Keep in mind they may affect other things too, such as ray picking and Instant Radiosity generation (remember to filter those objects out).

 

Created Ogre 2.1 FAQ in the Wiki

We’ve addressed it in a news post already. We’ve written a wiki resource to address frequently asked questions regarding Ogre 2.1.

 

Texture Matrix Animation in Unlit

This has been requested a lot. Now you got it!

While we don’t yet provide easy ways to animate textures using material commands like old 1.x materials did, at least it’s now possible to animate them by hand if you need to.

 

Global Illumination

We’re working on a technique called Instant Radiosity. The idea is very simple:

  1. Trace a lot of rays from the light.
  2. Generate a point light where the ray hits the surface. We’ll call this point light a VPL (Virtual Point Light)
  3. Cluster very close VPLs into one by summing their light contribution and averaging their locations.
  4. Use Forward3D or ForwardClustered (or Deferred Rendering) to use all these VPLs in scene.

The technique is an approximation but the results are very convincing, and lots of knobs to adjust for tweaking the results efficiently.

Instant Radiosity is not a very slow technique but neither a real time technique. When it comes to generating the VPLs, we still need to raytrace. Even if the raytrace takes e.g. 500 ms, it’s not suitable for real time. It was chosen because it was easy to implement and offers a lot of flexibility when compared to other techniques (such as Light Propagation Volumes) due to all the settings that can be adjusted, while also illuminating dynamic objects. In other words, the cost benefit ratio was really good.

This image is only lit by a spotlight + Global Illumination:

View post on imgur.com

And now same scene with VPL debug markers turned on:

View post on imgur.com

Another angle with parameters exaggerated:

View post on imgur.com

Clustered Forward

Instant Radiosity made it obvious that Forward3D was under-performing. While it was original research done by me (dark_sylinc), it was clear it wasn’t as well as I had estimated and hoped.

So I just went ahead and implemented Clustered Forward. It’s both threaded (slices are assigned to different threads) and SIMD optimized. Also the Frustum vs. Spotlight and Frustum vs. Pointlight intersection tests are much (!) tighter than the ones we use for Forward3D.

In debug builds, having many slices may take a noticeable hit on CPU when compared to debug Forward3D. Though you could just use less slices during debug, or switch to Forward3D.

Clustered Forward allows controlling many slices, which improves GPU speed and the tight frustum tests mean shaders don’t waste precious cycles trying to shade with lights that aren’t actually visible. This leads to an average performance improvement of 33%, though your mileage may vary (it can be 2x faster or 0x if your lights had gigantic ranges).

 

Compositor improvements

  • Scene passes now have “enable_forwardplus” to explicitly turn of Forward3D and ForwardClustered in passes you don’t need them. This will improve CPU consumption by avoiding wasting cycles in building the light lists on something you won’t be using.
  • Compositor workspaces now support more than one input (i.e. not just the “final target”, which was usually but not always the RenderWindow). “connect_output” still exists, but it just does the same as “connect_external 0”. Useful when you want a workspace to produce a lot of results for you, not just one.
  • 2D Array textures, cubemaps in compositors: They can now be created via compositor scripts. See the manual for more information.
  • UAV Buffers: Instead of creating UAV textures, you can also create buffers. We allow creating buffers of fixed byte sizes, and width x height sizes. You can also create them from C++ and treat them as external buffers for the workspace (they work just like external textures). Useful mostly for compute and some advanced rendering algorithms. See the manual for more information.
  • Double-sided stencil: Some parameters have been moved to the “both” block. See Sample_StencilTest and the manual for more information.

 

Quadratic behavior when loading meshes

User 0xC0DEFACE noticed loading 60.000 meshes was taking more than 15 minutes due to O(N^2) behavior in our code. He fixed it with a very trivial change and brought it down to 4 seconds. Kudos!

 

Merged PSO branch

PSO had been very stable for a long while now. Plus there had been a bunch of very important bugfixes (like stencil support, some edge case viewport glitches) that were only in PSO branch.

Furthermore I found myself very often merging and cherry-picking between the different 2.1 branches, which is a sign that they needed to be merged. So I did.

The last non-pso commit was 06631aef218d73fdc2ca323da626a53650d941be

 

GLES3 Progress

New user Hotshot5000 has stepped up to port the GLES3 RenderSystem to Ogre 2.1.

He’s claiming he is starting to see the light. We wish him good luck as we wait impatiently for more updates from him!

 

In Design: Texture Refactor

The texture refactor was announced. No coding work has been done yet, but we’re solidifying the foundations how texture loading will work in the future.

New team member: Eugene Golushkov

As many have already noticed, we have a new Ogre team member for already a few weeks now, so it is finally time to official announce this great news: Eugene Golushkov (forum account: Eugene) has joined the ranks of the core team and is currently focusing on the DX11 implementation efforts.

Eugene is actively working on a commercial application using Ogre and therefore is able to provide a lot of crucial insight into the implementation’s state and is able to directly tackle issues as they get uncovered by his day-to-day work. He already contributed a lot of fixes and additions to the DX11 render system and is overall doing great work.

More details on the updated team page.

Google Summer of Code Application 2016

In a few hours the deadline for organizations to apply for the Google Summer of Code 2016 will end. And of course we have submitted our application to participate again in this great project.

One part of the application is an ideas list that proposes some interesting topics to potential students. The development core team compiled such a list of project ideas that are deemed very relevant. But of course this list can be extended by ideas from the community. In order to gather and discuss them, we created a thread in the forums and would encourage everyone to chime in and provide feedback either for already listed ideas or new ones.

Looking forward to your ideas!

Ogre Progress Report: June 2015

A little late report. We know we missed April & May in the middle. But don’t worry. We’ve been busy!

So…what’s new in the Ogre 2.1 development branch?

 


1. Added depth texture support! This feature has been requested many times for a very long time. It was about time we added it!

Now you can write directly to depth buffers (aka depth-only passes) and read from them. This is very useful for Shadow Mapping. It also allows us to do PCF filtering in hardware with OpenGL.

But you can also read the depth buffers from regular passes, which is useful for reconstructing position in Deferred Shading systems, and post-processing effects that need depth, like SSAO and Depth of Field, without having to use MRT or another emulation to get the depth.

We make the distinction between “depth buffer” and “depth textures”. In Ogre, “depth textures” are buffers that have been requested to be read from as a texture at some point in time. If you want to ever use it as a texture, you’ll want to request a depth texture (controlled via RenderTarget::setPreferDepthTexture).

A “depth buffer” is a depth buffer that you will never be reading from as a texture and that can’t be used as such. This is because certain hardware gets certain optimizations or gets more precise depth formats available that would otherwise be unavailable if you ask for a depth textures.

For most modern hardware though, there’s probably no noticeable performance difference in this flag.

(more…)