models emit light
Moderator: InsideQC Admins
15 posts
• Page 1 of 1
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
-

thorn3001 - Posts: 29
- Joined: Tue Jun 28, 2011 6:09 am
- Location: Bogotá, Col
self.effects = self.effects + EF_BRIGHTLIGHT works in regular quake, but in DP it's weird unless you change a cvar
or look at the tenebrae light extension in dpextensions.qc
or look at the tenebrae light extension in dpextensions.qc
-

behind_you - Posts: 237
- Joined: Sat Feb 05, 2011 6:57 am
- Location: Tripoli, Libya
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
- toneddu2000
- Posts: 1352
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
I need to make a monster with red eyes that emit light
a completely black texture with only red spots (better with a little of focus) and name it monster_glow.tga
- toneddu2000
- Posts: 1352
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
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
if you are using darkplaces add "self.effects = 128;" to the monster.
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;
Your code should be
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 - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
Nahuel wrote: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
if you are using darkplaces add "self.effects = 128;" to the monster.
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;
Your code should be
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.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
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
- Seven
- Posts: 301
- Joined: Sat Oct 06, 2007 8:49 pm
- Location: Germany
thanks Seven, but please explain me, how can use this function? exist any tutorial?
moreover, for the creation of my monster, this function will not achieve my goal (emitting red eyes), but I will use it for something else.

moreover, for the creation of my monster, this function will not achieve my goal (emitting red eyes), but I will use it for something else.
Thorn
-

thorn3001 - Posts: 29
- Joined: Tue Jun 28, 2011 6:09 am
- Location: Bogotá, Col
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.
-

mankrip - Posts: 915
- Joined: Fri Jul 04, 2008 3:02 am
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;
};
This is how it is explained in dpextensions.qc:
- 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.
It is really simple to use as you can see.
Hope it helps you a bit.
Kind regards,
Seven
- Seven
- Posts: 301
- Joined: Sat Oct 06, 2007 8:49 pm
- Location: Germany
15 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest