[Please vote] Knowledge, Usage and Future of Ogre's RTSS

News, announcements and important global threads from the Ogre3D Team.

Are you aware of Ogre's RTSS and do you use it in your projects? If not, shy?

I use / have used it.
44
15%
I know how to use Ogre's RTSS, but haven't utilized it so far because ...
27
9%
I am aware of Ogre's RTSS, but don't know how to use it.
156
54%
Never heard of Ogre's RTSS so far.
64
22%
 
Total votes: 291

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

[Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by spacegaier » Sun Aug 26, 2012 1:53 pm

Hi Ogre3D community...

Introduction
...it has been three years now since Ogre3D Dev Team Member Nir Hasson created the incredible powerful Real-Time Shader System (RTSS).

The need for this system came from the demand to reduce the amount of work needed by writing many shader programs for each material in an application. Another issue is that many 3D applications need to generate materials during runtime, so the actual shader code of these materials is not predictable and therefore one cannot write appropriate shader programs in advance. Other scenarios include real time switching of different fog modes or reacting to light on/off switching and the impact it has on shader.
This is where the system comes into play, since it allows you to easily specify in your materials what kind of shader / effect you want and the system will take care of all the rest.
So basically you don't have to write a single line of shader code :)!

This is huge...but does the community know that?
To our knowledge no other major open-source rendering engine has such a flexible system like ours, maybe not even the closed-source ones. But so far we have no real way of knowing whether this huge feature is actually being used throughout the community and if not, what are the reasons for the current situation :?:

The only indicator we have are the relatively low number of related threads here which could either prove that the system is easy to use and simply works :) or that many of you are not aware of it or have other reasons not to use it :(.

Let's ask the community!
Therefore we would like you to quickly participate in this poll to give us an idea where we stand and what future steps we should take in that area. We would also appreciate any comments, especially from those of you that are already aware of the system but have not used it so far. Giving us some hints to why that is would be really helpful :!:

References
For those of you who got curios now and want to check out what more there is already covering the system, here are some links to get you started :idea: : Thanks in advance,
Your Ogre3D Team
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

User avatar
saejox
Goblin
Posts: 260
Joined: Tue Oct 25, 2011 1:07 am

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by saejox » Sun Aug 26, 2012 4:15 pm

I know how to use Ogre's RTSS, but haven't utilized it so far because ...

my engine is free of any game logic and hardcoded effects.
i need some of scriptable interface to make use of it. i have written partial binding for angelscript, still i am unsure about it. debugging is not very intuitive.
also, there arent any visual material editors compatible with RTSS, this would have been gold.

i hope return it at a later date.
0 x
Nimet - Advanced Ogre3D Mesh/dotScene Viewer
asPEEK - Remote Angelscript debugger with html interface
ogreHTML - HTML5 user interfaces in Ogre

User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by Mind Calamity » Sun Aug 26, 2012 11:59 pm

I used RTSS on my last project. It was extremely helpful for setting up PSSM, as I'm completely inexperienced with shadows and shaders in general. Also the no-shader per-pixel lighting was extremely easy to setup and use.

All in all, it was a lifesaver for me at the time. I'm working on my engine now, and I will include a material editor with it, probably with support for RTSS along with traditional shaders. (think Blender's material editor, nodes, along with a simpler one)
0 x
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt

BTolputt
Greenskin
Posts: 121
Joined: Thu Feb 18, 2010 8:05 am

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by BTolputt » Mon Aug 27, 2012 2:30 am

I know how to use Ogre's RTSS (somewhat), but haven't utilized it so far because ...

I'm working with OGRE through the GameKit and looking at a deferred rendering pipeline for the finished project. I don't know how well RTSS will fit into that, but it played well with my forward rendering experiments... even if I'm not the one going to use it for that.
0 x

User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by Brocan » Mon Aug 27, 2012 9:16 am

I am aware of Ogre's RTSS, but don't know how to use it...

I've used it in one project, by simply copying&pasting the code from Sample Browser, i think that the big problem is the lack of "how to use" documentation or more explained code examples. Stripping the code from the sample browser could be confusing for people.

Cheers!
0 x

User avatar
Thoran
Halfling
Posts: 94
Joined: Mon Dec 01, 2008 2:04 pm
Location: Germany
Contact:

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by Thoran » Mon Aug 27, 2012 10:02 am

Actually I know about the RTSS and I know what I can do with it, and don't know how to use exatcly it, but so far I am just not in a situation where I even would scratch at the featue level that would require RTSS so far in my engine. Probably this is a misguided thought, as it might be better to consider RTSS right from the beginning in the engine design and prepare tools to benefit from it.
0 x

d000hg
Goblin
Posts: 257
Joined: Tue Sep 02, 2008 9:41 pm

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by d000hg » Mon Aug 27, 2012 12:52 pm

Brocan wrote:I am aware of Ogre's RTSS, but don't know how to use it...

I've used it in one project, by simply copying&pasting the code from Sample Browser, i think that the big problem is the lack of "how to use" documentation or more explained code examples. Stripping the code from the sample browser could be confusing for people.

Cheers!
+1.

I also found some issues with it on iOS which make it less useful for cross-platform code...
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by spacegaier » Mon Aug 27, 2012 1:04 pm

Brocan wrote:i think that the big problem is the lack of "how to use" documentation or more explained code examples
That is what we already assumed, but wanted to have verified by that poll and this discussion. So let's wait a bit longer to see how it turns out, but we already have some rough ideas how to improve in that area.

And we are also hoping for comments why RTSS wasn't used in specific situations even if the needed knowledge was present. Very enlightening for us!
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by bstone » Mon Aug 27, 2012 2:23 pm

I haven't used RTSS because I figured out that the material scripts (with inheritance, variables, aliases) were flexible enough for my purposes and knowing that developing and debugging shaders is not easy as it is I didn't want to add another layer that would have made things harder to the process. Maybe it's just me but I tend to end up with custom shaders most of the time. Probably because I don't design around them but build them for the current design. With that in mind RTSS obviously has noticeable overhead for adding custom solutions and they somewhat defeat its purpose anyway.

I also saw quite a few bug reports popping up here and there at the time I was looking into RTSS.
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by spacegaier » Mon Aug 27, 2012 2:39 pm

One should keep in mind that form D3D11 on, there is not fixed function pipeline anymore, so everything has to be done via shaders. This is one of the scenarios where RTSS will be a HUGE time saver.
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by bstone » Mon Aug 27, 2012 2:41 pm

Unless you write shaders for everything anyway :)
0 x

d000hg
Goblin
Posts: 257
Joined: Tue Sep 02, 2008 9:41 pm

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by d000hg » Mon Aug 27, 2012 3:12 pm

spacegaier wrote:One should keep in mind that form D3D11 on, there is not fixed function pipeline anymore, so everything has to be done via shaders. This is one of the scenarios where RTSS will be a HUGE time saver.
That's precisely why I was excited about it, for GL ES 2 (which also lacks FF) - only to find it doesn't seem to work properly in that use case.
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by spacegaier » Mon Aug 27, 2012 3:21 pm

d000hg wrote:
spacegaier wrote:One should keep in mind that form D3D11 on, there is not fixed function pipeline anymore, so everything has to be done via shaders. This is one of the scenarios where RTSS will be a HUGE time saver.
That's precisely why I was excited about it, for GL ES 2 (which also lacks FF) - only to find it doesn't seem to work properly in that use case.
Did you trigger a discussion about it and also filed a bug report? That's the only sure way to make certain that it gets tackled and fixed eventually!
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by Assaf Raman » Mon Aug 27, 2012 3:29 pm

It works in ES2 - if you run the sample browser - it uses the RTSS to renders when ES2 is the active render system.
0 x
Watch out for my OGRE related tweets here.

d000hg
Goblin
Posts: 257
Joined: Tue Sep 02, 2008 9:41 pm

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by d000hg » Mon Aug 27, 2012 3:31 pm

spacegaier wrote:
d000hg wrote:
spacegaier wrote:One should keep in mind that form D3D11 on, there is not fixed function pipeline anymore, so everything has to be done via shaders. This is one of the scenarios where RTSS will be a HUGE time saver.
That's precisely why I was excited about it, for GL ES 2 (which also lacks FF) - only to find it doesn't seem to work properly in that use case.
Did you trigger a discussion about it and also filed a bug report? That's the only sure way to make certain that it gets tackled and fixed eventually!
I posted in the forum here a few months ago: http://www.ogre3d.org/forums/viewtopic. ... 80#p457001. I implemented locally the shader language choice order change and it helped (things at least ran). Beyond that I got a bit confused what exactly I should be reporting/requesting but if anyone can word it properly please feel free!
0 x

d000hg
Goblin
Posts: 257
Joined: Tue Sep 02, 2008 9:41 pm

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by d000hg » Mon Aug 27, 2012 3:35 pm

Assaf Raman wrote:It works in ES2 - if you run the sample browser - it uses the RTSS to renders when ES2 is the active render system.
Maybe it was since fixed, similar to the change I tried?

Does it also now know how to write valid GL(ES2)SL without using the wrong kind of matrices and so on - if so I'd be very pleased!

edit: I did raise it as a bug too it turns out: http://www.ogre3d.org/forums/viewtopic.php?f=22&t=70032
0 x

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by spacegaier » Mon Aug 27, 2012 4:09 pm

d000hg wrote:edit: I did raise it as a bug too it turns out: http://www.ogre3d.org/forums/viewtopic.php?f=22&t=70032
I meant a ticket on our tracker, so that it gets tackled possibly when doing a new release. The tickets don't have to be that long if there is already a thread describing it, but need to contain the matching link then. Threads in the forum can easily be missed during the heat of an release cycle.
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
Contact:

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by duststorm » Tue Aug 28, 2012 1:59 am

Lately I've been taking a little time to get to know the RTSS. I think it's really exciting and is very powerful.
I agree that it is not documented enough, so it takes quite some time to get into.

From the experience I have with it, I can tell that I find it very convenient if it offers what you need.
If you need to customize it, however, the generality and reusability might make your changes take twice as long than doing it on a raw shader, though. The real question is whether the extra time spent will be rewarded afterwards by reduction of the explosion resulting from all possible combinations that can be formed.

I like the fact that it stores its shader libraries in separate resource files, and not in code. So the argument some have that one needs to recompile to change shaders is not 100% true.
The RTSS is a lot more manageable than full-code solutions like the terrainMaterialGenerator. Having modified that one a bit lately, I soon found that it becomes a mess quite quickly, it's hard to subclass, and tedious to edit and debug (because parts of shader code are spread out, and it's all in code).

But yes, I also agree that the major reason for the lacking popularity of RTSS is because it's not advertised and documented enough.
About the future of RTSS: expand it, advertise it, use it! It has to stay.
Hell, it sure is a big improvement over sharing shader snippets on the wiki! ;)
0 x
Developer @ MakeHuman.org

User avatar
lunkhound
Gremlin
Posts: 169
Joined: Sun Apr 29, 2012 1:03 am
Location: Santa Monica, California

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by lunkhound » Tue Aug 28, 2012 4:41 am

I'm aware of RTSS but don't know how to use it...

I've read the wiki entry on RTSS, but one thing that is still unclear is how it works under the hood. I don't really get what a SRS is or does, or how SRSs fit together to make a final shader. I've already got a bunch of shader code written in CG and I've been able to get pretty far using the material script with texture-aliases/inheritance, and shader compile arguments, but I'm starting to feel the limits of this approach. So I've been very interested in RTSS, but I'm worried that learning how to convert my existing shaders to RTSS is going to take alot of time. I'm also concerned that after converting my shaders to RTSS form, they may be difficult to read, understand and modify.

I wasn't aware of the RTSS example code, I'll have to take a look at it.
0 x

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by Assaf Raman » Tue Aug 28, 2012 5:35 am

what are your shaders? what do they do?
0 x
Watch out for my OGRE related tweets here.

User avatar
lunkhound
Gremlin
Posts: 169
Joined: Sun Apr 29, 2012 1:03 am
Location: Santa Monica, California

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by lunkhound » Tue Aug 28, 2012 7:23 am

Assaf Raman wrote:what are your shaders? what do they do?
Well the most complex so far is a terrain shader for the Terrain component that does lod-vertex morphing, 4 splat layers each with a diffuse and a normal map, and CSM shadows (I'm limited by texture samplers, or I would increase the layer count). The CSM shadow mapping is the most complex part, and I'm using shader compile arguments to specify the number of cascades, and whether to use variance shadow mapping or layered variance shadow mapping, and whether to enable debug coloring.

I ended up subclassing the TerrainMaterialGenerator, but it's just setting up materials, techniques, passes, and texture units. It doesn't generate shader code at all.

The other shaders I have are simpler but with the same CSM shadows. The common shadowing shader code is factored out into a CG function.
0 x

al2950
OGRE Expert User
OGRE Expert User
Posts: 1170
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK
x 65

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by al2950 » Tue Aug 28, 2012 10:17 am

I have used RTSS quite heavily, and it is indeed very powerful and an awesome piece of work by Nir :D . However it is not currently without fault, ignoring the lack of documentation (which as a user I am partly responsible for :oops:) there are some parts of the RTSS that need a re-think or at least some addition. Myself and Mattan Furst have tried to bring up some of these issues with the community before but unfortunately we did not receive much feedback, probably because not many people are using it to create their own SRS. I would quite like to do a push to improve the RTSS before 1.9 release to make it more flexible and usable, I am more than happy to put the effort in, however would like all changes/ideas to be agreed by the Ogre community.

As a result i would urge everyone to try and create their own simple SRS (Sub Render State), to get some experience with RTSS and post their feedback. I think a good example of a simple SRS that brings up a few issues with RTSS is to create one that manipulates the normals is some way.
0 x

PhilipLB
Google Summer of Code Student
Google Summer of Code Student
Posts: 550
Joined: Thu Jun 04, 2009 5:07 pm
Location: Berlin

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by PhilipLB » Tue Aug 28, 2012 10:30 am

When writing the triplanar texturing SRS, the hardest part was actually to debug syntax errors in the CG code. The RTSS just asserts with something very general ("could not create render state" or so). So I put breakpoints all over the RTSS to find the origin and then found out that it was actually a syntax error causing this. And syntax errors can not only occure in the actual shader file, but also with wrong usage of the (Uniform)ParameterPtr.
Last edited by PhilipLB on Tue Aug 28, 2012 10:38 am, edited 1 time in total.
0 x
Google Summer of Code 2012 Student
Topic: "Volume Rendering with LOD aimed at terrain"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Mattan Furst


Volume GFX, accepting donations.

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by spacegaier » Tue Aug 28, 2012 10:34 am

al2950 wrote:I would quite like to do a push to improve the RTSS before 1.9 release to make it more flexible and usable, I am more than happy to put the effort in, however would like all changes/ideas to be agreed by the Ogre community.
As usual any support is always welcomed!

Could you post a link to the mentioned discussion you and Mattan started, or if that one is rather outdated, a new thread with your current proposals might make sense. Post a link back here and I am sure that Assaf and Mattan will comment / review your ideas and provide feedback, maybe also some of the community members with experience of SRSs with RTSS (as you said there are not that many who are in such a position yet).

@Assaf / Mattan: Would you review those ideas then please, so that al2950 can start on a patch / fork?
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [Please vote] Knowledge, Usage and Future of Ogre's RTSS

Post by Assaf Raman » Tue Aug 28, 2012 11:56 am

Good ideas.
I do think that we can improve the process of adding a new SRS, by:
1. Create tutorials how to do it (we can base the on existing SRS that we added). Ex: Adding a Normal map SRS, adding photoshop blending mode SRS, texture atlas, hardware skinning\instancing, textured fog...
2. Improve the error messages and other unfriendly parts - in order to make the process of adding a new SRS easy.
3. Tutorials of using RTSS extensions in the material script files.

If adding a new SRS will be easy and documented - we will be on the road of making the use of the RTSS a common thing.

But note - writing shaders is hard, it will never be easy to create a shader that handles the many case the RTSS supports, but if you do - you will have a full solution - with lighting, fog, texturing and the rest of the benefits - for that shader.
0 x
Watch out for my OGRE related tweets here.

Post Reply