models emit light
models emit light
Good morning, someone could help me? the question is how to generate light in a model using DP, I think some weapons in Nexuiz emit light.
thanks
thanks
-
- Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
-
- Posts: 1395
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
You could use a shader for emitting light
(this shader works for sky, I don't know if it works for models too)
or, in DP, use a modeltexture_glow.tga for the model. Xonotic uses it too.
EDIT: If you want to add a light just like flashlight you could use this tutorial and modify it to show light only when that specific weapon model is used
(this shader works for sky, I don't know if it works for models too)
or, in DP, use a modeltexture_glow.tga for the model. Xonotic uses it too.
EDIT: If you want to add a light just like flashlight you could use this tutorial and modify it to show light only when that specific weapon model is used
-
- Posts: 1395
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
if you are using darkplaces add "self.effects = 128;" to the monster.thorn3001 wrote:I had something like that, but I want generate red light that is reflected in the walls, maybe make a face up the eyes and assing them an alpha texture with red dot. Thanks
Thorn
For example if you are using a dog. In dog.qc near to the end you find
Code: Select all
setsize (self, '-32 -32 -24', '32 32 40');
self.health = 25;
self.th_stand = dog_stand1;
self.th_walk = dog_walk1;
self.th_run = dog_run1;
setsize (self, '-32 -32 -24', '32 32 40');
self.health = 25;
self.effects = 128;//in darkplaces "128" is a red light
self.th_stand = dog_stand1;
self.th_walk = dog_walk1;
self.th_run = dog_run1;
Very easy!
hi, I am nahuel, I love quake and qc.
Nahuel wrote:if you are using darkplaces add "self.effects = 128;" to the monster.thorn3001 wrote:I had something like that, but I want generate red light that is reflected in the walls, maybe make a face up the eyes and assing them an alpha texture with red dot. Thanks
Thorn
For example if you are using a dog. In dog.qc near to the end you find
Your code should beCode: Select all
setsize (self, '-32 -32 -24', '32 32 40'); self.health = 25; self.th_stand = dog_stand1; self.th_walk = dog_walk1; self.th_run = dog_run1;
setsize (self, '-32 -32 -24', '32 32 40');
self.health = 25;
self.effects = 128;//in darkplaces "effect 128" is a red light
self.th_stand = dog_stand1;
self.th_walk = dog_walk1;
self.th_run = dog_run1;
Very easy!
hi, I am nahuel, I love quake and qc.
Hello thorn3001,
what Nahuel explains is this dpextensions function:
DP_EF_RED
If you want another color or another intensity of the light, you should use this one:
DP_ENT_GLOW
It produces remarkable effects.
I use this fantastic function regularly.
It gives amazing ambience boost.
Kind regards,
Seven
what Nahuel explains is this dpextensions function:
DP_EF_RED
If you want another color or another intensity of the light, you should use this one:
DP_ENT_GLOW
It produces remarkable effects.
I use this fantastic function regularly.
It gives amazing ambience boost.
Kind regards,
Seven
I suppose what you want is something similar to this.
Maybe this thread and this other one can help.
Maybe this thread and this other one can help.
Hello thorn3001,
sorry for my late reply.
If you are still interested in using DarkPlaces DP_ENT_GLOW,
here is an random example of how to use it:
This is how it is explained in dpextensions.qc:
It is really simple to use as you can see.
Hope it helps you a bit.
Kind regards,
Seven
sorry for my late reply.
If you are still interested in using DarkPlaces DP_ENT_GLOW,
here is an random example of how to use it:
Code: Select all
void() alt_death8 = {
self.avelocity = '0 350 0';
self.alpha = 0.19;
self.glow_color = 5; // this sets the glow color (8-bit value 0...255). 75 is red
self.glow_size = 250; // this sets the intensity (0 ... 1020)
self.nextthink = time + 0.2;
self.think = alt_death9;
};
Code: Select all
//DP_ENT_GLOW
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//field definitions:
.float glow_color;
.float glow_size;
.float glow_trail;
//description:
//customizable glowing light effect on the entity, glow_color is a paletted (8bit) color in the range 0-255 (note: 0 and 254 are white), glow_size is 0 or higher (up to the engine what limit to cap it to, darkplaces imposes a 1020 limit), if glow_trail is true it will leave a trail of particles of the same color as the light.
Hope it helps you a bit.
Kind regards,
Seven