Freedom Reborn

Freedom Force Forums => Hex Editing => Topic started by: Tomato on May 06, 2020, 05:08:25 PM

Title: Mirroring pieces Tutorial
Post by: Tomato on May 06, 2020, 05:08:25 PM
So today I learned a new skoping trick some of you might already know, but I figured I'd write a tutorial on it for new members if nothing else. I was skoping some pieces onto either side of a belt, and rather than fight the battle of trying to manually move/rotate it into place, I decided to experiment, and I found a much, MUCH easier way to mirror pieces. The skope I did this with has a LOT of pieces, so I'm going to demonstrate on my avatar skope instead.

I should note, this only works properly if you're mirroring on the same bone and will work best on the central bones (Pelvis, Spine, Spine1, Neck, and Head). It will also mirror your texture.

(https://i.imgur.com/3b49OQ6.jpg)

So here's our incredibly handsome test dummy. As you can see on the left, I've added a pouch to the right side of his belt. I'm going to mirror that pouch to the other side.

(https://i.imgur.com/bCQcCnO.jpg)

First thing to do is to apply any transformations made to the model. To do this, right click each node (starting with the node attached to the bone, in this case "x_pouch1", and then each child node until you have done the Editable mesh/poly) Transform, then Apply. This will make sure it mirrors across the bone, rather than across something else. After that, simply copy the piece and paste it on the same bone. I renamed the piece x_pouch2 for the sake of the tutorial, but it's not necessary.

(https://i.imgur.com/MBSrxKP.jpg)

Next step is to figure out which axis you're mirroring on. In this case I already knew it was the Z axis for the Pelvis bone, but an easy way to check is to open up the transform window and play with the numbers a bit (if they didn't start out zeroed out, you didn't fully apply everything). You're looking for whatever axis (x, y, or z) moves the object to the left and right. Once you're done, return the values to 0.

(https://i.imgur.com/6a35gxH.jpg)
(https://i.imgur.com/cVlPjJE.jpg)

Next, you'll right click the Editable Mesh/poly node and choose Transform> Scale Vertices. You'll then change the value of whatever axis to "-1.0000" (also, this should be the default, but Scale Normals should be checked.)

(https://i.imgur.com/H8Z5Xgp.jpg)

Well that doesn't look right. Don't worry though, it's normal, we just have one more step.

(https://i.imgur.com/iruVNH7.jpg)
(https://i.imgur.com/ZakTEwd.jpg)

Right click the Editable mesh/poly one last time and choose Mesh> Flip Faces.

(https://i.imgur.com/moVdVpS.jpg)

And we're done! As I said, super simple trick, but it saves a ton of time.
Title: Re: Mirroring pieces Tutorial
Post by: spydermann93 on May 06, 2020, 06:21:48 PM
huh, never thought of using a negative scale.

Then again, why would they include it in the tool if it did nothing?

Very handy, Tomato! Thanks!
Title: Re: Mirroring pieces Tutorial
Post by: BentonGrey on May 06, 2020, 07:58:33 PM
Huh!  Well, I bet this is going to come in handy.  Thanks, 'Mato!
Title: Re: Mirroring pieces Tutorial
Post by: Podmark on May 06, 2020, 10:19:01 PM
 :o
Title: Re: Mirroring pieces Tutorial
Post by: windblown on May 06, 2020, 11:53:25 PM
That's a cool find! I need to try it in the future  :thumbup:
Title: Re: Mirroring pieces Tutorial
Post by: SickAlice on June 22, 2020, 08:53:25 PM
Thank you. I was literally just thinking about it and considering bothering you in a PM. This frees up a lot of time for me, this one is for He-Man.

Edit: Oh wait, this for you're new technique? I can use this for other things but still need to know the long way to do it for He-Man. In that case I need to mirror the right arm to the left in one single animation from the clavicle out but need the nif to otherwise retain it's original positions for the rest of the keys. Any help would be appreciated, it's for his "I have the power" animation.

Edit: I've found a workaround. I am going to say I am interested in housing a keyframe tutorial by you if you're interested. I'd also be open to a texturing toot from you specifically as well since you have a handle on the finer points. I've been looking to beef up that section for some time and make it into it's own page. If anything it can just be typed in doc and screenshots included and I can cobble it together into a page. Likewise open to anyone else's tutorials for the sake of preservation and putting together a few basic and advanced ones on my end.
Title: Re: Mirroring pieces Tutorial
Post by: Tomato on June 26, 2020, 10:01:54 PM
If you want to take my tutorial and upload it to your page, go for it! I have no issues. Here's another very basic one I made fairly recently to help Jimeras with finding "missing" nodes in animation, and I can do one for the Sinestro method (which is not the same as what I did about, but I don't think would work for mirroring a single animation. You'd probably have to hand edit it at that point)

Quote from: Tomato
To put it in more visual terms:

(https://i.imgur.com/jwYRMhU.png)

This is what a keyframe.kf (at least a  :ff: keyframe set,  :ffvstr: sets are more complicated) looks like in nifskope. I've fully expanded the top tree of "Ranged_6" because that's where all the node names are. Your character.nif needs to have every node in that red box, with the exact same capitalization and spelling.

Usually you can ignore all the "Bip01" nodes because those are pretty consistent across all meshes (unless you're dealing with cape bones or VX meshes, those are exceptions). In this case, that only leaves one thing: "weapon" which is down on the bottom of the list.

In this case, because it's only one and there's no accompanying piece (plus the weapon node is useful for animations) it's just as easy to open the character.nif from Ms Marvel, copy the weapon node, paste it to Dazzler's character,nif, and save. Dazzler can now use the Ms Marvel ranged keys with no issues.

(https://i.imgur.com/JARTR8f.png)

This is a more complicated example, from Ren's GL keys (the ones with an aura). I was planning on making use of the "aura" for my Sinestro skope, but all the rest are pointless. Now, you can absolutely just go through and copy each node from Ren's GL mesh, but I didn't want a bunch of pointless extra pieces cluttering up the skope.

(https://i.imgur.com/knjlQWa.png)

As such, in the character node, I right clicked on the scene root, went down to "Node" and clicked "attach Node" and choosed a NiNode. Renamed that to "trail" and then right clicked that until I had all the nodes that corresponded to the list in the keyframes.nif. The result looks like this.

(https://i.imgur.com/nXnTe0D.png)
Title: Re: Mirroring pieces Tutorial
Post by: Tomato on June 26, 2020, 10:38:33 PM
So real quick, meant to do this ages ago, but here's a release of a mirrorer/Aura Sinestro, which this tutorial is based on.

https://mega.nz/file/PN9VQRYB#QIoTR8MVywFrwK1o-BV0OYa5TXwjuZshdDxKuAfgThk

QuoteSo mirroring the entire mesh to make a right handed mesh work properly with left handed keys is very similar to mirroring pieces conceptually. I recommend reading that tutorial first, then coming to this one.

(https://i.imgur.com/tjpjMV9.png)

First, open your mesh. We're going to do our test run on Sinestro, since he's the one I wanted to make left handed. I *highly* recommend doing any skoping you want to do first, saving a copy, and then the mirroring last. Right click your handle node (if there isn't one you can do this with the scene root, but handle's easier to work with)

(https://i.imgur.com/MdTmw98.png)

What you want to do is change your scale to -1, then change the "Y" in rotation to 180. Don't worry that the screenshot says -180 instead, in this case there's no difference and it'll automatically change when you type 180 anyway.

As with the mirror pieces tutorial, the resulting model is flipped inside out. You need to right click every piece in the skope, and select Mesh-> Flip Faces so that it's flipped back properly.

(https://i.imgur.com/bVMIZ9p.png)

Now, for some pieces (I've turned off the ring fx so you can see it doesn't affect the ring, but does affect the base mesh) there will be this weird darkening once they've been flipped. I'm not 100 sure why this happens for some pieces and not others (I think it has to do with whether they're attached via niskininstance or attached to bones directly) but for those, as shown above, simply right click the mesh piece and select Mesh -> Flip Normals.

(https://i.imgur.com/AbsSB2g.png)

And we're done! Left Handed Sinestro away!

Title: Re: Mirroring pieces Tutorial
Post by: SickAlice on June 26, 2020, 11:04:46 PM
Excellent, thank you. And yes I will upload it, like I said anything anyone wants to pitch my way. The hopes is if there's enough I can create sort of an indexed type of thing. Any shortcuts for future people coming into this are needed I think. If anyone wants at best just type it up and pack some screenshots, number them then mark where they should be in tutorial. I can slap together a page from that.