| Author |
Message |
sheepandshepherd Trandoshan
Joined: 01 Apr 2008
|
Posted: Jan 08, 2010 20:15 Post subject: Question about dynamic lights |
|
|
Hey, lucius, you've already demonstrated the dynamic lighting feature for sprites, but I have a question for the not-so-near future. When you implement 3D models, I'll probably redo the new enemies in my level in a Special Edition release, and I plan on adding some glowy effects. Right now, I assume the dynamic lights are centered at the sprite/model's origin, but will we in the future be able to put a light source anywhere in the model, in a way that the light moves with the animation? This likely depends on what model formats you decide to support, so I was just wondering if you had any plans (while I'm in the process of designing the enemy ).
|
|
The MAZZTer Death Star

Joined: 25 Sep 2003
|
Posted: Jan 09, 2010 05:34 Post subject: |
|
|
Best way to do lights in models like that would be to use shaders like modern engines use. With shaders you just specify a texture and then effects to apply to it, and then any usage of that texture in DF is affected. Wouldn't work 100% just like that (the same texture may be used for different purposes and so might not look right in all cases) but it could take care of 99% of the hard work.
And the end result would be you would just give the right texture to the model and the texture would emit light.
Of course this is all MY ideas, not sure how lucius is doing lighting.
_________________ http://www.mzzt.net/ | I am a respectable admin with a respectable sig. |
|
lucius DarkXL Developer

Joined: 17 Feb 2008
|
Posted: Jan 09, 2010 09:56 Post subject: |
|
|
Currently dynamic lights are placed using the logic scripts. This won't always be the only way though. Anyway the script places it at any point, they are not centered arbitrarily or anything like that. If you wanted to make a 3D lampost and put the light on the top, that is already supported. Proper attachments will also be supported for models, so you could attach to the hierarchy and have it move with the animations properly.
The glow/bloom effect is different. Any "emissive" pixels glow, so it is based on the textures. This works on any surface, it's not any different for models.
_________________ DarkXL....http://darkxl.wordpress.com |
|
|