RobertMayer
01-16-2009, 03:24 PM
Hey folks,
I'm looking to make a script that will generate a bunch of lights for an object, one per vertex, and then color those lights per a bitmap that is assigned to that object.
I'm about to head to work, so I don't really have time to sit and think the entire script through, but I want to see what you guys think of the THEORY behind what I'm about to write.
Step 1) Get a vertex count
Step 2) Get each vertex's UV coordinate.
Step 3) Get the pixel color for each coordinate
Step 4) Generate a light per vertex with the pixel's color, but only if that vertex has a HSV-Value above a certain threshold. The color of the light should by 100% value, but the multiplier be equal to the value times a certain multiplier.
Questions to be had.
- Is there anything that exists like this already?
- Am I heading in the right direction?
- Would anyone find such a thing useful?
- Is there a way to get a sample that isn't just 1 pixel large (say I want to sample a 5x5 pixel area instead of a single pixel and then average them together)?
I'm looking to make a script that will generate a bunch of lights for an object, one per vertex, and then color those lights per a bitmap that is assigned to that object.
I'm about to head to work, so I don't really have time to sit and think the entire script through, but I want to see what you guys think of the THEORY behind what I'm about to write.
Step 1) Get a vertex count
Step 2) Get each vertex's UV coordinate.
Step 3) Get the pixel color for each coordinate
Step 4) Generate a light per vertex with the pixel's color, but only if that vertex has a HSV-Value above a certain threshold. The color of the light should by 100% value, but the multiplier be equal to the value times a certain multiplier.
Questions to be had.
- Is there anything that exists like this already?
- Am I heading in the right direction?
- Would anyone find such a thing useful?
- Is there a way to get a sample that isn't just 1 pixel large (say I want to sample a 5x5 pixel area instead of a single pixel and then average them together)?
