[TOOL] Object Y Rotation Randomizer

BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
Decided to release this little tool I made. Not super powerful, but it can be very helpful if you need to randomly rotate a bunch of objects around the Y axis.
107f4d1b74aeb912c5def1b0f9ba9a.jpg

https://www.dropbox.com/s/ebgdnyctd4ma2g9/SparkObjectRotationRandomizer.jar?dl=1

Installation:
1) Drop the JAR file into your Natural Selection 2 directory (not "ns2", the one up above that level)
2) Create a BAT file with the following text in it (including quotes): "%~dp0\SparkObjectRotationRandomizer.jar" save this BAT into the same directory as the JAR from step 1.
3) Add the external tool in the editor. This one has no arguments, so for "command" just navigate to the BAT, and then make sure you surround the name with double quotes. Here's what mine looks like:
392904d15b4d8538d0141767844390.jpg
4) Ensure you have JRE 8 (Java Runtime Environment 8) installed. http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Usage:
1) Select the props you want to randomly rotate.
2) Ctrl + X to cut them.
3) Run the tool.
4) Ctrl + V to paste them. They now have a random rotation in the Y axis (yaw) field.

Like with my quick arc range tool, you have 30 seconds after running the tool to paste the data. The reason being that typically, whenever an application exits, if it has modified the clipboard, the clipboard is cleared (and spark is no exception, by the way). Now, rather than allowing tons of instances of java.exe to clog up your system, I have made it so the program will close 30 seconds after modifying the clipboard. Plenty of time. :)

Comments

  • MasterGMasterG gmfbst Join Date: 2003-08-24 Member: 20169Members, Squad Five Blue
    That's pretty cool! Funny that it's defined as the Y axis though, usually it's referred to as Z axis. Not that it matters, it's just unusual. Good job anyway! Might use this while doing polish on Mineral later this year.
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    MasterG wrote: »
    That's pretty cool! Funny that it's defined as the Y axis though, usually it's referred to as Z axis. Not that it matters, it's just unusual. Good job anyway! Might use this while doing polish on Mineral later this year.

    It's actually just one of those things that varies from 3d package to package. Blender uses Z up, Maya uses Z up, Spark of course uses Y up, Lightwave3D uses a left-handed y-up system... the list goes on. I can see both sides of the argument: person's POV, they see X as side to side, Y as up and down, and Z coming towards them/away from them, but if your perspective is say... a top-down view of a map, well then it makes more sense to keep X as side to side, Y as up and down, and Z coming out of the screen at you, which of course flips around the Z and Y axes. That's fine, not a huge issue, something I've learned to live with.

    BUT! What is NOT okay is what spark does. WHY, in the name of Tom Selleck's mustache, is the rotation order for props listed in the order Z, X, Y !!!!???? That's not just a convenient order put in place for the editor (it's not convenient...), the angles are written in that order IN THE FILE! I would have had this tool finished in the first draft if I didn't have to realize that the angle I needed to change was the 3rd float in the angle triplet, rather than my very reasonable guess that the Y axis would indeed be the SECOND value. Hehehe not really that mad though, not a huge deal, but WHAT THE HELL, MAN????
  • MasterGMasterG gmfbst Join Date: 2003-08-24 Member: 20169Members, Squad Five Blue
    I get you. It's just that every 3D app I've ever used has listed Z as up down. But as mentioned it doesn't even matter and this tool can be very handy, specially for plants and such.
  • Vert^Vert^ Join Date: 2013-01-22 Member: 181227Members
    I don't have much time at my pc atm, but I just want to say Biege, keep up the excellent additions you keep bringing !! <3
Sign In or Register to comment.