Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Tue Sep 02, 2014 1:18 am

All times are UTC - 8 hours


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 110 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next
Author Message
Unread postPosted: Thu Oct 04, 2007 10:49 am 
Offline
User avatar

Joined: Tue Nov 01, 2005 11:35 am
Posts: 326
Location: california
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?


Top
 Profile  
 
Unread postPosted: Thu Oct 04, 2007 10:53 am 
Offline
User avatar

Joined: Mon Dec 05, 2005 2:35 am
Posts: 2093
Location: Vienna, Austria
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?

_________________
"Reality is a Hallucination caused by lack of Alcohol"


Top
 Profile  
 
Unread postPosted: Thu Oct 04, 2007 11:18 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
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. :)
Quote:
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.


Top
 Profile  
 
Unread postPosted: Thu Oct 04, 2007 11:33 am 
Offline
User avatar

Joined: Mon Dec 05, 2005 2:35 am
Posts: 2093
Location: Vienna, Austria
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]

_________________
"Reality is a Hallucination caused by lack of Alcohol"


Top
 Profile  
 
Unread postPosted: Thu Oct 04, 2007 10:29 pm 
Offline

Joined: Sun Oct 05, 2003 7:42 am
Posts: 786
Location: Frankfurt (Rhein-Main Area) / Germany
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

_________________
Life is what happens while we are making other plans


Last edited by Brombear on Sat Jun 06, 2009 10:48 pm, edited 1 time in total.

Top
 Profile  
 
Unread postPosted: Fri Oct 05, 2007 1:51 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
@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.


Top
 Profile  
 
Unread postPosted: Fri Oct 05, 2007 2:35 am 
Offline

Joined: Sun Oct 05, 2003 7:42 am
Posts: 786
Location: Frankfurt (Rhein-Main Area) / Germany
@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


Top
 Profile  
 
Unread postPosted: Fri Oct 05, 2007 3:18 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
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.


Top
 Profile  
 
Unread postPosted: Fri Oct 05, 2007 3:54 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
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>:)


Top
 Profile  
 
Unread postPosted: Fri Oct 05, 2007 4:33 am 
Offline

Joined: Sun Oct 05, 2003 7:42 am
Posts: 786
Location: Frankfurt (Rhein-Main Area) / Germany
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


Top
 Profile  
 
Unread postPosted: Fri Oct 05, 2007 10:53 am 
Offline
User avatar

Joined: Mon Dec 05, 2005 2:35 am
Posts: 2093
Location: Vienna, Austria
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?

_________________
"Reality is a Hallucination caused by lack of Alcohol"


Top
 Profile  
 
Unread postPosted: Fri Oct 05, 2007 1:14 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
Quote:
How did you get access to Maya's source?


No access, just started from scratch.


Top
 Profile  
 
Unread postPosted: Sat Oct 06, 2007 6:33 am 
Offline
User avatar

Joined: Mon Dec 05, 2005 2:35 am
Posts: 2093
Location: Vienna, Austria
squeen wrote:
Quote:
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?

_________________
"Reality is a Hallucination caused by lack of Alcohol"


Top
 Profile  
 
Unread postPosted: Sun Oct 07, 2007 9:26 am 
Offline
User avatar

Joined: Mon Dec 05, 2005 2:35 am
Posts: 2093
Location: Vienna, Austria
@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:

_________________
"Reality is a Hallucination caused by lack of Alcohol"


Top
 Profile  
 
Unread postPosted: Mon Oct 08, 2007 2:21 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
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... :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 110 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group