Alternating Weapon Nodes and Relentlessly Pink Textures

Started by BentonGrey, June 22, 2024, 01:03:15 AM

Previous topic - Next topic

BentonGrey

Howdy folks, does anyone know how to set up a weapon node/weapon nodes on a mesh so that FX will alternate between them?  Is that even how to accomplish this?  In other words, let's say I've got Dean's Rex-1 skope, a robot with two guns, and I want the FX of his shots to alternate between the two as he fires them.  Is there anything I can do in Nifskope to make this happen?

Also, in placing weapon nodes, how can you get them where you want them?  I'm monkeying around, but the shots keep coming from a different spot than I put the node.  Is there some kind of interaction between the coordinates of the "weapon" labeled bit and the coordinates of the "editable mesh" bit?

On a different note, I'm having trouble with the Dirtbag skope, and I'm hoping someone can help me sort it out.  His shovel looks like it was an imported object, as it didn't have a refl or glow texture and was showing up pink in game.  I checked it out in Nifskope, and it was pointing toward a PNG instead of a TGA or DDS.  I added the refl and glow textures and changed the entry on the main texture from PNG to DDS, but it still shows up as pink.  Weirdly, it displays right in Nifskope, but not in CTool or in game.  Does anyone have any ideas?

I've uploaded the skope to my SMA working folder, if anyone wants to poke around at it.
https://www.mediafire.com/file/ex21ewacks7ggx6/Tmnt_Dirtbag.zip/file
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out mymods and blog!
https://bentongrey.wordpress.com/

SickAlice

Your shovel dds is actually blank.



Additionally the glow and refl are named dds in the nif. That should always say tga even if it uses a dds.



The NiMaterialProperty settings are wrong. Compare to the correct settings in the main body. Or I made a post about it somewhere here. This was causing the "purple" coloration.



Last, instead a gloss (refl) in the NiTexturing Property of the shovel you have a bump map instead and it's pointing to the refl. That needs to go and a gloss added instead.



All meshes should also always be in named nodes which many of your pieces are just sitting in bipeds. They have gloss because they are picking the values of the scene/bipeds. Absence of nodes also makes it very hard to do animations and can lead to hiccups in game since the engine checks nodes.

Else here is a nif with all that fixed on the shovel and a new shovel dds:

https://thelitterbox.freedomforce4ever.com/temp/dirtbagfix.rar


SickAlice

As far as the other two I am not good with FX and just copy and recolor them. For two gun FX I just borrow one that already does it. Else it's dictated in keframes.

Placement of things in animations is also dictated by keyframes. Usually when something does not line up it is because the coordinates in the keyframes do not relatively match the ones in the nif, the positions that is. It's a bit of a process and I usually just start from scratch so I won't have to clack away on the calculator all night figuring out the differences.


BentonGrey

Thanks so much for tackling this for me and for taking the time to provide so much helpful feedback!  I really appreciate it, SA!

Quote from: SickAlice on June 23, 2024, 10:45:34 PMYour shovel dds is actually blank.
Weirdly, it showed up for me in GIMP.  I don't know what to make of that!

Quote from: SickAlice on June 23, 2024, 10:45:34 PMAdditionally the glow and refl are named dds in the nif. That should always say tga even if it uses a dds.
Oh!  I didn't know that!  I've got rather a lot of stuff to fix...

Quote from: SickAlice on June 23, 2024, 10:45:34 PMThe NiMaterialProperty settings are wrong. Compare to the correct settings in the main body. Or I made a post about it somewhere here. This was causing the "purple" coloration.
Interesting!  I've used that to up the brightness of something, but I never paid attention to it beyond that.  I'll need to start watching for this.

Quote from: SickAlice on June 23, 2024, 10:45:34 PMLast, instead a gloss (refl) in the NiTexturing Property of the shovel you have a bump map instead and it's pointing to the refl. That needs to go and a gloss added instead.
Ah!  I didn't see a way to add a refl (is it Dark Map Texutre?), and I thought one texture might be as good as another.  Shows what I know.

Quote from: SickAlice on June 23, 2024, 10:45:34 PMAll meshes should also always be in named nodes which many of your pieces are just sitting in bipeds. They have gloss because they are picking the values of the scene/bipeds. Absence of nodes also makes it very hard to do animations and can lead to hiccups in game since the engine checks nodes.
Okay, so this is really interesting, but let me make sure I understand.  If I have an object, the thing itself, the Editable_Mesh part of the entry, should have a head above it, between it and where it is attached in the mesh?  I had no idea.  So, when I copy something from spot to spot, I should try to get it's branch, starting at a higher point than the EM itself?

Weapon Nodes: So whether a mesh uses one or multiple weapon nodes is determined by keys, rather than by the nodes themselves?
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out mymods and blog!
https://bentongrey.wordpress.com/

SickAlice

1. No idea either why it outputted like that either. I use PS and rather finicky DDS export plugin. I just keep the settings in my art notes.

2. I wouldn't worry about it in character nifs. "If" you are testing your mods and part looks off or not lighted correctly in game then check it. I've read way too much about the process and had come across something about how the engine, so not CTool nor the Preview mode, will read tga by default before moving to dds. It's why extra textures should never be hanging out in a skin directory. For  :ffvstr: map objects and FX it is otherwise the dds extention.

3. It's needed to match to the game values. I toggle this as due others when I want to make a naturally transparent object that has a color. For example Lantern Corps aura's. Using the right color values will change them green, red, so on. Adjusting the Alpha here, which yours was down, will add native transparency.

To cheat with here are two male basic nifs with the correct settings for everything for  :ff: and  :ffvstr: :
https://thelitterbox.freedomforce4ever.com/temp/proper_settings.rar

4. The games are also finicky. Base for the main texture, Glow is the glow and Gloss is the Refl. We can use Decal though I never bothered to figure out how. I think it's mostly for billboards in levels. I assumed this was otherwise an output issue. I see a lot of naming conventions and odd texture assignments that I know Blender causes. The plugins for it were never focused on FF games nor completed. I always do it all manually in Nifskope. I also keep endless documents and cheat nifs of course to speed through these processes. And all of them are mistakes again I made hundreds of times myself. Then one day I'm playing in game and "what the heck is that?" or it freezes during a certain collision.

5. If you look any nif the mesh is always contained within the node. This again helps prevent in game bugs due to how the game engine does checksums and makes it so we can animate pieces. I always stress to check everything in game. CTools render differently outside the Preview mode which is just CTool embedded in the game.

But take male_basic. There is a node inside the Scene Root named (string) male_basic. Inside that named node is an Editable_Mesh (naming conventions do not seem to matter for the mesh but none should have the same name as a node or each other).

Then look at say Gren's Captain America V2 for example. Look at the right side shield. There is a node called Cap_Shield_righthand. It is inside the right hand biped node. Inside of it is the editable mesh of the shield. That is used to control the placement, size and visibility of the model. And if you look at any Gambit there is alway a staff named node with the model inside of it.

The keyframes determine where the weapon will move and if it is even visible by calling on the string name of the node that contains the model. The nif itself, at least how it works in these Netimmerse games, is just always stationary and doesn't determine anything other than the lighting, shading, coloration and so on in character nifs. This is different again for map objects and FX which do or can contain their own keyframe animations (see the fountain map object from  :ffvstr: which has it's own animated water for example).

I have never looked at a duel gun FX but this is probably how it is done. There would be two objects, the "shot" in the nif then animation values that cause one or the other to be visible (shrunk or scaled up to be visible) to create an optical illusion of two different shots.

Like how animations by calling on strings determine whether or not a weapon is in hand or holster but there are actually two models, one in hand and one in holster inside the character nif.

This is a thing were it won't cause problems 100% if it isn't set up with the right directory structure but will often enough either in placement and also tends to cause those weird gloss bugs.

Honestly I learned much of this by just dissecting things and making Frankenstein experiments, people on this and the old forums of course who I was rather stubborn about listening to, the game docs and just tons of time spent reading and watching tutorials online. But much of this someone could come along and this would look like blatherskite. If they opened a nif or kf in Nifskope though you just see it.

As a rule otherwise I always have a template on hand that was made by someone else and use to match up the settings in my own stuff. That's the fastest and easy way to do it. Mostly the ones made for the game itself since they are the correct ones (with some exceptions where they screwed up like Time Masters hourglass).




BentonGrey

Thanks again, SA!  That's making things clearer.

Okay, good, haha, I don't have to go and redo all of those texture entries.

Okay, I think I've got the node thing.  I'll keep that in mind going forward, and hopefully it will help me avoid some issues.

Weapon node: I think I haven't been clear enough about this and have created confusion (unless the confusion is mine, which is certainly possible!).  I'm trying to figure out how the "weapon" node of a .nif works, the thing in the model itself that tells the game where an FX emits when it is set to come out of the "weapon" rather than, say, "Bip_Right_Hand."  I've seen meshes where the FX somehow knows to alternate between two points, usually set up to match two animated guns or something, like you were describing.  I'm assuming that is accomplished by setting up multiple "weapon" nodes, but I can't figure out how to do it, or even if that is true.
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out mymods and blog!
https://bentongrey.wordpress.com/

SickAlice

That was all sort of scattershot. I think I was typing it between doing dishes and running outside to console the stray cat. But as said when you open up a nif and just look at it this all falls into place. And okay, the weapon node. I do not know much of it other than acts as a sort of bounding box. I "think" and don't quote me but you could research it this takes part in collision. So when "object gets struck by weapon".

I do know that it can be used as a starting point for FX and have messed with it, yes. I have made my own starting points before like for a spraying flower on the coat pocket. I don't delve into FX to heavily but I do not think so for the ones I have seen and used (two gun shots say).

I know you do not enter two different points in the Editor so my assumption is inside the nif there is some information that handles that "alternating effect" which I believe is just two different models and one or the other is vanishing to create the illusion of two different shots. It may even be one is lined up with the one hand, say right for example and the other model is just place about where the left will be?

Pretty much you are going to have to grab one of those FX and take a look at the nifs in Niskope to figure that out. I am certain all this takes place inside those FX nifs though. I know a lot is always handled there just like map objects data and terrain and such all have info inside them that makes them work, nowhere else.

That btw is the proper use of nif. Our character nifs are kind of unorthodox and made that way to make it easy for players to customize them. I sat and went through every filed in the game Knight Rider 2 and pretty everything is all self-contained. In fact the nifs even contained the textures and they had to be extracted to look at them. It also makes of external ini's which is kind of cool.


BentonGrey

Well, now I'm doubting myself.  I looked at several meshes I thought would have multiple weapons nodes, but they all just had a single one, so maybe I'm crazy and imagined that.

That's interesting, man.  I didn't realize FF was that unusual in this regard. 
God Bless
"If God came down upon me and gave me a wish again, I'd wish to be like Aquaman, 'cause Aquaman can take the pain..." -Ballad of Aquaman
Check out mymods and blog!
https://bentongrey.wordpress.com/