[Help] I need some help on finalizing a new ship mod

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Xenon472
Posts: 162
Joined: Fri, 19. Jun 09, 20:07
x4

[Help] I need some help on finalizing a new ship mod

Post by Xenon472 »

Hello Everyone!
I am trying to make a ship mod (my first one) to give the Pioners some ships of their own, I wanted to give them a destroyer whith a not so military look and thought about kitbashing the L miner with some station part and the auxiliary ship "sail" to make a light destroyer, I followed brummbear's guide and managed to get the ship in-game and give it a collision that matches the new shape, but something went horribly wrong in the conversion, while the ship looks perfect on blender it has some parts that are way bigger and not in the right place in-game, moreover, the textures on the kitbashed parts are way uglier and the paintjobs, while look sharp on blender are blurred in-game :headbang:
does anyone have any ideas on why this is going on?
(the kitbashed parts are MRE production parts + the sail/radiator of the auxiliary ship)

how it looks in blender: (i moved lod 0 to show the sharp paintjob channel)
https://ibb.co/41bVmyL

how it looks in-game: (the sail structure is fine, but the sail itself is larger and not in place, not to talk about the other floating pieces of the MRE parts)
https://ibb.co/VBvZ2Ks
https://ibb.co/kGSBxLV
https://ibb.co/SdnjybZ

any help would be greatly appreciated :D
Xenon472
Posts: 162
Joined: Fri, 19. Jun 09, 20:07
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Xenon472 »

little update:
I think the misplaced parts have something to do with blender transformations, after i reset the transformations (CTRL+A -> all transformation) the parts disappeared in game XD, so i did not fix it but at least got a clue on the problem.
on blender it still shows every piece where it should be though :gruebel:

on the texture part I am still clueless, here is a close up of the problem:
https://ibb.co/88gt3BD
(also the "hulltexture" is plain gray for some reason)

here it shows the sail disappearance after just changing the transformation:
https://ibb.co/wwXg6Dw
Max Bain
Posts: 1463
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [Help] I need some help on finalizing a new ship mod

Post by Max Bain »

uff... I can not help you with everything.

1. The placement of the parts can be fixed by applying the locations in blender. Go to Object -> Apply -> Location. then the origin of the selected object will be the origin (0.0.0). In the xml file you simply need to remove the position part of the objects you have applied the location. This should fix the location bug on your model.

2. The texture thing looks strange. I had something similar when I forgot to remove the wreckage node in the xml file. Maybe you somehow managed to make the collision model visible?

3. Parts that are way bigger: Have you played with the scale parameters in blender? Dont do this. Only use the scale option on the mesh itself (yes, this way you have to do it for every part and LOD).

I hope I could at least help you a bit.
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link
User avatar
Axeface
Posts: 3034
Joined: Fri, 18. Nov 05, 00:41
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Axeface »

1. You need to apply all transforms for the objects, if the origin of the objects is not at 0, 0, 0 (and you dont compensate with location coords in the xml) they will be misaligned.

2. The texture issue looks like it could be the same issue I was having with Split Vendetta textures here which stumped me for over a year. Please try this, add 'zz' at the start of your mods folder name in extensions, I believe that if your mod calls a texture from a DLC but is loading into the game before it this can happen. Adding zz makes your mod load after ego_dlc_terran. Might work, might not, this took me over a year to get working and im still not sure if it was even this that fixed it.

3. The blurry vertex paint problem. You need to seperate the UVs where you want a perfect line, the devs have an option in 3dsmax that we dont have in blender. Select the UVs you want the red line on and move them away from the seam a little bit to create a gap between the red and grey bits.

If in doubt maybe upload your blend file so we can take a look?
Gallery of my X ships and fanart eg, Boron Megalodon
My wishlist
Disclaimer: Axeface will ignore 'don't like it don't use it' responses :wink:
Xenon472
Posts: 162
Joined: Fri, 19. Jun 09, 20:07
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Xenon472 »

Max Bain wrote: Wed, 31. Mar 21, 14:56 2. The texture thing looks strange. I had something similar when I forgot to remove the wreckage node in the xml file. Maybe you somehow managed to make the collision model visible?
hmm do you mean the "wreck="part_main_wreck" part in the xml? i tried removing it but nothing changed unfortunately
Axeface wrote: Wed, 31. Mar 21, 17:00 If in doubt maybe upload your blend file so we can take a look?
I'll try what you and Max Bain told me as soon as I get to my pc, in the meantime here are the blender files :D :
https://drive.google.com/file/d/1Q90fCb ... sp=sharing (all the part placed into position but not yet joined together)

https://drive.google.com/file/d/1B6cxGm ... sp=sharing (the latest test)

I'll keep you informed if I manage to fix something hahaha
Axeface wrote: Wed, 31. Mar 21, 17:00 2. The texture issue looks like it could be the same issue I was having with Split Vendetta textures here which stumped me for over a year. Please try this, add 'zz' at the start of your mods folder name in extensions, I believe that if your mod calls a texture from a DLC but is loading into the game before it this can happen. Adding zz makes your mod load after ego_dlc_terran. Might work, might not, this took me over a year to get working and im still not sure if it was even this that fixed it.

the mod is called just 'yokohama for now so it should be loaded after ego_dlc_terran :(
Max Bain
Posts: 1463
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [Help] I need some help on finalizing a new ship mod

Post by Max Bain »

Xenon472 wrote: Wed, 31. Mar 21, 22:50
Max Bain wrote: Wed, 31. Mar 21, 14:56 2. The texture thing looks strange. I had something similar when I forgot to remove the wreckage node in the xml file. Maybe you somehow managed to make the collision model visible?
hmm do you mean the "wreck="part_main_wreck" part in the xml? i tried removing it but nothing changed unfortunately
No, I often had the wreck model as a normal part. Something like name="part_main_wreck" or so. But it seems this is not the case in your mod.
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link
Crekkan
Posts: 26
Joined: Tue, 10. Dec 13, 22:32
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Crekkan »

I can't help but I just wanna say that I really like what you've come up with and hope you'll be able to sort out the issues!
Xenon472
Posts: 162
Joined: Fri, 19. Jun 09, 20:07
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Xenon472 »

update:
ok I started again from zero and I fixed the texture issue...somehow XD
most likely the first time something went wrong during the modeling, and this time it worked hahaha
now to fix the placement issue! :D

p.s.
the texture on the MRE part is way brighter than it should be, how can I make it darker as the rest?
https://ibb.co/PDMwLfN
https://ibb.co/8mPrBM6

EDIT:
ok, I don't get how to fix the position and scale XD
I tried to apply the transformations but then the parts just disappeared in-game :headbang:

here is the current blender test file:
https://drive.google.com/file/d/15vBa-o ... sp=sharing
User avatar
Axeface
Posts: 3034
Joined: Fri, 18. Nov 05, 00:41
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Axeface »

For the paint issues did you set up the ship as explained here?
Gallery of my X ships and fanart eg, Boron Megalodon
My wishlist
Disclaimer: Axeface will ignore 'don't like it don't use it' responses :wink:
Xenon472
Posts: 162
Joined: Fri, 19. Jun 09, 20:07
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Xenon472 »

Axeface wrote: Thu, 1. Apr 21, 03:24 For the paint issues did you set up the ship as explained here?
Yup, i used only white and red on the first channel because terran ships dont use the secondary paint mod color (green)
(I have yet to split the edges to make the Sharp lines but that is the last step)
User avatar
Axeface
Posts: 3034
Joined: Fri, 18. Nov 05, 00:41
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Axeface »

Xenon472 wrote: Thu, 1. Apr 21, 11:25
Axeface wrote: Thu, 1. Apr 21, 03:24 For the paint issues did you set up the ship as explained here?
Yup, i used only white and red on the first channel because terran ships dont use the secondary paint mod color (green)
(I have yet to split the edges to make the Sharp lines but that is the last step)
Edit 2: Im not finding the time today to investigate the terran ships :/ But its strange because the katana only has 1 vertex channel, that is weird and I dont understand how the game knows where to apply paintjobs for them if that is the case. They might have special code for them alone.
Edit: I went back and checked and you are right they are setup with grey not green, perhaps the problem is that you put pure white rather than the darker (0.780 ish value) grey they are using? Im looking at the Katana and while it looks like the base is pure white, most of the ship has been darkened a lot.
They do use the green, you need to set the ship up with the green for any paintmods to work properly, including the default empire themes. The only ships that only use one colour (red) are split ships.
Gallery of my X ships and fanart eg, Boron Megalodon
My wishlist
Disclaimer: Axeface will ignore 'don't like it don't use it' responses :wink:
Xenon472
Posts: 162
Joined: Fri, 19. Jun 09, 20:07
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Xenon472 »

Axeface wrote: Thu, 1. Apr 21, 14:52 Edit: I went back and checked and you are right they are setup with grey not green, perhaps the problem is that you put pure white rather than the darker (0.780 ish value) grey they are using? Im looking at the Katana and while it looks like the base is pure white, most of the ship has been darkened a lot.
I tried making it darker but I had mixed results.
on some paintjob it's fine, while on others is darker, and in others is still brighter :gruebel:

https://ibb.co/GvVwNhy fine
https://ibb.co/qY2BcZ6 darker
https://ibb.co/G7Q4dNP brighter

EDIT:
YAY I finally fixed the texture!, well I didn't really fixed it... I assigned another Terran material that works better with the paintjobs :mrgreen:
(p1terranXter_p1_hullpattern_01_b instead of p1terranXter_p1_hullpattern_01)

now I have to fix the placement issue... i'm sure it's something stupid but i can't get around it XD
Xenon472
Posts: 162
Joined: Fri, 19. Jun 09, 20:07
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Xenon472 »

I cant solve the problem of the position of the parts, if i try ti manually set the origin to 0 0 0 it does nothing, If I apply all transformation to the objects they just disappear (my guess is that they become smaller and end up inside the model, but I have no proof)
It's the first time I use blender so I looked online on how to apply all transform,
Just to be sure this is what I did:
I selected the node, pressed CTRL+A, selected all transform, than did the same with every Lod node, and than with every mesh inside each Lod node, is it the correct way to do it?
Angsaar
Posts: 151
Joined: Thu, 7. Mar 19, 14:03
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Angsaar »

Hey! BrummBear asked over Discord if you could provide a blender file for someone to take a look at for you.

That's an excellent looking ship, btw! I'd love to see more ships with sails too.
Xenon472
Posts: 162
Joined: Fri, 19. Jun 09, 20:07
x4

Re: [Help] I need some help on finalizing a new ship mod

Post by Xenon472 »

Angsaar wrote: Sun, 4. Apr 21, 00:24 Hey! BrummBear asked over Discord if you could provide a blender file for someone to take a look at for you.

That's an excellent looking ship, btw! I'd love to see more ships with sails too.
hey! you are right i completely forgot to post it here sorry XD

here is the test file i am working on, it has only one sail and one "wing" because i tryed to keep it simple to make the various tests:
https://drive.google.com/file/d/1HWG-PO ... sp=sharing .blend
https://drive.google.com/file/d/1TnQYwU ... sp=sharing .blend compressed
https://drive.google.com/file/d/1gOeO9O ... sp=sharing .dae

if all goes well i plan on making all 3 variants of the ship (sentinel ,vanguard and raider) , each differnt loking but they will all have the sail :mrgreen: (this one is the sentinel version :wink: )

Return to “X4: Foundations - Scripts and Modding”