Advanced scene description format - is there a need?

Practical and theoretical implementation discussion.
raider
Posts: 42
Joined: Fri Aug 03, 2012 10:36 pm
Location: Moscow, Russia.

Advanced scene description format - is there a need?

Post by raider » Sun Feb 24, 2013 12:44 pm

Hi, All!

Guys, from your experience...
Is there any (practical) use of advanced features in scene description language, I mean variables, expressions, loops, conditionals etc.
In other words, is there any sense to make it a full featured programming langues designed specifically to build/describe 3D scene, or simple "static" description is "just enough" in all cases?

I've started "yet another renderer", and I still have doubts on some very basic architectural concepts. So please feel free to share your opinion, it's very valuable from me, don't want to waste time on something "cool" feature that nobody really needs.

Thank you in advance!

ingenious
Posts: 282
Joined: Mon Nov 28, 2011 11:11 pm
Location: London, UK
Contact:

Re: Advanced scene description format - is there a need?

Post by ingenious » Sun Feb 24, 2013 2:09 pm

My view is that the scene is a piece of static data, which, in contrast to a program, cannot change of behave differently, because it doesn't take any input. I don't see any use for control flow (if, for) structures in describing static data. Can you come up with a scenario where a loop or a branch will be useful to describe a scene (or any static data for that matter)? You can probably achieve some data compression using such flow structures. But it seems to me that they will only complicate parsing the data.

Ability to describe control flow is needed for any "shader" programs that are attached to the scene data. But this is a whole science on its own and has so many other more complicated unresolved issues and lack of any standard whatsoever...

raider
Posts: 42
Joined: Fri Aug 03, 2012 10:36 pm
Location: Moscow, Russia.

Re: Advanced scene description format - is there a need?

Post by raider » Mon Feb 25, 2013 2:29 pm

Okay, I see your point. And I believe many others would share you opinion with you if we ask.
But I can think of some scenarios where I see conditionals useful.
  1. Depending on command line options you can select different versions of the objects to be rendered (high-res/low-res).
  2. You could organize objects into groups (layers) and render them separately using additional command line options.
  3. Object could be assigned to multiple groups, so in addition to ordinary layers you could organize groups “production” and “previz”, where in “production” you include all high-res objects (or references to them) and in “previz” you include the key objects only excluding extra details, like, for instance, particles. Doing so you could invoke renderer supplying additional command line options to render “for production” and “for preview” from the same file. That seams to me more convenient in contrast to generating (and keeping them in sync) separate files for each layer, for previz/production and so forth.
  4. Loops are less obvious, but… For example, you could iterate over some objects (e.g. particles), and load some other geometry instead of particles (e.g. plant geometry selected randomly from a list of files, making a field of grass that way). And, off course, having conditionals you would have a possibility to choose geometry from different directories depending on render target (production/draft).
How is that? Still looks useless?

ingenious
Posts: 282
Joined: Mon Nov 28, 2011 11:11 pm
Location: London, UK
Contact:

Re: Advanced scene description format - is there a need?

Post by ingenious » Mon Feb 25, 2013 4:05 pm

These all seem like valid use cases indeed. However, they can also be accomplished via a descriptive format. I think it's better to stick to the principle of separating the data structures from the algorithms that operate on them. I don't think you want the scene to describe a rendering algorithm -- you want it do describe data that is well structured and thus suited for various types of processing.

graphicsMan
Posts: 167
Joined: Mon Nov 28, 2011 7:28 pm

Re: Advanced scene description format - is there a need?

Post by graphicsMan » Mon Feb 25, 2013 5:58 pm

FWIW, I agree. I personally think it would be great to take this all the way to the level of material shaders. With the exception of procedural texture, I think it's time we left shading languages behind :)

jbikker
Posts: 225
Joined: Mon Nov 28, 2011 8:18 am
Contact:

Re: Advanced scene description format - is there a need?

Post by jbikker » Mon Feb 25, 2013 8:12 pm

It would be useful for procedural geometry. :)

graphicsMan
Posts: 167
Joined: Mon Nov 28, 2011 7:28 pm

Re: Advanced scene description format - is there a need?

Post by graphicsMan » Mon Feb 25, 2013 8:55 pm

Yeah, I guess procedural anything...

raider
Posts: 42
Joined: Fri Aug 03, 2012 10:36 pm
Location: Moscow, Russia.

Re: Advanced scene description format - is there a need?

Post by raider » Mon Feb 25, 2013 10:02 pm

graphicsMan wrote:I think it's time we left shading languages behind :)
Why do you think so? What's different now? I see that rendering tasks tend to become more and more complex with time (okay, not purely rendering alone, but all production pipeline getting more complicated, but rendering still big and major part of it). And that higher complexity requires higher flexibility through all the components. Not like I'm an expert in anything, just a bit surprised seeing that.

graphicsMan
Posts: 167
Joined: Mon Nov 28, 2011 7:28 pm

Re: Advanced scene description format - is there a need?

Post by graphicsMan » Mon Feb 25, 2013 10:37 pm

I guess it's more of a personal preference thing. I should probably have prefaced my statement above by saying that for physically-based rendering, we should dump shading languages for material evaluation. The reason is that it makes it very difficult to ensure the necessary properties of the material for physically-based rendering algorithms.

The material model should still allow very complex combinations of physically-plausible pieces (as long as those combinations don't break the rendering algorithm).

stefan
Posts: 48
Joined: Wed Dec 21, 2011 8:57 pm

Re: Advanced scene description format - is there a need?

Post by stefan » Tue Feb 26, 2013 6:21 am

IIRC Nvidia's Gelato used Python as scene description language, and in RenderMan there's RiProcedural which lets you plug in C code with calls to the RenderMan API. This is useful for production rendering, for example, one can easily integrate a custom fluid, particle or hair system into a RiProcedural without having to bake it into huge data sets. Geometry can then even be generated on demand with an adaptive level of detail.

For shading languages, I like OSL a lot and the latest version of RenderMan also has a new shader language that supporting what they call physically plausible shaders. I still like being able to go beyond physics in my render engines, when I need 100% realism I just take a photo ;)

Post Reply