taniwha / io_object_mu

Python .mu reader/writer and blender import/export addon
GNU General Public License v2.0
120 stars 51 forks source link

glith on mesh part in ksp (full export with blender) #44

Open Massetstephane opened 3 years ago

Massetstephane commented 3 years ago

hi ! I followed this tuto under blender everything worked well but in ksp there are small display defects on the part in ksp (1.10.1, blender 2.90.1) some example : https://imgur.com/K8woS68 https://imgur.com/Wn1cvyy we see very slightly the edges of mesh on the texture, and the transparency of the pieces lets the faces be seen, while the squad parts are completely transparent without letting the edges see.

Rodg88 commented 3 years ago

looks like you might have duplicate faces? try selecting all vertexes, and press 'x' -> merge by distance.

Massetstephane commented 3 years ago

@Rodg88 thk !, but it's the fisrt thing i verify when i make mesh in blender . tested a variante shaders based on part imported in squad folder , there are more thing in colors tab and Float3 tab. ex _Rimcolor and _RimFalloff and i added all to the ksp shaders provided by the pluggins. in vab the artifact seem less visible, but i have yet the same thing showed on the first picture. steph. this is the result of modified shaders KSP/bumped specular, I made the same textures dds as ksp, grey normal etc. abd added all options in colors tab and float3 tab. tank no artifact, and rendering in the game looks better. but it requires a lot of work on dds textures to look like the texture squad, i use photoshop 2020 and pluggins dds nvidia, but that's not the subject!, the pluggins works well is great.

Rodg88 commented 3 years ago

I have also had some visible edges like the first pics, but never that much, and without the extra faces when the part is transparent, which is why I guessed extra faces. Seems to just be a floating point error where two vertex positions that should be the same become slightly off.

I have previously fixed it by separating/ripping an inner section of a mesh from the rest of the mesh, but it might have just been due to luck that time

Massetstephane commented 3 years ago

@Rodg88 thk. good I tested for more than 2 hours everything that was possible, triangulation method, arrangement of objects, and lots of other stuff, I even redone a model..... And I always glitch on the faces in the vab, transparently. the worst is that on the youtube tutorial it does not have this problem. the model works it's true, but ...... I like to know the why of how lol bye !

edit 17/11/2020 i test the utility Sarbian's DebugStuff , as indicate in the wiki. on a part squad when Meshes and colliders are checked, only the meshes appears, to see the colliders if must uncheck meshes, with my model the collider and the meshes appears at the same time. more in the model squad there is "MeshFilter - collider" in the mesh collider. in my part i have only "MeshCollider - name of collider" not the "MeshFilter". I think it's the collider that causes the artifacts on the faces transparently, because it appears at the same time as the Meshes seen with the pluggin of Sarbian. In blender I test the Option Separate in the Tab Mu Properties without result.

Rodg88 commented 3 years ago

It seems like using unity/part tools does fix it, and I’ve talked with taniwha about it, so it’s getting looked into.