Jump to content

collider materials


Recommended Posts

sorry for asking this, maybe it's too easy and I should have found it myself... but I didn't find it...

my problem is, that I created a part in blender and a collider for it (in fact, I did first import a stock object and then built my own objects the same way which includes that I used the same settings for all objects)... they are overlapping (of course) and now the problem is, that (because they are very similar) everything is flickering, when I move those things around in blender... and when I import this to unity, everything seems to be ok... but, after importing it in KSP those parts start flickering again... I guess that's because of my wrong selections of ?? for the collider... but what do I have to set? ... I did remove the "Mesh Renderer" from the collider in Unity and I though "fine, should be invisible now" ... but: still flickering... what do I have to set? ... I also learned, that I have to set the "Diffuse: Intensity to 100%" for the object to show up correctly in KSP... so I guess it has to do with something similar here

Link to comment
Share on other sites

Hi if you've deleted the mesh render as you say then indeed there should be no Z fighting, that is what i think you are seeing,  as it's not the collider I suspect that you've imported the original (whatever you copied) and cloned model as one object,

4 hours ago, Rudolf Meier said:

they are overlapping (of course) and now the problem is, that (because they are very similar) everything is flickering, when I move those things around in blender

 

4 hours ago, Rudolf Meier said:

in KSP those parts start flickering again

This above is a good indicator, there's no reason to keep the pattern model past the initial modelling stage,  and you should definitely have deleted it long before you came to the whole export to unity import to KSP process. 

Link to comment
Share on other sites

By original I mean

17 hours ago, Rudolf Meier said:

(in fact, I did first import a stock object and then built my own objects the same way

The stock object you imported originally.

By clone

17 hours ago, Rudolf Meier said:

and then built my own objects the same way which

I mean the object/s created by you, that use the original model as a template.

----------------------------------------------------------------------------------

Basic modelling in any app usually goes like this.

Make a Cube,  correctly center and orient the cube in the view space (0'0'0)

Unwrap the cube UV's

Create UV map and texture

Apply to model

Save model

Export model to unity

Create empty unity GameObject and align to zero zero zero

Drop imported cube on  to GameObject

Give GameObject  a Name

Apply box collider to cube

Add part tools component to Game Object

Fill in filepath and model name change export texture type to PNG

Press export button

create basic cfg

Load............Smile/cry as appropriate

While i don't use blender, there are a million tutorials for it and many in relation to KSP.         But do yourself a favor get a grasp of the basic shapes before diving into complicated shapes,  learn how to texture that cube , once you can texture a cube the rest comes fairly easy.  Simple rockets and (basic)  rocket parts are simple stupid modelling, cylinders and cones , combine cylinders cubes and cones and you can build anything you want :)

Edited by SpannerMonkey(smce)
Link to comment
Share on other sites

1 hour ago, SpannerMonkey(smce) said:

Apply box collider to cube

Yes... but here's the point I want to do differently (sorry if I didn't describe this precisely enough)... I want to use a second object that I modeled in blender as a collider.

And by the way: it's working... the only problem is, that it seems, that my collider-object is visible too... and I've no idea how to make this collider a collider only.

Link to comment
Share on other sites

Hi. if you removed the mesh render it should not be visible,. without the mesh render there is no way it can be. Which is as I mentioned only leaves you with doubled faces or the original and cloned model imported as one. I fully understand what you are trying to do. 

16 minutes ago, Rudolf Meier said:

I want to use a second object that I modeled in blender as a collider.

There's really no need for that if it is a simple shape ,  custom colliders are needed for more complex shapes, especially those in which there would be concave elements

ie  This has a unity convex mesh collider applied

sH5BUvQ.png

Whereas this part has a custom collider as the cockpit glass is much narrower than the main hull tube, so a convex mesh collider is not used because it  would bridge the gap and the collider would not truly reflect the shape of the cockpit

Mrzkp5n.png

 

Link to comment
Share on other sites

I know I don't need custom colliders. It's only that I wanted to learn how to make them. Just that I know how it works :-) ... on my way of finding out how the whole modding stuff works, I run into such questions and then I want to understand it. That's why I try to do things I don't really need for the current problem.

But at the moment I'm working on an other "interesting problem" ... the question is: can I create a collider for an object that is not part of the object and not a child of it. So, is there a way to couple objects somehow that I can detect collisions and stop movements for robotic arms (because of the way ksp handles this it has to be done without child objects)... anyway... it remains interesting. ... one of the things I try to do is to fix all problems in infernal robotics and this is quite a challenge... but it's possible.

Link to comment
Share on other sites

3 hours ago, Rudolf Meier said:

I try to do is to fix all problems in infernal robotics and this is quite a challenge

2 hours ago, Rudolf Meier said:

the question is: can I create a collider for an object that is not part of the object and not a child of it

Nope and what problems as I have none.

And i strongly suggest that you look into infernal robotics before endeavoring to make your robot parts and arms. And try making compatible parts first, which is not that easy considering the simplicity of the basic parts  (I make them btw and have many robotic parts scattered through my mods)

Things you may not know. You cannot create a animated part and have another part move with the animation, all nodes and attachments are to the root object not the animation.  SO for a robot arm to function with multiple joints you need a plugin, with a considerable amount of code required to break and remake joints etc

Spoiler

 

bkf3zY6.pngNxK8BkY.jpg

 

 

 

Link to comment
Share on other sites

Well... just to mention some problems of IR: the "docking" problem (reversing movements), the "no collision" problem (you can move arms through your ship), the "secondary docking" problem (that's not unique for IR, but makes it impossible to create SSRMS like systems) and there's no really good way of operating the arms (I know there is the IR sequencer, but that's not what I'm looking for... I want more)... oh and the "sometimes everything jumps around after reloading the scene" or the "sometimes joints and connections break whitout obvious reason" problem ... or the "when you apply a force to a hinge there forms a huge gap between the two hinge parts" problem... things like that... I found solutions for many of those problems but they are not very pretty at the moment and I'm still investigating how to improve them... and also improve the performance... currently I activated probably too many things in Unity... I'd like to make it simpler...

Edited by Rudolf Meier
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...