Topic: Video: Light and Color (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=31051" title="Pages that link to Topic: Video: Light and Color (Page 1 of 1)" rel="nofollow" >Topic: Video: Light and Color <span class="small">(Page 1 of 1)</span>\

 
warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 06-11-2009 15:08

Been doing more research into light. Came across this video on YouTube. Absolutely fantastic vid, IMHO.

Light and Color 4 of 6

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 06-12-2009 18:19

Man, stuff makes my brain hurt. I get locked onto an idea and my brain runs itself into the ground.

----

A long time ago I was playing with making nebula. Pretty cheesie junk, really. Clouds, Difference Clouds, and colourizing. Standard and boring.

But the part that I was interested in was creating several nebula with various hues and putting them together. How do you put a yellow nebula together with a red nebula? And maybe mix in a low magenta nebula?

Since light is additive, I just added them together.

Yellow nebula with a black ground on one layer, red nebula with a black ground on another layer, and then Linear Dodge. Tada. Nice shades of orange where they over-lapped.

----

In coding, a great trick is to use a look-up table. It's great to calculate parametrics on the fly, but a look-up table can come in damn handy when it comes to speed. An example of this would be gamma. Don't bother doing gamma on each individual value. Rather, build the gamma table and then fly through the data.

----

I've been doing research into the physics of light. Not exactly how they travel, but rather colours and how they interact with surfaces. Nanometer stuff. When it comes to what I'm up to, RGB doesn't cut it. Currently, neither does Lab (but I'm working on hacking Lab for what I want).

Converting a wavelength to colour is pretty easy. This is the wavelength and this is the RGB for said wavelength.

But I have been fighting and fighting with putting various wavelength together. (One of the big mistakes that I have been making is trying to correlate spectrum and Cie XYZ in ways that they don't correlate. Shame on me!)

If you look at a spectrogram of a light source, you will see spikes and all that stuff all over the place. How do you put all of those spikes together for a final RGB value? How does brightness come into play?

----

A long time ago, I was playing with rastor look-up tables. This led to 2D Remap. It also led to a couple of other things, but I left them behind for various reasons.

----

So I was browsing for nanometer and RGB algorithms. Came across some code that uses a look-up table for nanometer > RGB. Sure, no big deal. Expected.

But down at the bottom of the code, there was this tiny little and inconspicious loop. What did it do? Turns out that it runs through the data set and adds up RGB values for each nanometer > RGB.

O M G

Was it really that easy?

Created a rastor nanmeter look-up table, threw a bunch of wavelengths into it, and added them up. Looks like it works.

Pffft. Been absolutely wracking my brain over the simpliest and elegantiest of operations: addition. After all, the mantra is light is additive.

So I can create light sources using nanometer data sets. Now I just gotta throw in some surfaces with nanometer reflection data sets and see what pops out.

----

I think the light and surface interaction is going to prove interesting and frustrating.

Consider a fleshtone. Largely some shade between red and yellow, so orange of some kind. But what nanometers do you add up to get such a fleshtone? Ugh. Not to mention that it may not be a straight-up nanometer right in the orange range.

What if you created the orange shade by literally adding red and yellow nanometers? What about a hint of yellow, a hint of green, and lots of red? How would that interact with a nanometer light source?

----

Typing out some of the stuff in my brain has helped ease the pain.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 06-12-2009 18:27

One thing I have been thinking about is hacking AMP files for the data sets. Literally draw the nanometer curve and export. Another option is to use a RAW file hack, which is almost exactly the same as hacking AMP files.

Man, I love this stuff. Nothing quite like goofing around.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 06-14-2009 14:52

Check it out.

The colour across the top is my uber sad attempt at making day light using a nano-curve. I used a Gradient + Curves and tried to follow the general shape of actual day light data. Its damn hard and this is the closest I got before giving up. Its also a bit over-muted because I didn't bother tweaking the scale.

In the middle is a nano-curve for a random colour. The violets and indigos are on the high end with a big dip through the middle in the yellow/green area.

Along the bottom is what happens when I put the two together. Now that is damn sweeeeet.



Most 3d render engines use RGB space and multiply for lighting. Makes sense. So I took the light and surface colour and multiplied them just like in such a 3d render system. Guess what? The colour it spit out was *vastly* different than the above experiment. The differences in hue between the two methods is enough to make me jump for joy.

This is a big part of something that I have been after for quite some time.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 06-17-2009 22:32

Low-Tech Science Project

A CD Spectrometer

Sweet. Seriousy.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 06-23-2009 14:34

On the left is regular 4-corner colour blending in RGB space. Linear interpolation.

On the right is 4-corner blending using nano colour definitions using linear interpolation at the nano definition level.



Can you see the difference?

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 06-24-2009 05:05

One of the interesting problems that I've been running into during all of this is one of scale. When adding this many numbers together, it's rather easy to go way beyond 255. Blowing out the highlights is as easy as falling down.

I have gone farther than what I've shown. One thing that I've done is add a lighting solution with the same nanometer definition method. Mixing colours is cool and all, but tossing in a light source is way coolier, especially when tinted. This is when I really started to blow things out way past white.

The first thing that I thought was, "Hey, specular hightlights are inherent in the system." Well, not necessarily specular highlights, but reflection and intensity.

But what if I don't want to blow things out too much? How do I reign it in or let it out just a little? This is the kind of scaling that has been running through my head.

If you can believe it, I've actually read a few tutorials about fixing blown-out flesh tones in photographs. I remember thinking that it's a rather odd thing to fix if it's not too crazy. Is a little shine on the forehead really that bad? Does a little shine make a photograph so bad that it has to be fixed? Maybe for studio portraits, but I would largely say nay. The photograph that I remember in particular was outside in the park on a very sunny day. Of course our are going to see some white in the skin in certain areas - through the camera and/or with your own eyballs.

How do we see the world with our own eyeballs as opposed to what makes a good photograph? Age old quandry, isn't it? Especially since retouching has become so prevelant in the past few years.

Another phenomenon that I find interesting is the use of light absorbing make-up in conjunction with uber lighting. Understandable, yet some how ironic.

Earlier today I was thinking about this while watching The Incedible Hulk. My eyes started to wander looking for reflections and highlights. I couldn't find a single thing that did not reflect a highlight of some sort. All it took was one window with closed blinds and closed curtains for everything to reflect highlights. Either daylight really is that strong (closed curtains and blinds) or such highlights are extremely prevelant.

I have thought about this before with respect to shiny fleshies. Back then, I started to really look at foreheads. Unless the lighting is extremely dim, I see shiny foreheads to varying degrees.

In the world of 3d rendering, I've always found it odd that specular highlights are a totally seperate attribute. To me, specular is just a reflection hack. Not just that, but how they were largely built to work with light objects only. This makes absolutely no sense to me. But it's what we do for speed reasons. When you get into photometrics and real reflections, render times seriously increase.

So it's easy for me to get massively blown highlights with what I've been playing with. Do I fix it with a hack? Or do I adjust how I'm using the system? Do I go with what I observe around me, or do I go with what is considered 'good rendering' by the majority?

And around and around we go.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 06-25-2009 16:49

Time to put this in the back of my head for awhile. Let my sub-conscious mull it over for a bit while the front of my brain works on other things.

Other things like what? More histogram stuffs. A few months ago I managed local equalization and it was awesome. Uber contrast along the lines of Topaz Adjust. Now I'm gonna hack together a 6d histogram and see what pops out.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 07-06-2009 19:40

I think I figured out how to do this for Lab mode. One of the great things about Lab is seperation of lum and colour. But therein lies the problem when trying to implement a such a system using Lab. With RGB, you get colour and lum by adding. By mixing equal amounts, you get shades of grey. But if you try to do the same with Lab, by adding colour values, all you get is a colour without the lum component.

For RGB nanos, I've been using an array of 24 bins. Run through the bins, add it all up, and you get a final colour. But how to do the same for Lab? Especially since the colour values are 2d, so to speak.

I'm thinking simply use a 2d array with the very center being the base lum value.

Imagine a 2d array wtih a range of (0-2,0-2). Populate it with values. For greyscale rastor, the value range would be 0-255.

The center would be (1,1) and would be the base lum value. Surrounding values would be vector multipliers for the colour information.

For example, d(0,0)=(255) would be a-=128 and b-=128. And d(2,2)=(255) would be a+=128 and b+=128. And so one for other surrounding values in d(). The position in d() is the base vector and the actual greyscale values would be the multiplier. Add then all together, toss in the base lum at d(1,1), and you get a final tri-Lab colour.

Then toss in a light definition using the same method and tada. These values would be normalized to (0-1) space and used as a multiplier against the surface definition.

Let's say that you have a surface like this:

| 0 0 0 |
| 128 128 128 |
| 0 0 0 |

That surface would be a greyscale of 128. Even though there is colour information in there along the b axis, they would add up to 0 for no saturation.

Toss a light at it like this:

| 255 255 255 |
| 0 255 255 |
| 255 255 255 |

And you will end up with a yellow colour with a lum value of 128.

I can't wait to fiddle with this idea. It just might be the system that I've been looking for.

(Edited by warjournal on 07-06-2009 20:52)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu