Can I use an openGL render in the compositor?

I think this comes down to render layers so the actual question is, can I render my quickrenders to a render layer, I think that this would allow me to do some funky ( and cheap ) compositing to spice up some visuals.

THanks in advance

You can if you re-import them as an image sequence after they render out. It is just footage. I don’t think you can re-route them into the compositor in a single step processes, however.

1 Like

yeah too bad actually, would be a nice hack though. Especially when it comes to generating masks.
A highrez openGL render of a 1million poly scene ( with only 2 colors of materials ) takes about 1 second to render, while that same scene takes about 2 minutes to render using the actual render.

I chose to say render layers so that I could include the material override in it’s scope.

Oh well, depending on how well I organise it, it’s only a few steps extra, so it’s ok.

Try the video sequence editor. Here you can mix footage with the stuff in the view port. GLSL works too.

It is for this very reason that I continue to cling to the faint hope that someone will expose that OpenGL rendering capability as a compositing-node type. I have frequently grabbed on to all kinds of “GameBlender monkey-shine” just to get my hands on “good-enough for me(!!)” renders, generated almost-instantaneously by the GPU. This technique lets me get “95% of the way to where I need to be,” using the CPU techniques thereafter just for the sugar 'n spice. :ba: But it has never been easy! :ba: And, quite frankly, I’ve never accepted that there is any legitimate reason why. You can’t persuade me that this could not be done … say with Python.

Hello everyone, I started working on a script for that.
Been trying to find a solution for my pipleline too and i could.

My script is very sibple, what will basically does is, after clicking the start button, everything you move on the timeline to a different frame it will re-render the frame to a cache file, there will be a node conected to this cache file that will be reloaded as soon as its re-written.

What do you say? :slight_smile:

This sounds good. But issue on thread is accessing a mixture of glsl and cycles renders.

hmm, well first of all im done with the script, its kind of working really nice.
it saves on a tmp folder (linux /temp and windows c: mp) the tmp file re-render it and reload it every frame change to a node :slight_smile:
im happy since this is my first script and it solves most of my problems as i work alot with motion graphics.

now i only need to add a GUI so it would look and work nice.

As far as combining cycles and opengl renders, well i do this all the time, i just instance my cycles scene with link object data then i re assign a material to the object (not as data but as an object) and it works awesome :slight_smile:

Could you upload an example video? Sounds really cool. I like the caching idea. Could we buffer a test animation?

Do you want me to show how i use the script?

I can make another script to buffer a whole video, for my needs i only wanted it to cache the current frame so i can compose it in the node editor in realtime and if i want to modify anything from the 3d viewport its not biggy since it renders it automatically in opengl back to the node editor in real-time :slight_smile:

let me know what youre needs are.

P.s. all my inspirations are from this dude:

He really does a good job when it comes to only using opengl rendering and the only flaw i found is that he cant use the node editor for his renderings so i made this tool to improve it

Just realized that it would be awesome if it supported mroe than one layer at a time, for example scene 1 for the models scene 2 for z depth 3 for normals 4 for id so when you use the node editor and move forward in time it caches each scene to a separate file.
again all the layers are opengl renders and its almost realtime (with 3M vertexes + textures i managed to get a 5 secs rendering all the layers in opengl, compared to 20 of the internal renderer).
imagine the time it will save in a whole production

EYBTM thanks for the reference… and David, thanks for pointing me here. Where is the script? I’d love to check it out. I know that I would use this (as you can see by my videos). The first thing that comes to mind is the quick composition of realistic lens flare effects that are Z-space and obstacle accurate. Let me know where I can see the script. Thanks!

still working on the gui and the multi layer (multi scenes) support but as for the code:
heres the quick script with no gui, means you cant stop the service for not until you close the blend file:
Please note that the cache file here is for linux and auto saves in /tmp/ folder
if you use windows or if you want to change the directory of the cache file you have to change it in both of the places.
then you will need to create a new node and locate the file, from here everything is automated and rerenders every frame change.

Since im working on it just for 3 days its still under construction and i will add much more support in the near future, i will also post a tutorial of getting started

just paste in in blender text editor and run the script:

Hey this is great! Can’t wait to see what you do with it. Be sure to get the word out on this. If you get it working well, I would be more than happy to crank out a few demo tutorials and get some exposure for you.

The script certainly works well at bringing the OpenGL output into the compositor… but it doesn’t seem to recognize the viewport and material settings (shadeless, glsl, only render, etc.). It just renders one mode of OpenGL including any selection lines and generic solid material shading. At least this is what it does on mine machine. Maybe I need to set my OpenGL render and material settings first and then run the script? Also, it seems to crash the SVN distribution of Blender, but works fine on the official release. I am using Linux Xubuntu/Ubuntu Studio.

First of all thank you for the exposure thing, i would be glad if you did that.
But first thing first :slight_smile:
As for the problem heres the 2 steps solution (for now, working on doing it permanent in addition to the other changes):

  1. for now you will have to have a window of the 3D view open all the time, so just open a window with minimal size of the viewport, with glsl textured.
  2. for making everything disappear just cehck the render only button next to the viewport.

hope it helped for now.

the beta version will include much more features:

  1. force glsl textured and render only.
  2. multi layer support (which means it will render the specifit frame in every desired scene in the blend file).
  3. hopefully a node auto generator for each scene you have selected.
  4. obviously a GUI.

Any suggestions of features i forgot?

So yeah its kind of what you said!
About crashing on svn its weird…
i ran it on several computers today with ubuntu and windows 7 some with official and some from graphicall and i couldnt notice any problem.

Again ive very new to scripting, i have a post production studio and im trying to improve our internal pipeline so im starting with whats bugging me the most :slight_smile:

EYBTM this is great news, I’m really looking forward to the script

Wow that would be great!
Im gonna handle look for a way to do it, immediately when we are done with the script:

Just an update:

  1. The cache file works for active scene as you know.
  2. My wonderful cto made another script that moves on each timeline of each scene to the active frame in the active scene.

the combination of these should render each frame of each scene to a cache file but for some reason, for now it crashes.

@niverik2k: Bashi just replied here with a link to some code that allows fragment shaders to be installed in the viewport. Yeah!
This was the goal of RE:Vis, but I had to run everything through the BGE to get GLSL output.