Jump to content
mondi

OpenGL renderer

Recommended Posts

I miss the OpenGL ROP, there are just too many situations (in my work at least), where mantra is simply not an option. So I decided to write my own :).

It's been nice moving on from the game world where one strives to maintain high frame rates, to see what is possible with todays graphics hardware / shading languages.

I'll try to keep this topic updated if there's any interest.

post-4129-1225385850_thumb.jpg

post-4129-1225385859_thumb.jpg

Share this post


Link to post
Share on other sites
I miss the OpenGL ROP, there are just too many situations (in my work at least), where mantra is simply not an option. So I decided to write my own :).

It's been nice moving on from the game world where one strives to maintain high frame rates, to see what is possible with todays graphics hardware / shading languages.

I'll try to keep this topic updated if there's any interest.

post-4129-1225385850_thumb.jpg

post-4129-1225385859_thumb.jpg

I like the images.

Could you share some details what "I decided to write my own" means?

Share this post


Link to post
Share on other sites
I like the images.

Could you share some details what "I decided to write my own" means?

Sure thing, what you are seeing is the result of the rendering engine I recently started writing (C++ / OpenGL / GLSL) and a custom Houdini ROP, which feeds it with data.

Although it's a little slower than the old ROP( not the rendering part, but with as much geometry as exists in this scene, python/soho takes awhile to write out the intermediate files), I hope the quality makes up for that.

Does that help at all?

Share this post


Link to post
Share on other sites
Does that help at all?

It does.

If you don't mind: why have chosen to write your own instead going for a probably existing one?

Share this post


Link to post
Share on other sites
It does.

If you don't mind: why have chosen to write your own instead going for a probably existing one?

I'm taking a slightly (very) different approach to this project, that doesn't really fit in with a lot of the other rendering systems out there (mostly in the way data is passed around) which will give me quite a lot of interesting flexibility in the future. I'd really have had to rewrite a lot of the guts from scratch if I used another system, so writing my own seemed the natural choice. Plus it means that I'm not bound by any of the myriad licenses out there.

Share this post


Link to post
Share on other sites

An image a day - ish .. Gives me a reason keep at it

post-4129-1225499786_thumb.jpg

post-4129-1225500430_thumb.jpg

Edited by mondi

Share this post


Link to post
Share on other sites
An image a day - ish .. Gives me a reason keep at it

I love these images:) Very dark and moody.

Out of curiosity, I assumed you looked at the SOHO example backend to the python -based opengl renderer?

ie, $HFS/houdini/soho/OGL.py

Are you doing things that require C++?

Share this post


Link to post
Share on other sites

Hey Mondi,

Just out of curiousity, have you been part of the demoscene before? Just suspicious because of the subject/look of the images, the fact that you're coding the engine and also that you're Skandinavian (where it was so popular..still is).

I was contemplating the idea about a year ago to create some classic, demoscene look with Houdini, but try and push it to another level of complexity. Looks like you're on the right track with this, I will be curious how this ends up.

cheers,

Andras

Share this post


Link to post
Share on other sites
I love these images:) Very dark and moody.

Out of curiosity, I assumed you looked at the SOHO example backend to the python -based opengl renderer?

ie, $HFS/houdini/soho/OGL.py

Are you doing things that require C++?

Thanks!

OGL.py was definitely a starting point, some of the values I'm extracting are based on that. Currently though, the only python I'm using is the script to write a temporary scene description.

I will definitely look deeper into it in the future, although from what I can see now, there's a definite speed disparity between the two, so while I may use python to glue stuff together, I'm sure most of the internals will remain C++.

Hey Mondi,

Just out of curiousity, have you been part of the demoscene before? Just suspicious because of the subject/look of the images, the fact that you're coding the engine and also that you're Skandinavian (where it was so popular..still is).

I was contemplating the idea about a year ago to create some classic, demoscene look with Houdini, but try and push it to another level of complexity. Looks like you're on the right track with this, I will be curious how this ends up.

cheers,

Andras

No, but I'm pretty inspired by some of the stuff going on in the scene. Like you though, I'd really like to see where this can go without restrictions. My system may not run at 300 fps, but I'm leaving out a great deal of the compromises that most engines have to deal with( and it's still pretty fast :))

I'm a little stuck on some sorting issues right now ( trying to figure out a good way to render coincident transparent objects ), but as soon as that works itself out I'll post some new images.

M

Share this post


Link to post
Share on other sites
I'm a little stuck on some sorting issues right now ( trying to figure out a good way to render coincident transparent objects ), but as soon as that works itself out I'll post some new images.

You might want to consider "depth peeling".

Share this post


Link to post
Share on other sites
You might want to consider "depth peeling".

Yeah, that seems like the way to go - Found a nice little research paper from Microsoft which allows for multiple peeled layers in a single pass. I'll be working on that once I've finished this:

post-4129-1225751406_thumb.jpg

It's a very quick first pass, none of the pretty stuff( still figuring out the HDK ).

It seems the whole thing can be pretty simply integrated directly into the Houdini viewport

Share this post


Link to post
Share on other sites
It's a very quick first pass, none of the pretty stuff( still figuring out the HDK ).

maybe OT:

In mytest I didn't get a non 0 or 1 transparency in a OGL2 shader to work ... but this looks like it's possible ... or is this something completely different?

Share this post


Link to post
Share on other sites
maybe OT:

In mytest I didn't get a non 0 or 1 transparency in a OGL2 shader to work ... but this looks like it's possible ... or is this something completely different?

Different - I'm completely replacing the viewport renderer( well, at least for poly quads at the moment :) ). Unfortunately, the built in OGL2 stuff is broken in OSX so I can't even test that path.

Share this post


Link to post
Share on other sites

Well, if you guys encounter bugs, be sure to log it using the Support ? Submit H9 Bugs page on the sidefx.com website.

As for transparency, it's a known problem, whose workaround is to call your variable "ogl_alpha". If that parameter doesn't exist, then the viewer won't recognize transparency at all.

Share this post


Link to post
Share on other sites
Well, if you guys encounter bugs, be sure to log it using the Support ? Submit H9 Bugs page on the sidefx.com website.

As for transparency, it's a known problem, whose workaround is to call your variable "ogl_alpha". If that parameter doesn't exist, then the viewer won't recognize transparency at all.

I've had the bug submitted for a couple of months now. It looks like most (all?) of the OSX stuff gets assigned to the same guy though, so he's probably pretty busy :).

Share this post


Link to post
Share on other sites
I've had the bug submitted for a couple of months now. It looks like most (all?) of the OSX stuff gets assigned to the same guy though, so he's probably pretty busy :).

And after a couple of days, it looks like the bug goes deeper than I expected. Oh well, more work on the renderer.

Share this post


Link to post
Share on other sites

To end a late night:

Most things seem to be working out just fine with the viewport integration. However, I'm a little stumped on the frequency of viewport refreshes.

As far as I can tell, there's pretty heavy use of display lists, or something similar in the drawing of the viewport. This is fine for anything that directly affects the GU_Detail (materials, topology changes etc), but I cant seem to get a display refresh on changes to light parameters.

Is there any way to force a refresh on light parameter changes? - Or for that matter, any change not directly connected to the gdp being sent to the render hook?

M

Share this post


Link to post
Share on other sites

I don't think there's a hook in the HDK to do that right now. My suggestion is to set the environment variable, HOUDINI_DISABLE_DISPLAYLIST to 1.

Share this post


Link to post
Share on other sites
I don't think there's a hook in the HDK to do that right now. My suggestion is to set the environment variable, HOUDINI_DISABLE_DISPLAYLIST to 1.

Worked perfectly, thanks!

Share this post


Link to post
Share on other sites

Lighting, materials, geometry, texturing - There's some buffer stuff to be fixed before the full range lighting / post fx / etc come online, but I thought I'd post a progress shot:

post-4129-1226525606_thumb.jpg

Edited by mondi

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

×