Through the Looking Glass

3D/2D CGI and the tools used in their creation (Maya, Photoshop, Blender, GIMP, etc.).
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
dj
Posts: 326
Joined: Tue Nov 01, 2005 11:35 am
Location: california

Re: Through the Looking Glass

Unread postby dj » Thu Oct 04, 2007 11:49 am

squeen wrote:In GPU Gems 2 this is called "ambient occlusion" and though it's really a hack (i.e. ambient is a fake out for real radiosity) it's next on the list. If I did as you suggest, it would be better--use a true radiosity application for precomputed true diffuse.


Ambient-occlusion looks quite nice too; it's a cool hack.

I'm just thinking out loud, but I wonder if you can separate the lighting-bit of radiance from the rendering part... Tesselate your model and send that geometry plus light/material info to radiance, and have it give you back texture maps, or maybe even just vertex colors. That way you could have radiance do rough ambient shading, and opengl do the rasterization and texture-mapping.

Interesting trivia, I believe Id Software used an sgi origin for the texture-baking in one of the Quake games.

squeen wrote:Here's another screenshot from the real-time app. This scene runs at only at 6 fps. (Does not have the new planar reflection maps in it yet, just bump maps, dynamic cube maps and shadow maps)


Very cool; are the stars accurate? :)

What's the limiting factory, geometry or shading?

User avatar
Oskar45
Posts: 2146
Joined: Mon Dec 05, 2005 2:35 am
Location: Vienna, Austria

Re: Through the Looking Glass

Unread postby Oskar45 » Thu Oct 04, 2007 11:53 am

squeen wrote:Part of my aversion to Radiance is not it's capabilities. I have a pathological need to write my own software as a means of learning (and controlling) the intricacies of a problem.

No cargo cult intended - I'm not defending Radiance in any way (although I like it very much). But I believe you can achieve quite a lot via scripting there (might not be what you want, though - check the book). However, I don't get your "pathological need" here. Are you implying you would rather write everything from scratch yourself? In that case - why don't you go over the source and change to your whimsy?
About 40% of Americans deny evolution. Sad.

User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Re: Through the Looking Glass

Unread postby squeen » Thu Oct 04, 2007 12:18 pm

Oskar45 wrote:Are you implying you would rather write everything from scratch yourself?

Yes. But I'd cheat and code the math from someone else's tech paper--only bothering to rederive it (following their lead, of course) if I've gotten so confused I can't get my code working. :)
In that case - why don't you go over the source and change to your whimsy?

Too easy to cheat and treat sections of the code like a black box. No learning for me without stumbling head first into those proverbial brick wall.

Really, I'm quite a pigheaded fool.

User avatar
Oskar45
Posts: 2146
Joined: Mon Dec 05, 2005 2:35 am
Location: Vienna, Austria

Re: Through the Looking Glass

Unread postby Oskar45 » Thu Oct 04, 2007 12:33 pm

squeen wrote:
Oskar45 wrote: In that case - why don't you go over the source and change to your whimsy?

Too easy to cheat and treat sections of the code like a black box. No learning for me without stumbling head first into those proverbial brick wall.

I wouldn't consider changing the Radiance source as "cheating" but rather as "improving". Maybe Greg Ward would like your stuff?

[edit]Besides, while I don't question your coding abilities - writing something similiar to Radiance incorporating your wishes from scratch and single-handed seems to me a rather formidable task...[/edit]
About 40% of Americans deny evolution. Sad.

Brombear
Posts: 786
Joined: Sun Oct 05, 2003 8:42 am
Location: Frankfurt (Rhein-Main Area) / Germany
Contact:

Re: Through the Looking Glass

Unread postby Brombear » Thu Oct 04, 2007 11:29 pm

squeen wrote: Brombear, alludes to all the sticky areas in his post above (but radiosity != ray trace as I understand the terms).


The difference between radiosity and raytracing can be expressed easily, only with raytracing you can get real reflections while you need radiosity to get soft shadows. What we are doing is some kind of highly tweaked ao technique, but stay warned, doing it right AND fast is really really tricky. We took about more than one man-year to get where we are now and the coder doing it is a very special pro.

Here are some results:


In the end if you need real imagery there's no way around raytracing in combination with gi techniques but the complexity goes way beyond what a typical 8-core workstation can handle in realtime (especially if you need high resolution, maybe stereo or antialiasing). But well this is pure fun since this is still research and there are so many unknown tricks.

Matthias
Last edited by Brombear on Sat Jun 06, 2009 11:48 pm, edited 1 time in total.
Life is what happens while we are making other plans

User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Re: Through the Looking Glass

Unread postby squeen » Fri Oct 05, 2007 2:51 am

@Brombear: phenomenal! The headlights (and paint!) alone must have taken a huge effort. Cook-Torrance BDRF in the shader?

@dj: Stars are from a relatively small catalog (46K) and the geometry alone = 60+ FPS. With 100% fragment phong lighting shaders ~30 FSP, with multi-pass for shadows and env maps = so-you-thought-you-could-have-everything-and-real-time-too-you-dumbass FPS.

Brombear
Posts: 786
Joined: Sun Oct 05, 2003 8:42 am
Location: Frankfurt (Rhein-Main Area) / Germany
Contact:

Re: Through the Looking Glass

Unread postby Brombear » Fri Oct 05, 2007 3:35 am

@Squeen Thanx for your kind words. Sorry I am not sure, but I don't think, its hard to describe metallic effects with a simple BRDF. You would need some kind of BTF stuff, but this is currently no topic.

How many light sources do you simulate within your shader ? Did you profile them ? You can gain a lot of speed if the shader code is to the absolute minimum and has no conditionals.

Matthias
Life is what happens while we are making other plans

User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Re: Through the Looking Glass

Unread postby squeen » Fri Oct 05, 2007 4:18 am

Brombear wrote:How many light sources do you simulate within your shader ? Did you profile them ? You can gain a lot of speed if the shader code is to the absolute minimum and has no conditionals.


I #define the number of lights to loop over at the top of the fragment shader code. Going all the way up to 8 (I actually have 10 vehicle lights I need for one scenario, but I realized that via uniforms I can go past the OpenGL 8 light maximum) greatly increases the shader's compile time and slows the whole mess down--even if I have conditionals (uniforms) to disable some of them. I'm thinking of adding a shader preprocessor that handles some specialized macro substitution (like the lights) and also has a "search path" for #includes. But, my-oh-my is the 5600 a nice board! It's a huge improvement from the 4500/5550 and also significantly faster than the 4600 (33%+memory). Still...I'm looking at a couple Quadro Plex and using peer-to-peer PBO's to pipeline some of the multi-pass (especially for the CAVE!).

Do you ever framelock (w/ stereo) multiple board in a single machine (sans house sync)? I'm having a weird problem with the CAVE (2 GPUS, 2 machines = 4 walls). The 2nd GPU in the machine with the framelock "server" won't get timing sync and drifts, but the 2 other GPU's in a separate system framelock just fine. NVIDIA has been very helpful, but I'm too busy right now to debug. Just wondering if you ever used a similar setup.

User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Re: Through the Looking Glass

Unread postby squeen » Fri Oct 05, 2007 4:54 am

Oskar45 wrote:[edit]Besides, while I don't question your coding abilities - writing something similiar to Radiance incorporating your wishes from scratch and single-handed seems to me a rather formidable task...[/edit]


Please don't misconstrue this as conceit, I comment on your reply only because I myself have been shocked at how easy it is to trace someone's foot steps. Once the path is clear, charging up the rear is significantly less work that one might expect. (Recall the adage about 80% of the task taking only 20% of the time--but those last few nuances are a bitch!). I have (with the help of usually one other partner) functionally rewritten--while twisting to suit our own needs--the following mainstream applications over the past 4 years:

MATLAB & Simulink
IRIX shared memory arenas
OpenGL Performer
CAVElib (prelim)
Maya (very prelim)

It has been neither a full time effort or the main thrust of my work, but just a make-what-we-need-when-we-need-it effort. At first, I often wondered what kind of glutton for punishment I was, but as time progressed and our successes could be used as a spring board (foundation) for other work, I can now look back and feel that all the effort was rewarding. The main payoff is what I learned in the process and how it enables me to understand other problems that come along in a new way.

While its not for everyone, I strongly encourage becoming a developer over being an end-user. The mountain is often not as high as it seems from the valley, and the air up there is so much cleaner.

Lastly, I was neither trained nor do I currently consider myself a "programmer"--just an engineer with projects, deadlines and a love of HPC. You can do it too!

<end rant>:)

Brombear
Posts: 786
Joined: Sun Oct 05, 2003 8:42 am
Location: Frankfurt (Rhein-Main Area) / Germany
Contact:

Re: Through the Looking Glass

Unread postby Brombear » Fri Oct 05, 2007 5:33 am

squeen wrote:I #define the number of lights to loop over at the top of the fragment shader code. Going all the way up to 8 (I actually have 10 vehicle lights I need for one scenario, but I realized that via uniforms I can go past the OpenGL 8 light maximum) greatly increases the shader's compile time and slows the whole mess down--even if I have conditionals (uniforms) to disable some of them. I'm thinking of adding a shader preprocessor that handles some specialized macro substitution (like the lights) and also has a "search path" for #includes. But, my-oh-my is the 5600 a nice board! It's a huge improvement from the 4500/5550 and also significantly faster than the 4600 (33%+memory). Still...I'm looking at a couple Quadro Plex and using peer-to-peer PBO's to pipeline some of the multi-pass (especially for the CAVE!).


Shader preprocessor sounds like a good solution. It wouldn't be needed if linking shader fragments would work without recompiling them by the driver (which sucks from a performance point of view ... after starting we have a delay of over 30 seconds simply for compiling shader code) ... we hope that it will get better with OpenGL 3.0. Our SLI advantage currently is approx 30% and it is tough to go beyond since you need help from NVIDIA (there are so many undocumented combinations of GL states that disable SLI). NVIDIA is pretty much busy these days, I am sure they still suffer from the Vista fiasco and there increasing product lines. But the G80 line really rocks, its a huge step over the G70.

squeen wrote:Do you ever framelock (w/ stereo) multiple board in a single machine (sans house sync)? I'm having a weird problem with the CAVE (2 GPUS, 2 machines = 4 walls). The 2nd GPU in the machine with the framelock "server" won't get timing sync and drifts, but the 2 other GPU's in a separate system framelock just fine. NVIDIA has been very helpful, but I'm too busy right now to debug. Just wondering if you ever used a similar setup.


Nope, one of our customers has a L-Projection (1 front wall with 1 side wall) but I haven't heard anything bad. If you are having issues I suspect driver anomalies, I remember hearing about syncing problems for a long time ... no matter what software the customer uses.

Matthias
Life is what happens while we are making other plans

User avatar
Oskar45
Posts: 2146
Joined: Mon Dec 05, 2005 2:35 am
Location: Vienna, Austria

Re: Through the Looking Glass

Unread postby Oskar45 » Fri Oct 05, 2007 11:53 am

squeen wrote:
Oskar45 wrote:[edit]Besides, while I don't question your coding abilities - writing something similiar to Radiance incorporating your wishes from scratch and single-handed seems to me a rather formidable task...[/edit]


Please don't misconstrue this as conceit, I comment on your reply only because I myself have been shocked at how easy it is to trace someone's foot steps.

Taken. That's fine with me. As Larry Wall uses to say, "You are free to do the Right Thing, however you care to define it." Again, I'm not a religious defender of Radiance, I simply like it. And for me writing scripts for it is plainly fun. But your mileage obviously varies. As it should be. But, of course, I'm not sure that - whatever you develop - I'd trace your foot steps :lol:

squeen wrote:I have (with the help of usually one other partner) functionally rewritten--while twisting to suit our own needs--the following mainstream applications over the past 4 years: Maya (very prelim)

How did you get access to Maya's source?
About 40% of Americans deny evolution. Sad.

User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Re: Through the Looking Glass

Unread postby squeen » Fri Oct 05, 2007 2:14 pm

How did you get access to Maya's source?


No access, just started from scratch.

User avatar
Oskar45
Posts: 2146
Joined: Mon Dec 05, 2005 2:35 am
Location: Vienna, Austria

Re: Through the Looking Glass

Unread postby Oskar45 » Sat Oct 06, 2007 7:33 am

squeen wrote:
How did you get access to Maya's source?


No access, just started from scratch.

Wow. Rewriting Maya from scratch single-handed - I bow before you. You must be a wizard, or at least a genius...care to teach lesser folks?
About 40% of Americans deny evolution. Sad.

User avatar
Oskar45
Posts: 2146
Joined: Mon Dec 05, 2005 2:35 am
Location: Vienna, Austria

Re: Through the Looking Glass

Unread postby Oskar45 » Sun Oct 07, 2007 10:26 am

@squeen: I apologize for having been sarcastic. But I still believe rewriting Maya from scratch isn't really as easy as you seem to imply :oops:
About 40% of Americans deny evolution. Sad.

User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Re: Through the Looking Glass

Unread postby squeen » Mon Oct 08, 2007 3:21 am

Oskar45 wrote:Wow. Rewriting Maya from scratch single-handed - I bow before you. You must be a wizard, or at least a genius...care to teach lesser folks?


Please! My intent was not to brag--I have no basis to---but to encourage. What may seem to be an insurmountable task, is often less than what it appears to be (especially with software!). That's my only point. Perhaps I should have kept my personal "revelation" to myself rather than offend. Oh well... :)


Return to “SGI: Computer Graphics”

Who is online

Users browsing this forum: No registered users and 1 guest