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
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Through the Looking Glass

Unread postby squeen » Mon Oct 01, 2007 6:48 am

I've was working on our in-house scene graph library last week. We weren't getting very good surface reflection up close with Cube maps, so I justed added a planar reflection render-to-texture (FBO) option. So far so good, but I'm still wrestling with reflecting all the light sources (and shadowmaps!). Still kinda cool. Runs real-time (2 lights, 2 reflection surfaces updated each frame) at around 30 fps with fragment lighting and 5x5 PCF shadows in a pixel shader (Quadro FX 5600). Gonna take a bit of wrangling to get it working on the Onxy.
Attachments
mirrors.png

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8041
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Re: Through the Looking Glass

Unread postby nekonoko » Mon Oct 01, 2007 8:31 am

Nice work! Will be interesting to see how it does on the Onyx :)
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

User avatar
dj
Posts: 326
Joined: Tue Nov 01, 2005 11:35 am
Location: california

Re: Through the Looking Glass

Unread postby dj » Mon Oct 01, 2007 9:26 am

squeen wrote:so I justed added a planar reflection render-to-texture (FBO) option.


Cool; I just started learning about FBOs last week and was nicely surprised how much easier they are to use than p-buffers. I don't suppose IRIX has any support for them?

squeen wrote:Gonna take a bit of wrangling to get it working on the Onxy.


Wasn't the traditional OpenGL method to use the stencil buffer and draw the scene and reflection separately?

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

Re: Through the Looking Glass

Unread postby Oskar45 » Mon Oct 01, 2007 11:06 am

squeen wrote:I've was working on our in-house scene graph library last week. We weren't getting very good surface reflection up close with Cube maps, so I justed added a planar reflection render-to-texture (FBO) option. So far so good, but I'm still wrestling with reflecting all the light sources (and shadowmaps!).

No idea whether you could use it - but take a look at http://www.radiance-online.org/ anyhow - might just be the thing you are after.
If man would have been created out of the rib of a woman - how different would the world be?

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 01, 2007 12:08 pm

The Onyx will only have pbuffers and will suffer the hit of reading back (copying) to texture. Fortunately, IR is still very fast with pixel read. We'll see!

I've looked at Radiance a bunch of times, but we are going for hardware accelerated (real-time). Also, I have an obsession for writing my own applications as part of the learning process.

It's been a crappy month at work. Thanks for letting me share one of the lighter moments.

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8041
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Re: Through the Looking Glass

Unread postby nekonoko » Mon Oct 01, 2007 12:13 pm

squeen wrote:It's been a crappy month at work. Thanks for letting me share one of the lighter moments.


And thank you for sharing - I enjoy these peeks at your various graphics projects.
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

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

Re: Through the Looking Glass

Unread postby Oskar45 » Mon Oct 01, 2007 12:32 pm

squeen wrote:I've looked at Radiance a bunch of times, but we are going for hardware accelerated (real-time). Also, I have an obsession for writing my own applications as part of the learning process.

Taken. But does that mean you did alot of Radiance scripting before?
If man would have been created out of the rib of a woman - how different would the world be?

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 » Wed Oct 03, 2007 6:23 am

Hey, that looks really nice. If you can limit your scenario so it fits, it will be a good solution.

For all others only realtime raytracing will be the solution. But the requirements to code it yourself are completely different:

- SIMD coding (adieu readability)
- acceleration structures (balance between updatebility, memory usage and speed)
- fast materials (phong is easy, texture filtering sucks)
- reading and understanding all newest papers on the net (raytracing is still a very hot research topic)
- performant multithreading
- dealing with jerky compilers (all of them suck, each one has his special areas where it sucks most)
- clustering (8 cores is simply not enough for a typical 1280x1024 resolution)

Matthias
Life is what happens while we are making other plans

User avatar
foetz
Moderator
Moderator
Posts: 5889
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: Through the Looking Glass

Unread postby foetz » Wed Oct 03, 2007 7:25 am

nekonoko wrote:Nice work! Will be interesting to see how it does on the Onyx :)


indeed, looking forward to see this as well :D
r-a-c.de

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

Re: Through the Looking Glass

Unread postby Oskar45 » Wed Oct 03, 2007 12:19 pm

Since there's nothing in the sample pic which couldn't be done with Radiance, I'd like to learn why you dismissed Radiance for your job.
If man would have been created out of the rib of a woman - how different would the world be?

dc_v01
Posts: 796
Joined: Fri Jul 29, 2005 3:38 pm
Location: Boston, MA

Re: Through the Looking Glass

Unread postby dc_v01 » Wed Oct 03, 2007 1:35 pm

Oskar45 wrote:Since there's nothing in the sample pic which couldn't be done with Radiance, I'd like to learn why you dismissed Radiance for your job.

I think he answered that - he didn't think Radiance would work real-time. After my quick glance at the site I didn't think it was really aimed at that either. But if you know someone running it at 30fps, that might be interesting to a lot of people. I didn't really see that in my look at their archives, but didn't try too hard either.

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

Re: Through the Looking Glass

Unread postby Oskar45 » Wed Oct 03, 2007 2:07 pm

dc_v01 wrote:
Oskar45 wrote:Since there's nothing in the sample pic which couldn't be done with Radiance, I'd like to learn why you dismissed Radiance for your job.
But if you know someone running it at 30fps, that might be interesting to a lot of people.

I myself can't answer that. The best way to find out about it would be to simply post to their mailing list. Greg Ward - the author of Radiance - is a quite helpful guy [I correspond with him occasionally since the first draft of his book], and I'm sure he would be more than willing to answer all concerns in this regard and supply hints for speeding up...
If man would have been created out of the rib of a woman - how different would the world be?

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 9:09 am

I thought about talking to Greg Ward regarding getting real physics based lighting modeling into our system.
Yes, my scene graph uses OpenGL so it's hardware rendering. Radiance (I think) is pure CPU software which would be many times slower. With the advent of shaders, GPU radiosity is becoming a reality. Brombear, alludes to all the sticky areas in his post above (but radiosity != ray trace as I understand the terms).

When I started I wanted real-time interaction (which we have). With the pressure to produce more physically accurate lighting results (i.e. exactly what will a digital video camera see in a given environment), its hard to keep the frame rate up. But that struggle is the essential fun and challenge of it all, right?

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.

Sometimes, something new and exciting pops out. Other times I just reinvent the wheel. Que Sera Sera. :)

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 10:36 am

You might be able to use Radiance to pre-compute the global illumination and make a bunch of ambient-light texture maps for your OpenGL render. Many video games use this technique; I think they call it "texture baking". The lighting is static but it looks quite realistic since you get bounce and more detailed shading.

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 11:29 am

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.

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)

hst.jpg
real-time sim visualization


Return to “SGI: Computer Graphics”

Who is online

Users browsing this forum: No registered users and 1 guest