Vertex colour and paintjobs [SOLVED]

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

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

Riccardoman
Posts: 155
Joined: Thu, 9. Nov 17, 18:57
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Riccardoman » Thu, 27. Feb 20, 10:39

Really good interpretation of the argon centaur axeface
The x3 one doesn't translate very well in x4

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Axeface » Thu, 27. Feb 20, 17:31

I'm looking into this blurred edge between two vertex colours in-game issue. We've learnt that we can split the edge to make the colours sharp, or even bevel it to control how 'big' the blur is. But I was looking at the Argon Drill model - it looks like nothing has been done to the model to make its edges sharp (it does have split vertices but only some of them are split, not the whole edge along those sharp lines), yet it looks like this in game - perfectly sharp :gruebel: :gruebel:
Is this some special super power of 3dsmax?

Image

Thanks Riccardoman.

linolafett
EGOSOFT
EGOSOFT
Posts: 3363
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by linolafett » Thu, 27. Feb 20, 17:36

Blender also has this "magic", you just have to figure out how to properly export it.
Sadly i dont really know what the exporter pipeline is for you guys, so i cant really help :(
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Axeface » Thu, 27. Feb 20, 17:40

Ah ok, at least I can say its not something i'm doing wrong. Cheers

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: Vertex colour and paintjobs [SOLVED]

Post by BrummBear02 » Thu, 27. Feb 20, 21:14

https://www.nexusmods.com/x4foundations/mods/316

just press P in edit mode after u selected the faces u want to have a different color. then merge the nodes again. then colour it.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Axeface » Thu, 27. Feb 20, 23:56

BrummBear02 wrote:
Thu, 27. Feb 20, 21:14
https://www.nexusmods.com/x4foundations/mods/316

just press P in edit mode after u selected the faces u want to have a different color. then merge the nodes again. then colour it.
Trying this now but I seem to get the same problem, a blurred edge in-game. To clarify, you mean seperate (P > Selection) the mesh where I want a hard line, then join the objects again (cntrl J), then Merge vertices (alt M) then apply vertex colors?

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: Vertex colour and paintjobs [SOLVED]

Post by BrummBear02 » Fri, 28. Feb 20, 00:40

Axeface wrote:
Thu, 27. Feb 20, 23:56
BrummBear02 wrote:
Thu, 27. Feb 20, 21:14
https://www.nexusmods.com/x4foundations/mods/316

just press P in edit mode after u selected the faces u want to have a different color. then merge the nodes again. then colour it.
Trying this now but I seem to get the same problem, a blurred edge in-game. To clarify, you mean seperate (P > Selection) the mesh where I want a hard line, then join the objects again (cntrl J), then Merge vertices (alt M) then apply vertex colors?
no, you dont merge verticles. u dont remove doubles. u want them there to get the sharp edge. X4 uses Vertex paint. Just imagine every verticle beeing a colored light bulb illuminating every connected room(faces) in the light bulbs colour.

https://cdn.discordapp.com/attachments/ ... ot_639.png

You press P to rip those faces out of the mesh and create a seperate node with them in it. when u rejoin the nodes the faces have double verticles in the place where they were connected previously. i dont know if there is some better way to do this. im always thankfull for advice in blender. this is just a way to seperate faces from each other and not **** up the mesh.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Axeface » Fri, 28. Feb 20, 00:48

Ah I see what you mean now thanks for the advice. I was doing something similar by using split on the edges. But the same problem remains unfortunately, I get the hard edge for the paintjobs but the lighting between the 2 faces is not smooth.

Edit: Putting an image to better explain. Basically having to seperate vertices creates a hard edge with lighting and destroys a nice smooth finish. I want smooth lighting but hard edge on the paintjob (as you can see with the drill image above).
Image

linolafett
EGOSOFT
EGOSOFT
Posts: 3363
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by linolafett » Thu, 5. Mar 20, 11:40

What kind of exporter is used?
Take a look in the exporter options, if there is something regarding vertex data.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Axeface » Thu, 5. Mar 20, 18:06

linolafett wrote:
Thu, 5. Mar 20, 11:40
What kind of exporter is used?
Take a look in the exporter options, if there is something regarding vertex data.
Im using the in-built blender collada exporter, no options about vertex colours, heres all the options. Then the dae gets run through the XRconverters application to make the xml/xmfs etc.
Image

Ive found a 3rd party 'better collada' plugin for blender, i'll see what that has later. Edit: Doesnt have any options for vertex colours either.

linolafett
EGOSOFT
EGOSOFT
Posts: 3363
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by linolafett » Fri, 6. Mar 20, 10:41

Ok, then i would think that there is really no way to get this out of blender with vcol not smoothed out :(
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

User avatar
Shuulo
Posts: 1629
Joined: Mon, 14. Apr 08, 17:03
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Shuulo » Fri, 6. Mar 20, 11:28

linolafett wrote:
Fri, 6. Mar 20, 10:41
Ok, then i would think that there is really no way to get this out of blender with vcol not smoothed out :(
Any info on the modding tools then? :)
I remember it was promised to be released somewhere along 3.0

linolafett
EGOSOFT
EGOSOFT
Posts: 3363
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by linolafett » Fri, 6. Mar 20, 14:24

As far as i can recall we did not promise a mesh exporter.

We are currently working on a Blender pipeline in house, as we are trying to switch away from 3dsMax to Blender this year.
It would be great if that pipeline could then be exposed to the modders, but i cant really promise anything, as i am not knowing all the details behind it (there are databases and converter tools involved which are happening after the collada export from blender).
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

BaStFan
Posts: 5
Joined: Sun, 15. Mar 20, 17:01
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by BaStFan » Sat, 28. Mar 20, 01:55

Axeface wrote:
Fri, 28. Feb 20, 00:48
...... Basically having to seperate vertices creates a hard edge with lighting and destroys a nice smooth finish. I want smooth lighting but hard edge on the paintjob (as you can see with the drill image above).
I'm just getting familiar with the modding tools and X4 file structure but I am very familiar with blender/general modelling technics and texturing. What you're looking for is custom vertex normals. This can give you smooth edges while being a separated face.
You can copy normals orientation from instanced geometries with edited normals.

In Blender one way to achieve this is to use the DataTransfer modifier. Here's a good description of this modifier https://docs.blender.org/manual/en/late ... nsfer.html
Now I haven't checked wether or not it's going to work in X4, but it actualy should. Haven't come over this issue yet my self.

And by the way you can use V to split edges or Y to detatch faces, this way you won't have to re-join the two geometries again, as of P, wich separates the geometry.

Hope I get your problem right and you can solve it this way, if you didn't already :)

linolafett
EGOSOFT
EGOSOFT
Posts: 3363
Joined: Mon, 26. Mar 12, 14:57
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by linolafett » Sat, 28. Mar 20, 11:33

As far as my testing went: The Blender Collada exporter does not support custom vertex normals.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff

BaStFan
Posts: 5
Joined: Sun, 15. Mar 20, 17:01
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by BaStFan » Mon, 30. Mar 20, 05:06

If so than I guess the only way to get a sharp color edge on a smooth surface is to use textures. A uniform color can be sourced from just a couple of pixels on the UV map. The texture size can be minimal.
Will get into it my self soon.
Good informations here, thanks :)

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Axeface » Mon, 30. Mar 20, 16:38

Thanks for the info guys.

aurumgallente
Posts: 121
Joined: Sun, 14. Jun 20, 14:45
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by aurumgallente » Thu, 29. Oct 20, 16:10

Alexface, can you explain how to properly use default hulltexture and hullpattern materials? When I use those materials and part has 2 channels, it always becomes rusty as old bucket. So I have to remove all channels except 1st one and I can't apply paint jobs for this par of the ship.

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Re: Vertex colour and paintjobs [SOLVED]

Post by Axeface » Fri, 30. Oct 20, 13:29

aurumgallente wrote:
Thu, 29. Oct 20, 16:10
Alexface, can you explain how to properly use default hulltexture and hullpattern materials? When I use those materials and part has 2 channels, it always becomes rusty as old bucket. So I have to remove all channels except 1st one and I can't apply paint jobs for this par of the ship.
I remember this happening on my ships too but I cant remember exactly what caused it, I cant check right now but I THINK that happens when the vertex colour for any particular mesh is pure white (cant remember whether it was in the control channel or the colour channel). Its probably in the shader for when the devs want rust?

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: Vertex colour and paintjobs [SOLVED]

Post by BrummBear02 » Fri, 30. Oct 20, 22:14

aurumgallente wrote:
Thu, 29. Oct 20, 16:10
Alexface, can you explain how to properly use default hulltexture and hullpattern materials? When I use those materials and part has 2 channels, it always becomes rusty as old bucket. So I have to remove all channels except 1st one and I can't apply paint jobs for this par of the ship.
if the second channel is white your ship appears rusty. just paint everything black if u dont want to use paintjob areas.

viewtopic.php?f=181&t=414599 check this out maybe
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

Post Reply

Return to “X4: Foundations - Scripts and Modding”