kensaundm31@Posted: Tue Dec 11, 2007 1:12 pm :
I've downloaded a few lasersight mods for doom but it turns out just to be just a red blob reticule. A proper lasersight has a beam from the weapon.

So could you do it by:

- binding a fog light to a weapon
- is it possible to shape the light into a beam?
- turn it into translucent by adding an alpha channel (similar to the bloodrayne tutorial)

Is this possible or am I barking up the wrong tree.



Skul@Posted: Tue Dec 11, 2007 2:02 pm :
You might want to try editing the bio-scanner particle effect (used right before you enter Mars City in the main game) so that it's narrower and maybe a bit shorter and add a small projected light to it. That would probably give the results you want.



Dinky@Posted: Tue Dec 11, 2007 2:22 pm :
Skul wrote:
You might want to try editing the bio-scanner particle effect (used right before you enter Mars City in the main game) so that it's narrower and maybe a bit shorter and add a small projected light to it. That would probably give the results you want.


The bioscanner is actually just a piece of geometry with a nice looking texture on it. Then there are even more textures and polygons on it animating it, to make it look laser-y. If you want to see what I mean, go to it and type r_showtris 1 in the console and look at it. You may know this already?

I don't know how you would go about doing a laser-sight, as I'm not much of any type of a coder. I imagine that you could just add some geometry to the gun to display that the laser light is being beamed from there (with a nice texture and alpha map), then do something in scripts or something about the laser. You could actually create the laser art just as a simple square polygon with a circle of laser on it... But like I said, I know -nothing- of code, just art. I'd assume you have to make something that makes it so that wherever you're pointing your cross-hair, that laser circle geometry is up against the wall, enemy, or whatever you're pointing at.

Good luck though, wish I could be more help :(.

EDIT: And a making a laser-sight to a weapon doesn't actually mean it has to be a light. It really isn't that complicated. Forget lights, work with geometry and textures.



CrimsonHead@Posted: Tue Dec 11, 2007 4:38 pm :
Any I've ever seen in Q3A, SoFII, and Oppossing Force were all exactly that, just a long narrow polygon attached on the first foot or so of the weapon with a nice looking alpha channel masked texture that made it look half transparent and like it was "falling off" at the end.



jcdenton22@Posted: Tue Dec 11, 2007 9:51 pm :
Well, you should try out my mod then. It lets you attach any kind of particle effect or model to any bone of the weapons in really easy way. You can attach lasersight, flashlight, custom muzzleflashes etc. to any bone of the weapons by adding simple keys to the weapon defs & adding some a line or two to the weapon's script.

Try the mod(link in my sig) & see how lasersight is attached to pistol & rocket launcher. I was hoping for someone to come up with a proper lasersight or flashlight mod, where you have lasersight &/or flashlight on every weapon that you can turn on or off with the secondary fire, but it never happened. See if it works out for you.



kensaundm31@Posted: Wed Dec 12, 2007 2:04 pm :
Thanks for help guys, I'd never have realised you could do it with geometry and texture. I'll be sure to check out your mod Denton.

I'd also think it would be pretty cool if the lasersight was red but turned green when reloading, or green but turned red when firing. But that would make it probably 10 times more complicated.



wal@Posted: Wed Dec 12, 2007 4:27 pm :
That part would be piss easy. Just setSkin at the start of ::Reload or ::Fire or whatever and back again at the end or maybe use sharder parms. You could even use a trace to make it have different colours for the spawn class of whatever it was pointing at so it could be use as an identifier and locater of hidden goodies.
That would of course be slightly more complicated.



kensaundm31@Posted: Thu Dec 13, 2007 1:45 pm :
Nice one wal, that sounds do-able.
I haven't done it yet but wouldn't there be a problem with using geometry as the lasersight where it wouldn't terminate at anything it touches as it is a pre-determined length so it would go right through anything, although this wouldn't allways be obvious.

If it was possible with light that would solve the problem.

A non-technical work-around I suppose would be to say that it's a 'gamma-ray' or 'neutrino-pulse' lasersight because those particles are ignorant of matter.