Help - Search - Members - Calendar
Full Version: Cornell Box with Legos
Hash, Inc. Forums > Technical Direction and Development (Learning Animation:Master) > A:M Rendering, Compositing and Special Effects > Texturing, Lighting and Effects > Lighting Effects
MikeSanderson
Here is a test render of the Cornell Box with an old v5 Lego model of mine.

Went thru Yves GREAT tutorial!!

........and I used the "CalcSurface" PlugIn that Steffen Gross provided ....Thanks!

Also used the "Calculate Radiosity" (RMB over Chor)

Thanks for all the settings provided by everyone.
MikeSanderson
Here are my settings......
ypoissant
2 observations:

1) you are using pure RGB colors on your pieces. Colors where at least one of the RGB channels are 0.

When using radiosity, this is to avoid absolutely. Those pure color never exist in the real world and whith RGB rendering models, this will produce light cancellations and saturation. All the channels should have at least 5% values in them. A little bit more is even better.

Also, avoid RGB channels values of 255 or 100%. This too doesn't exist in the real world.

For example, here are the RGB values (from 0 to 255) for some of the Macbeth color checker colors :
Yellow : R:194, G:148, B:9
Red: R:84, G:7, B:11
Blue: R:9, G:11, B:76
Green: R:33, G:76, B:19
Gray 50%: R:50, G:50, B:50

(NOTE: Those are reflectance RGB values suitable for 3D rendering. Not to be confused with some published RGB values on the Web which are for color matching on the display.)

2) A sampling area of 2000 means 2cm. That seems to be very large considering the small details of your lego blocs. You should either increase the number of photons or decrease the photon samples in order to get a smaller sampling area.
MikeSanderson
Thanks Yves!

I applied the color changes to the Legos & then decreased the photon samples.

I set a render going before I left for work, so I''ll post the results later this evening.

Thanks for your input on this!
MattWBradbury
I was checking out the Macbeth color charts, and found different RGB values than what you've posted. Is there any reason for the change? Here's the site that I found. Macbeth Color Checker I've tried some radiosity, but I'm using an older version of the programe. Back when the only thing there was was a scale for geometry, and pixels per patch (min and max). ph34r.gif
ypoissant
When you apply a texture or define a surface color for an object that is to be rendered in a 3D application, you want the reflectance values. Not the reproduction values.

There are several different RGB values for the Macbeth color chart published on the Web.

That one from Macbeth is supplied so that you can display the color checker on your computer screen. But that is an aberration because no two computer monitors are calibrated the same way except in highly controlled graphics departments where they calibrate their graphics workstations.

This research document shows you that depending on the viewing environment you choose, the RGB values will be different. Here is another document with similar results. That is because each viewing environment tries to compensate with the CRT characteristics by adding a gamma correction.

Some people have published RGB values as captured by their scanners. But here again, there is no information about what kind of Gamma correction the scanner is applying on the scanned colors. Most current capture devices apply a gamma of 2.2 to comply with the sRGB standard. That includes scanners and digital cameras.

When designing textures for 3D objects, you don't want any gamma correction or other normalizations. You want the raw reflectance values. That is because you are going to simulate the effect of illumination on your object. You want that simulation to reproduce as closely as possible the actual look of your object as if it was the real object.

The full spectrum reflectance data for the full Macbeth checker have been published in Principles of Digital Image Synthesis. THey can be converted to RGB. But this is not what I did. I took the computed RGB values named "Adobe" in the above mentioned pdf document and knowing the gamma correction that was applied, I de-gamma corrected it. Then I verified the RGB values with the Macbeth gray scale reflectance values to make sure my correction looked valid. That should be pretty close to the actual non-corrected RGB reflectance equivalents.

The full Macbeth RGB reflectance values would be:
Dark Skin : 38, 21, 14
Light Skin : 124, 79, 60
Blue Sky : 36, 51, 87
Foliage : 28, 39, 14
Blue Flower : 59, 57, 113
Bluish Green : 62, 133, 107
Orange : 143, 53, 8
Purplish Blue : 20, 27, 97
Moderate Red : 109, 25, 32
Purple : 23, 11, 38
Yellow Green : 102, 130, 16
Orange Yellow : 168, 94, 10
Blue : 9, 11, 76
Green : 33, 76, 19
Red : 84, 7, 11
Yellow : 194, 148, 9
Magenta : 100, 23, 77
Cyan : 12, 63, 98
White 9,5 (.05) : 229, 229, 229
Neutral 8 (.23) : 151, 151, 151
Neutral 6.5 (.44) : 93, 93, 93
Neutral 5 (.70) : 50, 50, 50
Neutral 3.5 (1.05) : 23, 23, 23
Black 2 (1.50) : 8, 8, 8

Concerning radiosity and A:M, There have been a huge change in version 10.5 where the radiosity have been rewritten with a Photon Mapping engine. You will not bew able to apply the advices you will find here with A:M v8.5. And you will not be able to get the same render either. If Radiosity is what is interesting you, then you should consider upgrading to v12. There have been important but subtle improvements made to v12 Photon Mapping. The most important change is that it now handle the photons first hit contribution to the radiosity solution.
MattWBradbury
So basically imaging devices add extra luminosity to color to make it appear how our eyes would see it. By decreasing the luminosity of the texture color, as well as increasing the gama by 2.2 when finally rendered, it acts as an imaging device would if used in the real world.
MikeSanderson
I altered the colors, but my reflectivity went Over the Top on this one. Arrrrrgh!
So i'm cutting it back from 40% to 20%

http://www.mikesanderson.net/am/legos-c4x.jpg

I'm gonna take a closer look at the other colors you just posted too.
ypoissant
QUOTE (MattWBradbury @ Sep 19 2005, 08:01 PM)
So basically imaging devices add extra luminosity to color to make it appear how our eyes would see it.

The gamma correction is to compensate for the intrinsic non-linear response of CRTs. Gamma correction is an intricate topic and is way much more complex than I can what I can explain here in a couple sentences.

This said, the numbers doesn't even represent the same thing. RGB reflectance represent the percentage of the received light that is being reflected off a surface while RGB reproduction values represent the percentage of voltage that must be applied on the cathode of a CRT to make the reproduced color look the same as in the real world.

The voltage percentage must be corrected for any electronic or algorithmic correction that is added to the CRT driver while the reflectance values are always raw.

Reflectance values are a property of the object's surface and are independent of the dynamic range of the lights in the scene. If you increase the light intensities in the scene, you will get different final RGB values in the rendered image. You don't need to modify the object surface RGB reflectance values at all. While reproduction RGB values are tied to the limited dynamic range of CRTs. If you want to decrease or decrease the perceived color intensity, you have to modify the RGB values.

QUOTE
By decreasing the luminosity of the texture color,


Texture color is a concept that is valid when you are using a paint application to paint your textures because you have to cope with the CRT intrinsic dynamic range and the limited 8bits per channel image file formats, and you atempt to visually reproduce the colors that you see in reality. The resulting texture map is only a very rough and way overbright approximation of the actual texture reflectance that would be measured on the actual object.

Most 3D artists tends to use too bright textures thus limiting the dynamic range of their scenes. It is better to use lower RGB values for the surface colors and use brighter lights to get a wider margin with the final dynamic range of the rendered picture.

But there is also an historical reason for this. 8bits per channel bitmaps doesn't allow for a fine dynamic range resolution in the lowest values. For instance, if one wants to use values between 0 and 7, then this allows for only 8 discrete tints values. Not very good for smooth gradients in bitmaps.

The ImageIO plugins that are now shipped with A:M v12 can read 16bits bitmaps in TGA or PNG files as well as floats and small-floats bitmaps in OpenEXR files. Those extra color resolution (quasi-infinite color resolution in the case of OpenEXR) should allow the artists to design bitmaps with low color values and still have more than acceptable dynamic ranges.

But the painting pipeline should aslo be adjusted accordingly. That is the display correction should be set to a gamma of 2.2 but the file should store un-gamma corrected values. This is done by selecting the proper color profiles for the display and the file save. That, in itself, would be a topic for a whole tutorial.

QUOTE
as well as increasing the gama by 2.2 when finally rendered, it acts as an imaging device would if used in the real world.


Gamma correction is there to compensate for the CRTs that are used to display digital pictures. The assumption for imaging devices is that the image will be mostly displayed on CRTs. And the vast majority of the CRT installed in the world are on PC computers which don't have any gamnma corrections in their display drivers and circuitries. This is the reason why the sRGB standard includes a gamma of about 2.2 (the actual sRGB gamma correction specification is not a pure power function but it averages to approximately 2.2).

Scanners and Digital cameras sensors are inherently linear capture devices. But since most users of those devices would not know how to do the gamma correction it was decided that this correction step would be executed directly by the capture device.

Render engines are also linear in their calculation of illumination. That includes A:M render engine. Thus, in order to properly display rendered images on a CRT (like on a web page) the rendered image should also be gamma corrected.

In A:M, unless the rendered image must go through post-processing steps on an external application, it is sugested that the gamma correction be done with A:M Gamma post-effect plugin so that the full color dynamic range is available when doing that correction.
ypoissant
QUOTE (MikeSanderson @ Sep 20 2005, 09:15 AM)
So i'm cutting it back from 40% to 20%

My guess is that 20% reflectivity is still going to be quite high. The reflectivity should be barely unnoticeable. Like 5% or 10% at most.
MattWBradbury
If you look at the ground, the shadows don't look natural. Is there a way to just have the ambience on the light patch cast photons from random angles and get ride of the light rig entirely like in LightWave?
MikeSanderson
QUOTE
My guess is that 20% reflectivity is still going to be quite high. The reflectivity should be barely unnoticeable. Like 5% or 10% at most.

Well, the 20% one is rendering at home now. .....so I'll try a 10% after that then a 5% if that is still too much. .... at least that will be an interesting spread for the study.

Yves, any other observations, or do we need to get the reflectivity riight first?
ypoissant
QUOTE (MattWBradbury @ Sep 20 2005, 12:19 PM)
If you look at the ground, the shadows don't look natural.

This could be worked by adjusting different properties on the lights and in the radiosity.

QUOTE
Is there a way to just have the ambience on the light patch cast photons from random angles


It already does. This is not what is causing those shadows artifacts.
ypoissant
QUOTE (MikeSanderson @ Sep 20 2005, 01:37 PM)
Yves, any other observations, or do we need to get the reflectivity riight first?

It really depends on what is the final result you want to achieve.

You can try different radiosity settings in addition to the reflectivity. For instance, you could add some jittering to the final gathering. This would trade the busy patterns we see everywhere with some noise.

Generally, better render quality will require longer render times because of increased number of photons and increased number of final gathering samples. Of those two, the fional gathering samples are the most expensive..
MikeSanderson
Here is the one at 20% Reflectivity on the sufaces.
(also it is only 3 Passes)

I showed it to a leading Lego expert (my son) & decided the next render would have suface reflectivity set at 5%.
ypoissant
Three properties to watch for:

"Ambiance": If your lego pieces were modeled in an old A:M version like v8.5 and earlier, then there is a good chance that the ambiance is set to 20%. All surfaces in a radiosity scene should have their ambiance set to 0%.

"Reflective blend": Set the reflective blend quite high like 75% or more so the reflected images are not so much "in your face". This way, you should be able to keep a reflectivity as high as 10% or even 20% without it being distracting.

"Reflection filter": Set it quite high too, like 50%, so the reflected images take on the color of the blocs.

I would also suggest that you find your reflectivity properties in a scene that does not require Photon Mapping first. Setup a few lights that will light your scene from several angles from inside the box and turn OFF radiosity. THis way, you will have a better feel for the different reflectivity setings without having to wait for a full day. Then, when you are satisfied with the reflectivity look, you can turn radiosity back ON and do a render.

P.S.: I just did a quick experiment and here are the values that give me the best plastic bloc look:
I picked colors from the Macbeth chart.
Ambiance = 0%
Reflectivity = 5%
Reflection Filter = 80%
Reflective Blend = 100%
MattWBradbury
How many ray casts do you have for each light? Would 1 light with a bunch of ray casts make it look better? Might cut down on the busy look, and the radiosity time.
ypoissant
QUOTE (MattWBradbury @ Sep 21 2005, 12:09 AM)
Would 1 light with a bunch of ray casts make it look better?

No it wouldn't make it look better. Beside, the Cornel box is a universal radiosity render test scene. The light array was designed to closely match the specs.

QUOTE
Might cut down on the busy look, and the radiosity time.


No. Not really, It would cut on render time a little but not significantly. By far, the most important property that will affect both render time and busyness is the Final Gathering properties: number of final gathering samples and jittering.

With radiosity, anyway, you have to find your personal comfortable spot between render time and quality. Quality always requires more render times.
MikeSanderson
Here is the one at 10% Reflectivity on the surfaces.
( 9 Passes)

Photons Cast: 10000
Sample Area: 2050
Photon Samples: 300
Intensity 100%
Max Bounces: 15
Caustics: OFF

Final Gathering: ON
Samples: 200

I did drop my "Ambiance" to "0"

I'll try & add those other settings later.
ypoissant
Here is a test I did to try to find the above mentioned surface properties to get good looking plastic:

Ambiance = 0%
Reflectivity = 5%
Reflection Filter = 80%
Reflective Blend = 100%

Of course, the render was gamma corrected to 2.2.

The radiosity properties were:
Photon cast : 100000
Sample area : 250
Photon Samples : 100
Final Gathering Samples : 500
Jittering : 100%

It took 49min to render.
ypoissant
QUOTE (MikeSanderson @ Sep 21 2005, 08:54 AM)
I did drop my "Ambiance" to "0"

That's odd. It still look like the ambiance is set to some value on your legos. Did you try a render where you turn the lights to OFF without radiosity?
DanCBradbury
This is a pic of a 85,000,000 ray Radiosity Render to show just how it was back in 2000 with v8.5L. The radiosity calculation took 30 minutes on my comp and 1 minute to render with 32 ray cast Lights. But it still looks a bit off... Anyone know why maybe?
DanCBradbury
Does anyone know how to fix the noise pattern in the radiosity maps? Can you edit them yourself?
ypoissant
QUOTE (DanCBradbury @ Sep 22 2005, 12:08 AM)
Does anyone know how to fix the noise pattern in the radiosity maps?

With Monte-Carlo radiosity algorithms, the only way to reduce noise is to let them run as long as required to get rid of noise. There is no other way.

QUOTE
Can you edit them yourself?


Yes and no. They are normal TGA files. Just rename the file to TGA and you can edit it in Photoshop. However, the way the file is layed-out on a per patch basis, it is not really possible to do a good job at editing them. There will always be some visible seams.

QUOTE
it still looks a bit off... Anyone know why maybe?


Tweak the surfaces "radiosity" property until you get the correct result. It would help comparing if you used the standard specs with the Cornell box. In particular, your surface properties are probably way too bright.
MikeSanderson
QUOTE
That's odd. It still look like the ambiance is set to some value on your legos. Did you try a render where you turn the lights to OFF without radiosity?


You were right Yves there was "ambiance" ....I had not put in "0" but rather "Not Set",
so i guess it retained th old ambient value somehow. (maybe there was a glitch since the model was originally done in v5)

Here is that render.......
MikeSanderson
Here is the Render with lights back on & "ambiance" at "0" this time.
DanCBradbury
That looks pretty good Mike.

Should someone render a very detailed model with radiosity? And if so, what size should the maps be for each patch? I'm thinking about rendinging this (unfinished) car and was wondering if anyone could help me out or give me some advice. cool.gif
ypoissant
Now that is looking much better. Nice.
ypoissant
QUOTE (DanCBradbury @ Sep 22 2005, 11:56 AM)
That looks pretty good Mike.

Should someone render a very detailed model with radiosity? And if so, what size should the maps be for each patch? I'm thinking about rendinging this (unfinished) car and was wondering if anyone could help me out or give me some advice. cool.gif

The best advise I would give you if you are seriously interested in radiosity is to upgrade to v12. V8.5 is quite old and I don't think you will find anybody with radiosity experience from that version. I, for my part, can't help you there.

Also, I would suggest you start your own thread if you want to show us your work. That is a nice start for a car BTW.
MikeSanderson
Here is the Big One:

http://www.mikesanderson.net/am/legos-c10-9pass.jpg
(.......having trouble with upload)

9 Passes

Photons Cast: 10000
Sample Area: 1600
Photon Samples: 300
Intensity 100%
Max Bounces: 15
Caustics: OFF

Final Gathering: ON
Samples: 300

Surfaces:
Ambiance = 0%
Reflectivity = 5%
Reflection Filter = 80%
Reflective Blend = 100%

It took 3Hr & 5Min to render.
DanCBradbury
That's a pretty cool rendering. Looks like real legos. smile.gif

The front box has got some wierd streaks on it though... was that from the radiosity calculations, or the kelig lighting?
ypoissant
QUOTE(DanCBradbury @ Sep 23 2005, 02:41 PM) *

The front box has got some wierd streaks on it though... was that from the radiosity calculations, or the kelig lighting?


That is Final Gathering sampling artifacts. And there are also sampling artifacts on the lego blocs too. Final Gathering "Jittering" is there to take care of that.
MikeSanderson
Thanks Dan!

BTW: Yves....Where is that "Jittering" setting?
And since these are plastic do you think they would have just a bit of Translucence?
....... or do you think that would take me right back to where I was?
DanCBradbury
Lego's have a slight bit of translucencse... but they also have a large density... so the translucense only goes so far through and into the material. You'd only notice around the edges, and would probably have to rerender the radiosity afterwards. But it still looks good just the way it is. smile.gif
patrick_j_clarke
QUOTE(MikeSanderson @ Sep 23 2005, 03:08 PM) *

Thanks Dan!

BTW: Yves....Where is that "Jittering" setting?
And since these are plastic do you think they would have just a bit of Translucence?
....... or do you think that would take me right back to where I was?



Jitter is in the Final Gathering section in the PWS:

IPB Image

- pjc
MikeSanderson
Thanks Patrick, but all I have showing under "Final Gathering" is "Samples"!

huh.gif

Is there another place to switch it on?

I'm in v12f.
bentothemax
Go into options on the top toolbar, then go to the main options tab, and click advanced options on.
ypoissant
QUOTE(MikeSanderson @ Sep 23 2005, 06:08 PM) *

And since these are plastic do you think they would have just a bit of Translucence?


There is indeed some bit of scattering going on in plastics. But not so much that it is worth spending the required time working toward adding that effect realistically. Plastic color pigments are so dense that it is not obviously noticeable.

If you want to improve the realism of your model, I can see 3 areas to work on first:

1) Setting your model inside a more realistic environment, instead of inside a Cornell box would help improve the look. The Cornell box is not a realistic looking environment because there is a big void just facing the models (the front wall is removed). Sit the model on a realistic looking floor (wood planks, tiles, carpet, etc. or a table top). Change the lighting for a better one that will get the most out of the model. Use lighting like a photograph would. And change the viewing angle.

2) Bevel your lego blocs. Right now, there is no apparent joints between the different blocs that compose your model. The bevels are IMO, way more important that that translucenty to improve the realistic look. THe bevelks don't need to be so "in-your-face" but still, they would improve the general believability.

3) Adding some soft reflection on the lego blocs surfaces would help get rid of the lackered look and give a more plasticky look. You may need to crank reflectivity up too if you use soft reflections.
MattWBradbury
Yes. I do agree. Let's see something other than a 5 sided room with some boxes in it. Caves are also good to show radiosity too ya know. Then you could add some rubble on the inside, maybe some cave drawings on the side. Something like the lazcow cave paintings, and then you could make your lego animal jump out and attack something... Good work on the lego animal! biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.