Help with custom turret creation
-
hey guys.
I had been swimming in some old forum threads to figure out a way to do this and i came across a video that sushi made on the subject. which is here
http://www.youtube.com/watch?v=n60-xrTOjMI
I was following the tutorial to get the main gun on my latest ship into game so i can start playing with the actual weapon itself.
obligatory pretty picture
OK so im trying to get this gun into my airship. im following the video precisely.
I have 2 parts, the base and the barrel, i have named them as such in both Maya and in Milkshape.
I export the model from Maya as OBJ and import it to Milkshape 1.8.2 which thanks to bob and some digging around i was able to fix up.
**Maya scene pic
Milkshape Scene Pic
**The next part I wasnt actually sure about, and thats the positions of the two objects and where they need to be on the grid… i looked at the video and decided to make the barrel in the center of the milkshape scene, with its pivot in the middle. (since ive heard that a lot of times flying around this thread and that thread.)
I add the texture and then exported the pair just like sushi says in the video.
lod level 0, back to front selected, slider dragged to 1 so the model didnt scale different to how it was. and make the number of groups to 2.
no problems there it exports just fine.
import it into HardCMP so i can put on the hardpoints but i only get the barrel to show up, and I don’t understand why.
can anyone help? i’ve attached the OBJ, MTL, and the DDS texture i used also.
-
Seems to have worked fine for me, no problems.
Zip file containing .cmp and .mat attached below.
Hope this helps!
Rik
-
lol, couldn’t wait six hours for me to get home eh?
-
Bobthemanofsteel wrote:
lol, couldn’t wait six hours for me to get home eh?well after talking with you on skype i knew i would have to have gone to bed before then, so i wrote down what i had done so that you would see it. i posted a message on skype but they didnt reach you. no disrespect
rik_starkiller wrote:
Seems to have worked fine for me, no problems.Zip file containing .cmp and .mat attached below.
Hope this helps!
Rik
i don’t understand how people keep not having any issues doing the same things im doing, its really frustrating lol…
Rik do you think you can explain how you did what you did please. I appreciate the files you gave, but it means im still in the dark about how to do this.
-
Hidamari wrote:
no disrespectlol no sweat, Rik did what I would have anyway.
-
Hidamari wrote:
i don’t understand how people keep not having any issues doing the same things im doing, its really frustrating lol…Rik do you think you can explain how you did what you did please. I appreciate the files you gave, but it means im still in the dark about how to do this.
You are using old version of exporter!
Grab the P1p3r’s version and try to manage that it shows in MS.
Having problems, try this solution (still no reports is this a fix)
If not, consider changing MS versions you use until it shows up.
Many had troubles so far, but once you succeed, no troubles anymore. -
My bad should have told you!
I’m using Milkshape 1.8.5
CMP Exporter v0.3
MAT Exporter v1.0I opened up the .obj
removed the default group that always seems to appear with a .obj import
deleted all the materials except the one which was assigned to the cannon
imported the .DDS
changed the ambient colour from Black to White
exported with the following settings:Orientation: back to front
Model Type: Weapon
LOD: 0
Scale Down: 1.000000
Number of Groups: 2
Group Quantities:
1 - 1
2 - 1Before clicking Continue on the export I always Save Settings into a new file.
Exported the MAT file.Now I know some people don’t like CMP Exporter v0.3 because they’ve had scaling issues with it, but I’ve not had any problems/issues as yet - so as long as it continues to work I’ll use it for exports from Milkshape.
Hope this helps!
Cheers,
RikPS - really like the ship & cannon great work!
-
Thanks Rik
I have another question regarding the weapons themselves.
Ive set the turret angles on the HpConnect and the HpTurret hardpoints so that the horizontal sweep angle is 0.
making the weapon fixed, however, the gun can still shoot in a large coned area from the center of the HpFire01 hardpoint.
which is not really what I want.
I understand to make the weapon usefull i will need at least some kind of give for the fire angle because nobody will be able to get that thing 100% pin point accurate without a lot of time being spent.
but it needs to be much less than it is currently.
so in short
even though the weapon is fixed pointing in specific direction, the bullets are capable of leaving the barrel at like up to 45* angles. which looks really silly.
how do i stop this happening?
-
No problem.
Try the following settings:
in the [Munition] section:
force_gun_ori = truein the [Gun] section:
turn_rate = 0I think that should do the trick.
Cheers,
Rik -
rik_starkiller wrote:
No problem.Try the following settings:
in the [Munition] section:
force_gun_ori = truein the [Gun] section:
turn_rate = 0I think that should do the trick.
Cheers,
Rikmm… the “force_gun_ori = true” meant that the orientation of the weapon fire was completely fixed to the gun. since the gun has such a limited arc of only 15 degrees up or down and no sweep angle, i still need the weapon to be a bit more flexable without having the turret itself turning, yet still having it being controlled.
so say 10 degrees instead of 45 degrees from the current angle of the barrel.
oh and the Turn rate is how fast the turret tracks, or in this guns case, how fast it moves up and down. so that didnt help but was interesting to know.
-
Try MUZZLE_CONE_ANGLE in constants.ini
-
oh yeah that’s the bunny. Cheers Timmy, forgot about that one!
-
with regards to the hitbox for turrets and other mounted equipment.
how do you make the hitbox move with the turret?
as in a turret is made up of the turret and a barrel, how do you connect the model barrel to the hitbox barrel? is it automatic?
[EDIT]
I have also realised that since Rik did all the work on this for me last time, I have no idea how to get a HpConnect or a HpFire01 hardpoint.are they fixed hardpoints or revolute? i dont see either of these in the lists, the closes is a SpConnect but when i open existing freelancer models the hardpoints themselves seem to be a darker colour red also i dont know if thats significant.
please help, this is important.
-
HpConnect is revolute, so you can set the arc of the turrets rotation
HpFire0x is fixed
HpMount is also fixed, I think this Hp is only used for display in shopsPersonally I find it easier to cut’n’paste Hardpoint entries between two models using adoxas utf->xml convertor. But if you dont like xml I believe the UTFeditor 3.0 supports drag and drop between open model files. Select a hardpoint you want in one model window, drag it to the correct node on your own model, correct its position, job done.
-
Okay I seem to have gotten the turret to turn ingame, I was wracking my brain and going back and forth between ini files, when I found the line
auto turret = false
in the weapon_equip for the turret, so i was like “hmmmmmm” changed it to “true” and it works better now.
only thing is now i have another problem
Ive managed to get my platform to attack me, but the main gun on top seems to think the back is the front, so when it stops “facing” my ship it still cant shoot, i was like “huh?” i flew around to the back of the platform (the main gun only turns at 4 degrees per second) and then i jumped out of my skin because it wiped me out in 1 hit.
how do i tell the gun to be the other way around is there a way to turn the turret around?
also, the barrel is inside the turret and doesnt elevate as far as i can see…
its like this at the moment
also the texture on my platform and turret at the moment both need to be upside down to render the right way up in game, however if they are upside down they render incorrectly in HardCMP, its really confusing.
-
Convert your texture to a dds, the upside-down issue only happens with tga textures
-
how do i tell the gun to be the other way around is there a way to turn the turret around?
HpFire01 maybe 180 degrees out?
i really do need help with this, how do i get the barrels to actually elevate normally and how do i get them into the correct position.
Did you export the turret as a weapon? animated barrel/gun part must be assigned to the “rev” node. This is automatically done (at least with Ms CmpExpoter 0.3),
Once you have that you can then open the model in UTFEditor and “Edit Rev Data” to alter the “Origin” - the point at which the barrels pivot