fadingsignal Posted April 4, 2016 Share Posted April 4, 2016 tl;dr How the heck do I attach a light to a piece of armor? I've got the process down pat for attaching lights to static objects using AddOnNodes, and it works like a charm. You can basically drop an AddOnNode into a static mesh, and name the node to the corresponding Index Value of the AddOnNode in a plugin (i.e. AddOnNode107, and make sure the value in the node metadata is also 107), and you've got a light that snaps onto your object. I do this with a lot of my own personal workshop objects to make glowing things give off real light. For armor though, it just doesn't work. I'm trying to add some small bits to an armor I'm making that will emit actual light, but nothing I tried works. I'm reverse-engineering the Pip-Boy, but it looks like the Light record that gets assigned to the mesh is assigned by the engine using keywords, so I can't just copy it. It's super complex and I keep hitting dead ends. There are many ways to 'attach' things, none of which I fully understand yet; Within the BSConnectPoint::Parents "CPA" node there is a variable named p-AttachLight, and an actual node called p-AttachLight, but there's no Light record associated with it. It seems like an ArtObject might be what ends up being connected here, which has its OWN set of data that is confusing, and there is nothing I can find that ties them together directly. %&^*(@! haha Any help would be amazing, cheers. Link to comment Share on other sites More sharing options...
TrickyVein Posted April 4, 2016 Share Posted April 4, 2016 Have you tried using/controlling an NiPointLight with a Radius/Dimmer/LightColorController? Those are used in some ambient effects and can be attached to weapons. Link to comment Share on other sites More sharing options...
cedaie Posted April 4, 2016 Share Posted April 4, 2016 (edited) I think the key is the ONAM - Art Object, in the Armor Addon, too.At least from what I can see. Armor > ARMA > ONAM > Nif > CPA > AttachlightOverride. Whereas the OMOD way, attaching AddonNodes and the like attaches light cones, as you're aware: Armor > OMOD > NIF > AddonNode > meta keyword > LIGH record I think the missing link you might be having is it's OFF by default, and the only way of turning it on is either set it in the LIGH record, or use PowerarmorHelmetLightOverride in the Armor. Also, have you enabled Skin Influence? Maybe the light is below the ground because it's not skinned. Also, this I shall test my hypothesis. Edited April 4, 2016 by cedaie Link to comment Share on other sites More sharing options...
DogtoothCG Posted April 4, 2016 Share Posted April 4, 2016 I'm about to sign off here, so this is likely extra-ordinarily non useful (I also don't do much esp work); but the biggest problem your likely going to run into is getting the lights to be in the "on" state. Applying workable lights to skinned models is fairly straight forward, but I would have to ask unoctium about potential keywords you might need. Link to comment Share on other sites More sharing options...
fadingsignal Posted April 4, 2016 Author Share Posted April 4, 2016 Have you tried using/controlling an NiPointLight with a Radius/Dimmer/LightColorController? Those are used in some ambient effects and can be attached to weapons. I came around to test that and got it to work somewhat. Glowing Radroaches were my reference, because they give off real light. However, the light stays in the fixed position specified in the NIF, which isn't so bad until the player ducks, and the light stays fixed at the Z coordinate. I couldn't find an example (or figure out how) to make an NiPointLight stick to a connecting point. Link to comment Share on other sites More sharing options...
fadingsignal Posted April 4, 2016 Author Share Posted April 4, 2016 I think the key is the ONAM - Art Object, in the Armor Addon, too.At least from what I can see. Armor > ARMA > ONAM > Nif > CPA > AttachlightOverride. Whereas the OMOD way, attaching AddonNodes and the like attaches light cones, as you're aware: Armor > OMOD > NIF > AddonNode > meta keyword > LIGH record I think the missing link you might be having is it's OFF by default, and the only way of turning it on is either set it in the LIGH record, or use PowerarmorHelmetLightOverride in the Armor. Also, have you enabled Skin Influence? Maybe the light is below the ground because it's not skinned. Also, this I shall test my hypothesis. You're definitely not wrong, after my post I made a diagram (as far as I could) of how the Mining Helmet and Power Armor helmets are tied together, and besides some backward weirdness (the helmet itself is an empty NIF with a single connecting point, and OMODS give it its physical properties, whether that be the Mining Helmet mesh, or the Power Armor mesh, etc) that's the general gist so far, but it's still wired up strangely. Nothing I tried from scratch would make it work though. And I'm using simple lights that are always-on (I don't need, and don't want, to override the Pip-Boy / PA light, my purpose is purely ornamental.) Going to try again tomorrow. I'd rather not have my armor an empty mesh and have to use an OMOD to make it visible, but if that's how it's gotta be done... Link to comment Share on other sites More sharing options...
Recommended Posts