• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Aqua Costa

Data-driven renderer

7 posts in this topic

I've a question regarding data-driven renderer design and maybe someone can enlighten me:

From what I've read, the renderer design shouldn't make any assumption of which rendering techniques will be used so theoretically it should be possible to do forward/deferred rendering cascaded shadow mapping, whatever.

The problem is how will something like cascaded shadow mapping be defined in simple data? The view frustum has to be slipt, matrices updated and all (visible) scene objects drawn for each cascade...

This is rather complex to defined in xml or whatever format is used... Or is a scripting language used to program this? And the renderer is called data-driven because it uses scripts instead of native code?

By the way, has anyone read GPU Pro 3? Is the chapter about data driven renderer design any good? I've read the pages available on Google Books which is most of the article but I'm wondering if there's any implementation code. Edited by TiagoCosta
1

Share this post


Link to post
Share on other sites
You could break it up using a command list, (or JSON file like BitSquid does), where you specify the steps in the pass.

You'd split the frustum on the client side, creating a camera of each. Then you'd build your passes. This optionally could be done on the engine side, but you'd limit what the client could do.

The first pass you'd provide the first frustum in the cascade, specify the RTs and DSTs to draw into, and the RTs and DSTs to use as inputs, and a list of geometry. Then create more passes for each subsequent view frusta and render into the same target or different targets or whatnot.
0

Share this post


Link to post
Share on other sites
[quote name='phantom' timestamp='1345577183' post='4971938']
[url="http://bitsquid.se/presentations/flexible-rendering-multiple-platforms.pdf"]http://bitsquid.se/p...e-platforms.pdf[/url]

Have a read of that, it goes into some details about how it can be done.
(We do something very much like it at work but ours is Lua based and does some things (subjectively) better and some worse... the 'generators' concept is one we'd like to introduce for example)
[/quote]

I've already read that, but they only show that simple fullscreen effect...

Well while reading it again: "A Modifier can be as simple as a callback function provided with knowledge of when in the frame to render" so they do use scripts in modifiers.

Talking about BitSquid architecture: Why do you think they don't use generators to draw objects? I think its weird to have that "special case"...
0

Share this post


Link to post
Share on other sites
The approach my engine takes is to assume that every project's renderer will have different requirements: performance, features, forward vs. deferred, etc. Thus, my engine doesn't consist of a main 'renderer', but just defines a set of classes that make doing common things like object batching, sorting, culling, shader management, shader attribute binding really easy. I do provide a basic forward renderer and deferred renderer, but most games would probably want to design something that is more specific to their needs. The code for each renderer is less than 1000 lines and mostly consists of code which generate standard matrix attributes (model/view/modelview/projection/normal matrices).

So, my engine has a system where each shader attribute is given a usage binding (position, normal, texture coordinate, etc), plus an optional value. If the value is not set, the renderer automatically looks in a cache of global shader variables for things like viewing matrices and then also inspects each object's vertex buffer to see if there are any per-vertex attributes that the shader needs.

This system allows pretty much anything that you can do with base OpenGL but with automatic shader attribute management and a data-driven design. The engine as a whole operates on 'mesh chunks', a simple structure containing a pointer to a vertex buffer, material object, and index buffer. These chunks are culled and sorted individually.

I had though about doing a command-based rendering system but that ended up being really overdesigned, inefficient, and necessitated some state at the renderer level - something that I want to avoid. I suppose I still have rendering 'commands', but they are just mesh chunks. Edited by Aressera
0

Share this post


Link to post
Share on other sites
Nice one Hodgman, a good example of how graphs (as a structure / design) can be very powerful and yet so flexible.
0

Share this post


Link to post
Share on other sites
Beware of over-engineering.
Example: rendering a shadow map.
My current approach is to be very-high level with scripts requesting whole "Light casting shadow" resources. This is somewhat flexible, but not nearly as much as driving the renderer directly (allocate a depth map, use it as a depth render target from projector X, bind back to shaders, render world...). My scripts don't have access to the renderer and probably won't have for quite a while. I'm just throwing it in for your consideration. Albeit testing has been pretty scarce by my side I'm already having plenty of troubles so I'm rather focusing on the core features I need.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0