View previous topic :: View next topic |
Author |
Message |
Timpuktu Member
Joined: 09 Aug 2004 Posts: 86 Location: Finland, Helsinki
|
Posted: Mon Nov 20, 2006 3:02 pm Post subject: Texture lights. |
|
|
It would be great that if you could setup textures to emit light. So you would not need to add light for each texture which sould emit light.
In Quake Engine there is file called lights.rad that has information of texture lights. (or atleast in HL1 has it, when you use Zoners Compiler Tools).
Example:
wall_light01 255 255 255 200
First part is texture name, next three values is light color and last value is amount of light it emits.
My idea is that you could setup textures that emits light in material editor, like givin color value and amount of light it sould emit.
- Timpuktu _________________ Life is a waste of time, time is a waste of life. Get wasted all the time and you have the time of your life. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Wed Nov 22, 2006 7:43 pm Post subject: |
|
|
Interesting thought!
However, would that imply that _all_ of the object wrapped in that texture emits light? That would be a major step beyond area lights (multisampling for soft shadows... something DeleD doesn't have yet), so I don't think that's the way the old quake engines did things (would rocket rendering times sky high). More probably the brush wrapped in the texture is used as the position for an 'automatic' light source.
I'll read into this. There are also techniques that use 'light maps', where each textel determines how much light (and what color) is emitted from that position. |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Wed Nov 22, 2006 8:54 pm Post subject: |
|
|
?
Yeah that woudl be a great feature. In Embrace, I used to just set my flurescant light textyres to emite light instead of having a point light under the lights, it gave a lot better results.
It's also good when you have a light on the wall. The light can just shine down insteadf in a big globe. _________________
|
|
Back to top |
|
|
trucker2000 DeleD PRO user
Joined: 11 May 2005 Posts: 1839 Location: Sacramento, California
|
Posted: Wed Nov 22, 2006 11:18 pm Post subject: |
|
|
I would love to see this feature.
In any light, there will be more than one texture.
IE:
1. lamp texture
2. bulb texture
A setting in the inspector could set the particular texture on the object to emit light. _________________ Some day I will grow up and be a real modeler.
"Never give up! Never surrender!!"
Sys specs:
asus
8 gigs ram
Invidia gtx560 video card
Windows 8 (worst op sys Ever) |
|
Back to top |
|
|
afecelis DeleD PRO user
Joined: 08 Aug 2004 Posts: 427 Location: Colombia
|
Posted: Thu Nov 23, 2006 5:15 am Post subject: |
|
|
I'd like this feature, or internal area lights that could be sized/scaled as squares/rectangles. |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Sun Nov 26, 2006 12:17 am Post subject: |
|
|
Once you do a radiosity solution, light-emitting faces comes pretty much for free. Before then, well, the math is the same as for radiosity, so that's what you'd be implementing :-)
One thing you can do to accelerate light mapping is to use the hardware. Divide all geometry coarsely into cells, and render all cells between the source and the destination into each destination triangle, from each source light source or triangle. If you have real cells/portals, this can be made faster through culling, too -- else, make sure you don't set light ranges too far.
If you want to be really fancy, you set a rendertarget per pixel in the light map, and render the geometry in question into that pixel in accumulation mode. Or, more likely, keep a larger render target, render everything, and when you're done, downsample to the target pixel. Floating point frame buffers with accumulation makes this a lot easier, too. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Sun Nov 26, 2006 12:02 pm Post subject: |
|
|
Quote: |
Once you do a radiosity solution, light-emitting faces comes pretty much for free. Before then, well, the math is the same as for radiosity, so that's what you'd be implementing |
Ah, sweet, you are completely right of course. Thanks for the pointer!
Your points about hardware accelerated light mapping are also interesting. Any clue on how well this would scale onto older hardware? I've always shied away from hardware acceleration in this department because I was under the impression that a solid software rendered fallback would be needed anyway (so I'd rather postpone hardware acceleration until the software renderer reaches some sort of 'final' state), but perhaps my beliefs are outdated! |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Mon Nov 27, 2006 7:32 pm Post subject: |
|
|
I think that anything with hardware transform and lighting (back to original Radeon and GeForce) would do OK with hardware assisted light map calculation. However, I've only actually read code that did this, I've never tried it myself, so don't take what I say as gospel :-)
Btw: As you know, I think the light mapping in DeleD is not its most important feature. I've recently started generating lighting maps in 3dsmax, and it has some awesome abilities (photon mapping, radiosity, sky lights, etc) but it's also quite slow. It does support networked render clusters, though :-) Hence, however, the separate question about the Collada exporter. |
|
Back to top |
|
|
|