PDA

View Full Version : Real Time Renderer


evanschaible
06-19-2009, 09:51 AM
I was playing around today with the Vertex Renderer script provided in the reference and I managed to get a much needed Krakatoa-esque real time particle renderer out of it. I have been demoing the new VRay RT release, and I had a thought...

Could we use a similar idea to my real time particle renderer and harness maybe Mental Ray or the scanline renderer to get real time feedbak similar to VRay RT? I havent scripted with the renderer before, so that is a new area to me, but I can take what I know and build upon it.

Any hints, ideas or maybe you already did it? Any feedback would be great before I buckle down on this thing.

- Evan

Bobo
06-19-2009, 06:40 PM
I was playing around today with the Vertex Renderer script provided in the reference and I managed to get a much needed Krakatoa-esque real time particle renderer out of it. I have been demoing the new VRay RT release, and I had a thought...

Could we use a similar idea to my real time particle renderer and harness maybe Mental Ray or the scanline renderer to get real time feedbak similar to VRay RT? I havent scripted with the renderer before, so that is a new area to me, but I can take what I know and build upon it.

Any hints, ideas or maybe you already did it? Any feedback would be great before I buckle down on this thing.

- Evan

Calling the renderer for simple stuff could theoretically be done, but it won't be too RT due to the need to translate the scene each time which can be slow. That being said, mental ray now has the ability to cache most of the data and only update shaders that have changed. I remember writing a script to do progressive refinement rendering and it sort of worked, but was not very useful after all.

A realtime Krakatoa would be doable at many levels, but the main purpose of Krakatoa is pushing the limits of particle counts and flexibility in offline rendering with (believe it or not) speed being a secondary objective. If we have the choice between flexible OR fast, we always pick flexible.

We got some examples in Krakatoa 1.5 where particle shading in the viewports could be considered sort of RT-like, but not the whole rendering process which requires the sorting of particles against various viewpoints (lights, camera) etc.

Also, if the Particle Cache is being used, Krakatoa can do Interactive rendering in Max 2009 via the VFB controls. If the redraw time of a frame is less than a user-defined threshold, changing most of the settings can trigger an update of the frame. This was of course implemented in MAXScript.

evanschaible
06-19-2009, 08:18 PM
I definitely understand that about Krakatoa. What would be the limits of adding shadows (I think it would be nigh impossible to do it with motion blur RT) to the real time update? That would quite helpful and would pretty much make my day. I spend most of my time in PFlow so what I have already is immensely useful, but adding that extra little bit would be nice.

- Evan

Bobo
06-20-2009, 02:02 AM
What would be the limits of adding shadows to the real time update?

What do you have in mind? Changing shadow/light parameters causing an interactive update of the VFB? That would be relatively easy to implement as a callback. Can you give a workflow example?

evanschaible
06-20-2009, 03:04 AM
A good example would be kind of just adding to what I already have. I just modified the script that was in the reference file so it so it displays a smaller window size and I stuck it on my toolbar. I really havent had the time like I thought I would to develop the point rendering like I wanted to today. Right now I am just adding a global shape operator in PFlow set to a tiny size. This is providing the vertex info that the renderer needs to display the particle ticks.

So I need to develop this in two ways at this point, and pertty much learn as I go with this as I havent scripted anything other than PFlow before.

I am wanting to convert this from a vertex renderer to a point renderer, and have the shadow information (similar to what you get with lighting enabled in Krakatoa) display in real time. Pretty much so I can have a floater open that will show me in real time any changes I make to the particles. I am close, but not quite there as what I have at the moment isnt useful when using anything that utilizes shape instances or other shapes in the viewports.

If I fumbled around the Krakatoa scripts could a modification be made that allow for real time rendering like this?

- Evan

evanschaible
06-22-2009, 06:58 PM
Hey Bobo,

Are the Krakatoa MAXscripts the source code, or is there some C code somewhere that it points to?

- Evan

Bobo
06-23-2009, 08:27 AM
Hey Bobo,

Are the Krakatoa MAXscripts the source code, or is there some C code somewhere that it points to?

- Evan

Krakatoa is a hybrid system - the renderer is pure C++ Max SDK plugin, the UI is almost 100% MAXScript (except for the one button in the Renderer tab that opens the UI when not using the MacroScripts as one should).

The VFB controls in Max 2009 are also pure MAXScript (they are scripts even in Max 2009, Frantic lobbied Autodesk a lot to implement the VFB extensions that way so we could make Krakatoa use them).

It is possible to set all properties and call the renderer from MAXScript. The rendering itself happens inside a DLR plugin.

CGTalk Moderation
06-23-2009, 08:27 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.