OGRE – Open Source 3D Graphics Enginehttp://www.ogre3d.org
Home of a marvelous rendering engineTue, 12 Sep 2017 19:59:24 +0000en-UShourly1https://wordpress.org/?v=4.8.2Ogre 1.10 Mid-Term Reporthttp://www.ogre3d.org/2017/09/02/ogre-1-10-mid-term-report
Sat, 02 Sep 2017 20:49:13 +0000http://www.ogre3d.org/?p=3177With the 1.10.8 release, the 1.10 support cycle is approximately half way over, which is a good time to recap the features and switches that got introduced since the initial release.

Note that Ogre 1.10 is the only actively maintained release – all other branches have reached their end of life, so no bugfixes will be back-ported.

If you are still using Ogre 1.9 or even a previous release, you are encouraged to upgrade to 1.10.

But besides bugfixes, there were also some notable changes, which will be presented below.

Java component

Following the Python Component that got introduced with the initial 1.10 release, we now introduce the Java Component. Both of them share the same SWIG definitions, meaning they have the same API coverage.

OpenGL improvements

The existing Vertex Array Object (VAO) implementation in GL3+ and GLES2 was so broken that VAOs had to be updated each frame – essentially disabling them. From 1.10.7 on VAOs work as expected and give a performance boost of about 10%.

Thanks to a contribution by Jean-Baptiste Griffo the GL3+ RenderSystem got a StateCache (accompanying GLES2 and GL). We took it as a starting point to further improve and unify the State Cache implementations and indeed could eliminate various bugs inside the GLES2 and GL caches.

Deprecation of node-less positioning

Traditionally Ogre allowed you to place Cameras and Lights in the scene without attaching them to a SceneNode. This resulted in three different positioning APIs for Cameras, Lights and SceneNodes with slight inconsistencies (Camera::move vs. SceneNode::translate) and one big one:

SceneNodes & Cameras look into (0,0,-1) by default

whereas Lights look into (0,0,1)

To make things consistent, using the Camera and Light API for positioning is deprecated now. If you want to move away from the origin, you have to attach to a SceneNode (same as you would have to with Ogre 2.x).

The only exception is Light::setDirection, which you should call with (0,0,-1) to make Lights behave like the other Nodes.

We cannot go ahead and change the default direction for 1.10 as it would break existing applications.

Compile time switches

Lets turn to some more fundamental changes that change the API and thus are hidden behind CMake switches.

OGRE_THREAD_SUPPORT == 3

To quote Steve, who initially implemented threading in Ogre:

OGRE_THREAD_SUPPORT==1 where resource management is fully threaded, was hopelessly naive. It required too many locks, and also that the rendersystem was multi-threaded. OGRE_THREAD_SUPPORT==2 improved that by not requiring that the rendersystem was threaded, and just doing disk I/O in the background, but still, the whole process is still driven within the Resource class, which means the locks are still in place on Resource and by association SharedPtr and a bunch of other classes too.

Therefore we introduce the new OGRE_THREAD_SUPPORT==3 option. Setting this, Ogre core objects – most notably Resource – are not thread-safe. However the DefaultWorkQueue is threaded. This allows the Terrain and MeshLOD Components to be multi-threaded without the locking overhead in OgreMain. See #454 for details.

OGRE_USE_STD11

Setting this option, the custom SharedPtr and AtomicScalar types become merely aliases for std::shared_ptr and std::atomic which are both more portable and higher performance alternatives.

Also std::thread is used as the default threading provider.

OGRE_NODE_STORAGE_LEGACY

Traditionally Ogre uses (hash-)maps to store everything by name, including sub-nodes and attached MovableObjects. While this gives you O(log(N)) lookup, iteration performance is terrible as maps are spread all over the memory and thus trash the CPU caches.

However with rendering the most common operation is iterating (for e.g culling) over all children while lookup is only done for changing the state. Furthermore high-frequency lookups can be easily avoided by just storing the returned pointer.

Setting OGRE_NODE_STORAGE_LEGACY=0 will use the cache friendly std::vector instead of maps. Naturally lookup by name becomes O(N) instead of O(log(N)) and the API changes. However this improves rendering performance by about 20% – bringing Ogre 1.x into 2.0 range when only a few nodes need updates. See #440 for details.

An outlook on Ogre 1.11

As the amount of possible configurations explodes with each switch we introduce, we are going to only allow one setting with Ogre 1.11 to keep things maintainable.

So rather think about the switches in terms of feature previews and not so much as options.

With Ogre 1.11 we will choose the following configuration:

Only OGRE_USE_STD11=ON will be supported. In other words Ogre will switch to C++11.

Only OGRE_NODE_STORAGE_LEGACY=OFF will be supported.

OGRE_THREAD_SUPPORT=3 will be the default. Only the std::thread provider will be supported.

Custom memory allocators will no longer be supported. You will be able to define C++11 template aliases to set them for STL containers though.

]]>x3ogre presented on the Web3D 2017http://www.ogre3d.org/2017/06/19/x3ogre-presented-on-the-web3d-2017
Mon, 19 Jun 2017 12:22:27 +0000http://www.ogre3d.org/?p=3050At this year’s Web3D conference in Brisbane a new Ogre based X3D viewer, called x3ogre, was presented.

Even if you have no interest in using X3D, this is a good reference how to put Ogre on the Web and do JavaScript interoperability.

]]>Ogre3D 1.10 releasedhttp://www.ogre3d.org/2017/04/23/ogre3d-1-10-released
Sun, 23 Apr 2017 23:51:50 +0000http://www.ogre3d.org/?p=3003We finally tagged the Ogre 1.10 branch as stable (tag: v1-10-4), making it the new current and recommended version. We would advise you to update wherever possible, to benefit from all the fixes and improvements that made their way into the new release.
This release represents more than 3 years of work from various contributors when compared to the previous 1.9 release. Notably, it includes the following three GSoC 2013 projects:

Additionally it includes the changes from the git fork that got merged back into default. The fork formally did the 1.10.0 release, thats how we ended up with 1.10.4 here.

Currently we don’t have any published SDKs yet, since we still rely on team and community members to help with the building and packaging process and that takes some time of course. We will update the download page as they become available and also try to update the announcement thread in the forums.

Unified Documentation: the API docs, the manual and some Wiki pages have been merged and are now managed with Doxygen. As a consequence, the Wiki is outdated when it comes to OGRE 1.10. If you find something particularly missing, feel free to submit an additional tutorial.

Despite the amount of new features OGRE 1.10 provides the smoothest upgrade experience between OGRE releases so far. See the API/ ABI change overview for OGRE 1.7 – 1.10 that is kindly provided by ABI-laboratory.
Note that some components are marked as [BETA]. This does not mean that they are likely to crash, but that we can not give any API stability guarantees for them right now. You should expect their API to change without a deprecation period while we we iron the warts out as the Component get more exposure.

In turn for the core components, our deprecation list has grown considerably. You can keep using these APIs for now, as we intend to support them until OGRE 1.11. Speaking of which; to make OGRE releases predictable, we will switch away to a feature based to a time based release model for the 1.x branch. This means that you can expect OGRE 1.11 in April 2018.

Contributors

We would like to thank everyone who helped us make this release possible. The following list shows a list of contributors for 1.10 based on the git logs:

]]>New team member: Pavel Rojtberghttp://www.ogre3d.org/2017/01/09/new-team-member-pavel-rojtberg
Mon, 09 Jan 2017 02:23:12 +0000http://www.ogre3d.org/?p=2987The 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.

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.

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).

Texture Matrix Animation in Unlit

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:

Trace a lot of rays from the light.

Generate a point light where the ray hits the surface. We’ll call this point light a VPL (Virtual Point Light)

Cluster very close VPLs into one by summing their light contribution and averaging their locations.

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.

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.

Since we often get questions about the new Ogre versions in general and more specifically about the state of Ogre 2.1, Matias took the time to prepare an FAQ article in the wiki that provides answers to the most frequently asked questions. Over time we will expand this article to include new questions.

For a more general overview about the Ogre versions, we also have our existing “What version to choose” page to provide guidance.

]]>Ogre Progress Report: March 2016http://www.ogre3d.org/2016/03/14/ogre-progress-report-march-2016
Mon, 14 Mar 2016 22:00:36 +0000http://www.ogre3d.org/?p=2922Whoa! Last time I (Matias) posted, we had a different website

What I’ve been working on:

I’ve started working on “Compute Shaders” (CS). They have been blocking future progress for far too long. They are required for modern techniques such as Forward+ and come in handy for things like tiled deferred rendering. Originally I started on compute shaders because I wanted them for a new terrain system that could generate the shadow maps in real time (yeah, there’s a new terrain system coming). CS are the only way to do it efficiently.

This has been a lot of work, and is currently under the unstable branch “2.1-pso-compute”. Actually, Compute Shaders are already working. However what we need to support is UAV buffers, which is sort of speak like read & write malloc’ed arrays of GPUs. We’ve already added support for UAV textures, but UAV buffers were missing and they are more flexible.

UAV buffers need to be treated with care though, because you’ll likely want to to create them from C++ (since they’re almost like a GPU malloc), but the compositor needs to be aware of them.

Why, you ask? Because the compositor is in charge of placing memory barriers and resource transitions. In other words: It needs to prevent race conditions. You’ll see … if you run Compute Shader A, and then Compute Shader B, and then render geometry, you have no guarantee that A will be completed before B. In fact, rendering geometry may even finish before A does!

This is great for GPU parallelism (colloquially known as Async Compute), but sucks if there were data dependencies (e. g. B depended on A, or Rendering Geometry depended on A or B). Memory barriers/resource transitions ensure shaders that must be run in order are executed in order while, hopefully, shader executions that are independent can run in parallel without being stalled.

The Compositor is in the best spot for this kind of work because it analyzes dependencies once (during workspace initialization) and can see all input, outputs and data dependencies.

That means that while UAV buffers can be created and managed from C++, some parts must be relinquished or informed to the compositor to ensure proper behavior (whether via scripts or via code). This means I need to be extremely careful with the design to avoid a clueless programmer innocently setting an UAV as input/output from a compute shader directly without the compositor noticing.

To make things worse, D3D11 & OpenGL differ quite greatly in how UAV buffers should be handled.

All in all, progress is steady. Compute Shaders are coming.

Other stuff that has increased in importance has been multiple RenderTarget inputs to compositor workspaces. Right now we only allow defining one “final target” which is treated as the final output (i. e. the RenderWIndow), although it doesn’t necessarily have to. The intention is to support more than just one external RenderTargets being available to a Compositor Workspace, which helps a lot in chaining multiple workspaces together (and are also very relevant for calculating memory barriers correctly).

Compute Shaders defined via JSON and have access to the Hlms

This is something I’ve been wanting to do for a while. Instead of using low level material’s syntax or interface (which was half ill-suited, half well-suited for the job), a new special Hlms is in charge of Compute shaders. We already have a working example (see all possible settings), although beware it’s subject to change. Auto params work, but not all of them since some don’t make sense because they were meant for rendering (and for the moment, attempting to use the unsuitable ones will likely result in a crash).

Why am I excited about the Hlms access? Because of the preprocessor of course!

For example, you can use the Hlms to unroll a loop based on the width of texture, thus reducing loop overhead during execution. Unrolling a loop can be critical in fully utilizing all bandwidth when performing certain tasks (such as parallel reduction), though it can hurt performance in other cases (particularly if the instruction length is too high, or it results in high register pressure).

You can also adapt your code based on the number of threads per group or automatically modify the shader depending on whether the bound texture is MSAA or not (which would normally require defining multiple shader programs and manually selecting the correct one).

What’s next?

Once Compute Shaders are over, I can finish what little remains of this terrain system and release it. Afterwards I may end up resuming on DERGO (a in-Blender live Ogre material editor) or continuing support for GLES3.

I really want to work more on DERGO, but GLES3 working again would mean three platforms being compatible again (OS X, Android, iOS) and once we have that in the bag, we might start talking about an official 2.1 SDK release date. Can’t say that isn’t tempting…

What else was accomplished in the past 2 months:

User al2950 contributed PlaneBoundedVolumeSceneQuery to Ogre 2.x. This feature has been requested by many. Thanks!

spookyboo deserves a special mention for reporting a lot of JSON bugs for our PBS materials. He has been severely stress testing our system as he’s been working on a Hlms material editor.

Thanks to all community users who have been reporting your issues and helping make Ogre 2.1 more robust every day! Our PBS implementation has been under a lot of scrutiny lately and I like it. It hurts my ego of course, but it results in improved quality. This of course means our users can focus on the important parts and not on the technical details.

]]>New team member: Eugene Golushkovhttp://www.ogre3d.org/2016/03/13/new-team-member-eugene-golushkov
Sun, 13 Mar 2016 20:56:30 +0000http://www.ogre3d.org/?p=2937As 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.

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 Steam Sales Listhttp://www.ogre3d.org/2016/02/18/ogre3d-steam-sales-list
Thu, 18 Feb 2016 01:09:58 +0000http://www.ogre3d.org/?p=2887Getting actual sales numbers for game titles is often difficult and unfortunately, we haven’t found a magic divining rod to get those numbers (yet), but with services such as SteamSpy it is at least possible to get a rough estimate for the leading game sales platform.

Our community member “bronzebeard” took it upon himself to compile a list of known Ogre-based Steam titles and their estimated sales numbers. He also promised to update the list approx. every month.