Red dot style texture. Created 9 years ago2015-09-28 09:54:16 UTC by abbadon abbadon

Created 9 years ago2015-09-28 09:54:16 UTC by abbadon abbadon

Posted 9 years ago2015-09-28 09:54:16 UTC Post #327059
Hi everyone!!. I am finishing now some of the new models of my MOD Zion Warcry, and I´m thinking about making some parts of them have a "light" that could be seen independently of the light of the map. I mean, I want some parts of the texture be enlighted even in dark places, something like the display of the weapons of DOOM 3, or like the control panels of the machinery seen also in DOOM3, or, like the red dot of a red dot sight of a weapon, which is visible in the dark. Could it be done in HL?, it´s a matter of modelling or it also need coding?. Thanks in anticipation! :)
Posted 9 years ago2015-09-28 11:04:10 UTC Post #327061
For models, you'd need coding I'm afraid
monster_urby monster_urbyGoldsourcerer
Posted 9 years ago2015-09-28 13:23:19 UTC Post #327067
Oh, ok. Can you point me to a good tutorial? (Ok, maybe I'm asking too much). XD
Posted 9 years ago2015-09-28 14:26:00 UTC Post #327069
This can be done with static prop models, using two models and a little bit of trickery, as I did in both my TWHL Tower map and the christmas tree decorating minicompo that Captain Terror hosted last year.
You'll require two models. One of them is the base model:
User posted image
And the other is the glow model:
User posted image
They should be placed that the glow model sits around one Hammer unit away from the base model. If the model is designed to be viewed from a distance then you might want to increase the distance between them a bit to prevent Z-fighting.
The base model should be left as is, and the glow model should be set to the additive rendermode.

Hopefully this will end up looking alright when the models are lit up:
User posted image
But it will really look good when the model is in a darker environment:
User posted image
The effect was improved a little bit here using a light_spot to project an orange glow on the ground in front of the stove.

This technique was also used on the TV in the Christmas tree map:
Fullbright
With lighting

In the case of the TV, the screen of the basemodel was just black, and the images on the TV only existed on the glowmodel. This was done to prevent the images clashing if the player shined the flashlight at the model.

I've only ever done this with static prop models, as I still haven't learned to animate models yet. I'm sure the same technique could be used for animated models, but for something like NPCs or onscreen weapon models I think it would probably need coding to display the two models at once.
Alabastor_Twob Alabastor_Twobformerly TJB
Posted 9 years ago2015-09-28 14:30:58 UTC Post #327070
I assumed that this was for weapon models. My bad.
monster_urby monster_urbyGoldsourcerer
Posted 9 years ago2015-09-28 14:33:40 UTC Post #327071
I hope not, because...WOW!! O_o, what a COOL effect!!!, that´s what I want!!, but, for static prop models you mean BSP based models, not mdl models, right?
Posted 9 years ago2015-09-28 14:44:57 UTC Post #327072
That technique works for both bsp brushes and mdl models. What I meant by static prop models was that I've only ever used it where the models have no animations and are used as props for the map. So in other words they're not things that can be interacted with, like a weapon lying on the ground.

Here's a link where you can look at the models I've used this with in the past so you can copy the idea:
https://www.mediafire.com/?z3z2093m3zo74mn
Alabastor_Twob Alabastor_Twobformerly TJB
Posted 9 years ago2015-09-28 15:51:46 UTC Post #327073
Thanks!!, One last question. Could this effect be done using one part of the model called, for example, lightspot, which is rendered in additive apart from the rest of the UV maps of the rest of the models which will be rendered in normal or transparent?.

Maybe I´m explaining it bad, but I´ll try to do it better:

I have the whole model made in MS3D, then I´ll create two leafs in a shape of a square which will be textured with a whole UV map for this part, then I´ll texture and compile the whole model including this part called "lightspot",and then finally, in HLMV I´ll save that lightspot´s texture with the additive flag applied. Is this process right?.

Aniway, you´re now on ZWC´s credits as "model´s light effects texturing advisor"! :)
Posted 9 years ago2015-09-28 17:39:39 UTC Post #327076
Ooh, sounds fancy. :)
Anyway, I just tested what you asked now, and it does work but it doesn't really work in the way that you want:
User posted image
That's just one model, and the texture that was used on the speakers was set to additive. It does render them as additive, but it seems to take the brightness value from the lighting that the model is subject to. So while they are clearly visible when the model is lit up, they can't be seen at all when the model is in darkness.
Alabastor_Twob Alabastor_Twobformerly TJB
Posted 9 years ago2015-09-28 18:37:38 UTC Post #327077
Oh!. Well,that's ok. If the prob is the light, there was a little amount of light on the level when it's in dark phase. So the additive part could be lit like in your stove .
User posted image
Posted 9 years ago2015-10-01 01:27:16 UTC Post #327128
Maybe you're better off attaching a sprite to the model?
Can't even begin to guess how to do that, though :(
Tetsu0 Tetsu0Positive Chaos
Posted 9 years ago2015-10-01 20:01:10 UTC Post #327137
I think of that ages ago, and doesen´t work fine, oh, and it requires coding (on which I´m not good at all... ). :roll:
You must be logged in to post a response.