Friday, December 18, 2015

Data Driven Rendering in Stingray


We’re all familiar with the benefits that a data driven architecture brings to gameplay: code is decoupled from data, enabling live linking and rapid iteration. Placing new objects in the editor or modifying the speed of a character has an immediate effect on a live game instance. Really speeds up the development process as you fine tune scripts, gameplay and other content.

What about graphics programming?  It turns out that the same architecture and associated benefits apply to Stingray’s renderer.

Just by modifying configuration files (albeit somewhat complex configuration files) we can implement new shader programs, post-processing effects and even different cascading shadow map implementations. All in real time, on a live game instance. Which is a big win for graphics programmers: try out new ideas, fine tune shaders all with real-time feedback. No more of that long edit/compile/run/debug cycle. And this applies to the entire rendering pipeline: everything from the object space to world space transforms to shadow casting and the final rendering pass is all exposed as config file data, not as C++ code as with traditional architectures.

I gave a presentation on this topic a while back which has now found it’s way to our YouTube channel:

https://www.youtube.com/channel/UC0fIe6XV1PjilADTei9JMOA

By the way, there’s a lot of other great Stingray content up there so please check it out! The renderer presentation can be found under “Stingray Render Config Tutorial.”

The details as well as a PowerPoint can be found there. The code changes to add a trivial greyscale post-processing effect involve:

settings.ini: 

The render_config variable points to the renderer.config file. Settings.ini also provides a section to override default settings found in the next file, renderer.render_config

core/stingray_renderer/renderer.render_config:

Points to our shader libraries, text files containing actual shader programs. A section called global_resources allocates graphics buffers, such as scratch buffers for the cascading shadow maps and G-buffers for deferred rendering along with the main framebuffer. And most of the actual rendering is invoked in the resource_generators section. Again, more details in the YouTube video though a surprising amount can be learned just by grepping through the various config files and playing with the settings. Which is easy to do since it’s all data driven!

core/stingray_renderer/shader_libraries/development.shader_source:

One of several shader libraries. While shader code can be entered as text here, Stingray also provides a graphical node-based shader editor. And we support ShaderFX materials from Max or Maya. It’s often easier (and more portable) to implement shaders graphically.

But whatever method you choose to implement shaders in, the key point is that Stingray's entire rendering pipeline is fully accessible through configuration files. With our data driven architecture making complex rendering changes, while still non-trivial, is a whole lot faster and easier (and portable!) than working with platform-specific C++ code.

50 comments:

  1. Hi there is not link to any power point presentation in the youtube channel. I could only find this old presentation http://gamedevs.org/uploads/benefits-of-a-data-driven-renderer.pdf

    ReplyDelete

  2. Thanks for all the tips mentioned in this article! it’s always good to read things you have heard before and are implementing, but

    from a different perspective, always pick up some extra bits of information.

    geek squad support
    geek squad chat
    Webroot geek squad
    geek squad tech support
    norton.com/setup
    trend micro download

    ReplyDelete
  3. Thank you for this blog. I was about to sign up to first rate when this showed up in the results. I hope I can find something that can really help me out. I do not drive so an online work will be great.It really makes me happy and I am satisfied with the arrangement of your post. You are really a talented person I have ever seen.Geek Squad Tech Support visit for more information

    ReplyDelete
  4. Your blog is very informative, meaningful and to the point. Being a technical support blogger. I find you have a very good writing sense due to which you explain details about technical support perfectly, for more exploring your knowledge about Support For HP Printer | Number +1-877-760-6133, HP Printers Support | HP Printers Support Number
    hp printer error codes

    ReplyDelete
  5. Thank you for the inspiring and insightful piece of writing. I found This post is quite helpful.

    Visit: www.trendmicro.com/bestbuypc

    ReplyDelete
  6. Nice and well written post. Almost you cover all thing in an amazing post.

    Visit: MY.KASPERSKY.LOGIN

    ReplyDelete
  7. Thanks For Sharing Information, I really Like Your Blog. Its Really Helpful For me And Please Keep Posting.

    Visit: kaspersky download already purchased

    ReplyDelete
  8. Wow!! It's a really great experience sharing with us. I like your post, it's a really interesting.

    Visit: www.trendmicro.com/bestbuypc

    ReplyDelete
  9. Excellent blog. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.

    Visit: www.trendmicro.com/bestbuypc

    ReplyDelete
  10. Nice and well written post. Almost you cover all thing in an amazing post.

    Visit: www.trendmicro.com/downloadme

    ReplyDelete
  11. Excellent blog. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.

    Visit: www.trendmicro.com/getmax

    ReplyDelete
  12. very nice put up, i certainly love this web site, keep on it.

    Visit: Enter Norton product key

    ReplyDelete
  13. Excellent blog. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.

    Visit: www.norton.com/setup

    ReplyDelete
  14. It is very helpful to secure your device and it is very light weighted antivirus product.

    Visit: central.bitdefender.com

    ReplyDelete
  15. Thanks for sharing the information. Your blog has always been a source of great tips.

    Visit: www.bitdefender.com/downloads

    ReplyDelete
  16. Wonderful blog post, thank you so much for the great information which you provided.

    Visit: bitdefender sign in

    ReplyDelete
  17. Thank you for the inspiring and insightful piece of writing. I found This post is quite helpful.

    Visit: install trend micro on new computer

    ReplyDelete
  18. Nice and well written post. Almost you cover all thing in an amazing post.

    Visit: www.trendmicro.com/downloadme

    ReplyDelete
  19. Thanks For Sharing Information, I really Like Your Blog. Its Really Helpful For me And Please Keep Posting.

    Visit: AOL DESKTOP GOLD DOWNLOAD

    ReplyDelete
  20. Wow!! It's a really great experience sharing with us. I like your post, it's a really interesting.

    Visit: how to download bitdefender already paid for

    ReplyDelete
  21. TomTom is the official update tool for TomTom.com, that includes several helpful things like the flexibility to simply install new maps and services, restore and backup your TomTom, receive free traffic alerts, and even use services that ordinarily need a wireless information association.
    tomtom.com/getstarted | tomtom get started | www.tomtom.com/getstarted | tomtom update

    ReplyDelete
  22. webroot is the Website page or a link to download or Activate your webroot products. user may directly download webroot Antivirus program from this link without creating a webroot account. But creating an account is still a better alternative as you can login to your webroot account and get your product Information like Expiration and activation date anywhere and install other device from webroot Account dashboard. www.webroot.com/safe |

    webroot.com/safe |
    Install Webroot With Key Code

    ReplyDelete
  23. If you are a QB user, then you must keep checking the QuickBooks upgrade to enhance the productivity of your business. In every upgrade, you get new and advanced features. You can get in touch with our Experts to know more about these features and they will make you learn all the functionalities in a better way. You can help our experts related to QB.
    quickbooks error 3371
    quickbooks error h505
    QuickBooks Enterprise 2020
    quickbooks pos
    quickbooks file doctor crashes
    quickbooks online payroll login
    Quickbooks Cloud Accounting
    quickbooks bookkeeping
    quickbooks upgrade 2020

    ReplyDelete
  24. Are you finding cheap airlines services? If yes, not fret! 247customerservicenumber offer some amazing deals to make your journey cheaply. Get hands on these deals without ruining your pocket. Grab the best discount offer.
    copa airlines reservations
    southwest airlines reservations
    frontier airlines reservations
    Delta airlines reservations
    Volaris Reservations
    Turkish airlines reservations

    ReplyDelete
  25. WOW! I Love it...

    and i thing thats good for you >> DREAM MEANING Thank you!

    ReplyDelete
  26. follow the steps given here to download, install and setup ofice on your pc, follow the steps given here to activate office
    office.com/setup
    www.office.com/setup
    norton.com/setup
    office.com/setup
    www.office.com/setup
    hulu.com/activate
    www.hulu.com/activate

    ReplyDelete
  27. A well written Content provided by you. Your writing skills are perfect Frontier Airlines. i hope so you will
    write more content like this but if you are searching for flights then contact us or visit our website
    Frontier Airlines reservations..

    ReplyDelete
  28. Thanks for your article. It was interesting and informative.
    Here I also want to suggest your reader who usually travels one place to another they must visit Airlines Gethuman that offer best deals to book your seat on Southwest Airlines Flights. So do hurry and avail the best deals and get rid of to check different websites for offers.
    Get more help on
    Southwest Airlines Flights

    ReplyDelete
  29. Airlines-gethuman.org is a platform where you can Find Contact Information for all the airlines, Assistance with booking your flights, and vacation packages easily. It helps you to save both, your money and your time.


    Southwest Airlines Reservations

    Southwest Airlines Flights

    ReplyDelete
  30. McAfee Antivirus Tools are developed by Symantec Corporation, provides a complete Anti-Virus suite for PCs.o to your McAfee Antivirus software and Open it. · Enter the 25 digits alpha-numeric product key that was mailed to you
    www.mcafee.com/activate
    mcafee.com.com/activate"
    <a href="https://mcafee-mcafeeactivate.com/>mcafee activation</a>

    ReplyDelete
  31. To see who is going to become a millionaire from the Lottery Sambad result today, download today's Lottery Sambad result on this portal.After the bygone era, playing a lottery game is now an easy way to earn money in an exciting way.The lottery sambad Morning West Bengal State Lottery Nagaland state Lottery Kerala Lottery Result Kerala Lottery Today Result published three times a day, is a very quality lottery and Satta king results.

    ReplyDelete
  32. Hi, I'm Rakshit, a passionate travel blogger. I have 2+ experience in travel blogging. With a passion for exploring the planet and bringing new lives into the world. Follow my blogs to know all my travel experiences and get amazing tips & tricks to make your travel experience amazing.
    delta flight

    ReplyDelete
  33. Thanks for Sharing such an amazing article. Keep working... Your Site is very nice, and it's very helping us.. this post is unique and interesting, thank you for sharing this awesome information

    Meesho APP | Meesho APK

    ReplyDelete
  34. Thank you for sharing your article and I hope you will share some more information about this..keep sharing!! and please visit our website.
    India Broadcasting World brings you a complete package of the latest happenings Aoccuring in the Media & Entertainment Industry, Telecom Sector, Broadcasting & Cable TV Services in form of news, articles, guest articles.


    ibw
    Indian broadcasting

    ReplyDelete
  35. Visit microsoft365.con/setup or Microsoft Cloud Partner site. Click on “create a new account” or “Sign Up” tab. Enter an email associating to Outlook or use a mobile number. Click next and create a password. Follow instructions and create Microsoft Office 365.

    ReplyDelete