Mesh face missing after importing from blender to Unity - unity3d

So I modelled a gun model for my game in blender, and after importing it in Unity one of the faces simply disappeared as you can see in the link below :
https://ibb.co/rwPDY8r
I tried flipping the normal on that face in blender, recalculate the normals, and half a dozen of other solution for that problem I found online, but nothing works.
it's weird because it does appear normal in Blender :
https://ibb.co/BVdMGqg
One thing I noticed is that when I open the .fbx file with windows 3D viewer, this anomaly is visible on the hidden face :
https://ibb.co/1ZLxf0D
It is the only face on the model that has that black anomaly, all the others are normal.
I am about to give up and just delete it and start over. So if anyone has a solution I would be very grateful since I already spent a few hours making the gun and a couple more trying to fix this, I would hate to have to redo everything again (Especially since i'm pretty proud of that gun).
Thanks in advance.
Edit: Ok so nothing worked. I tried all the answers here (which I did try before but tried them again just in case) and it's still not working. I Even tried duplicating the face and extruding it a bit, still invisible. I'll scrap this one and make another, this time with backface culling enabled so I can see what I can do. Thanks for your time guys.

You probably have an inverted face in your mesh. Here is how to find that:
You can select it and choose "flip normal" in edit mode. Or just choose "recalculate outside" with all faces selected.
As an alternative to "Face Orientation", you could enable "Backface Culling" which is what Unity does by default (unless you enable the material to be "double sided" or play with the Cull type in shader.)
This will hide the problematic face as you are looking against the backside. Fly inside the mesh and you will see the other side being rendered.

The problem is solved in four simple steps:
Click model on blender
Press Tab to Edit Mode
Press Shift + N to Recalculates Normals.
Save, Export from blender and going to unity again will fix.

When you import .fbx to Unity you can also change the Normals method import to calculate in import settings. Sometimes it helps.

Related

How to import cloth simulation from Blender to Unity

The only way that I found to import the cloth animation from Blender to Unity for mobile is by exporting each frame as a separate mesh and then replacing it at runtime to create the animation. (if anyone knows other solution please tell me).
The problems is that the "meshToChange = otherMesh" way has a big hit on performance on mobile. I'm curious to see if there is a better way to change the mesh at runtime.
Thank you :)
There are a few ways to do this
1.The best way would be this:
Get the keyframes for the baked simulation with a .mdd addon for blender.
Import the Blender project in Unity.
Add the prefab in a scene.
Select you object and go to the Skinned Mesh Renderer component and expand the BlendShapes. There you will find all your data.
After that you will need a script to cycle through the BlendShapes. Here is a simple script that will do the job.
For better information check out this video.
Thanks to #derHugo for helping me with this one.
I am not going to focus on the next ones but I will put some references here for anyone interested.
2.Using Alembic files.
If I am correct this is the way the Unity team did it for the short film ADAM.
Check out this video.
To note that this will not work for mobile.
3.Cycling and changing the mesh every frame.
This technique is very similar to a 2D animation.
All you have to do is export a sequence of fbx's for the animation and then cycle through them. script
Be aware that you will get a huge performance hit from this.
With a cloth simulation with around 7k tris changing the mesh every few frames I was getting around 30fps with nothing else in the scene on an IPhone 6.

How can I make a cube hollow on the inside?

In general I wanted to make it in unity3d but I saw that in tutorials, they made it in blender.
This is what I did in unity:
I want to make this high cube hollow on the inside, and make a small door so that I will be able to walk inside the cube. Later on, I want to somehow add stairs but the problem now is how to make it hollow on the inside.
I saw in some places the suggestion to use blender so I tried this tutorial in blender:
Blender
But got stuck there after I checked the Add Mesh Extra Objects and clicked on Save User Settings. I tried then to click on the bottom on Add > Mesh but then I don't have Extra Objects. I have Extras objects like in the tutorial video.
Anyone my main goal is to make the high cube hollow on the inside with a small door on the bottom so I will be able to walk inside.
From what I know Unity3D has no 3DModelling by default (maybe there is something for that in store), so you need to use Blender or some other program (for example Maya). There is https://blender.stackexchange.com/ where you can ask same question (since it is not really unity3d related)
Maybe this will be helpful : https://blender.stackexchange.com/questions/5849/how-do-i-create-a-solid-object-cube
Overall what you could do, but it is not the est way - you can build a everything out of boxes yourself in Unity3D
Try use to boolean modifier. Take a look this tutorial:
Blender 2.6 Tutorial 26 - Boolean Modifier

Adding a UV-map material in Unity 5 not working

I am currently using Unity 5 to setup a small game so that I can see the assets I recently made in blender in action.
I have created a uv-map in blender and added the necessary colour (it works and displays nicely and blender) but it doesn't seem to work in Unity. What I've done is created a material, chosen the uv (under the albedo option) and then applied it in the skinned-mesh renderer of the object but it colours the entire object only one of the colours included or it just doesn't colour at all. I tried messing with the import options (swapping the UV's) but it doesn't seem to work.
Any help would be greatly appreciated.
Is there a chance you've been tricked by the annoying new button in Unity's "new" shader,
To change the :actual texture", it's called Albedo which is annoying.
You must click precisely the little "dot" shown below!
The "little dot" is between the small square, and the word "Albedo".
Then, a selector panel appears. HOWEVER there is a soft bug: When the selector panel appears it immediately goes to the back of all windows.
Many people, certainly myself, get fooled by this. It's quite annoying.
So, hopefully the problem is just that you have not yet selected the texture to display, considering the "tricky button issue" on Unity's "new" universal shader.

Textures to Object in Unity / Vuforia

I'm trying to do some Augmented Reality in Unity using the Vuforia plugin. I've managed to get everything working (I'm using a 3d model of a car), only the position of the car relative to the marker is wrong when I come to preview it (click the 'Play button at the top and watch through the computer's camera - is 'preview' the right name for this?).
It should be sitting on the the marker in the center, but instead it's floating above the marker and off to the side by quite a bit. The positioning is definitely right in the program itself, so I'm not sure why this isn't reflected in the preview.
Also: at the moment the car is simply an untextured grey object. I realise the textures are included in a subfolder, however I can't drag the entire car's folder (including the Textures subfolder) into the ImageTarget, only the .3ds file itself. Does anyone know how to apply the original textures to the car?
Thanks so much for your help in advance!
Ben
Well, to start answering your question about the drifting away part, you've probably got a Rigidbody attached to your Car? Well, if that's the case, then Go to the Inspector where the Rigidbody is and you'll see constraints.
To avoid it floating off, you might want to check Freeze Positions for whichever direction it needs. Probably Y axis.
Now, I'm not entirely sure if you're using Vector.AddForce to move your objects, but if you are then just check if your car can move if you've put all constraints on.
If you can't then in your code trying using Object.Rigidbody.SetActive(true) when you need it to start moving, and Object.Rigidbody.SetActive(false) when its done.
On the other hand, if you aren't using Vector.AddForce() then remove Rigidbody component if you've used it.
As for the material. If you've got the material in your folder that you've downloaded then just drag and drop it into Assets. Now sometimes your car may be one solid mesh, but some times it may be multiple meshes. So which ever the case. Drag the material from your Assets onto the Hierarchy panel over your car mesh/meshes and it should turn into that color.
Hope it helps. :)

Curled fingers: Unity3d

When I played imported animation, the character's fingers get curled and his mouth opened. I might be able to fix that by editing adjusting bones in unity. But with so many characters and each time dragging them from assets to scene.
It's a bit too much misery and it's slowed me down, I need this get done fast.
Unity Masters, PLEASE HELP ME.
the bones in your imported model rig must contain all the fingers and other parts bones that doesnt move correctly , if it does then assign them to your avatar as you are setting up your avatar (look here for avatar setup) , after that if your animation animates fingers then your model will also
So that's right you don't get timely help. AnyWays,
[SOLUTION]
The animations was imported from iClone 5. Now I was importing animation separately and then applying it to the .fbx character. So I alternatively imported the animations embedded with the character. Now this is helpful only in case the original character is also being imported from iClone. Then in the rigged configuration I reset the pose>Enforce T-pose>automap> again automap>enforce T-Pose. Worked for me.
[SOLUTION2]
I had alternative in which I could mask hand animations (not using them) and remove jaw from 3d exchange while exporting fbx. But they looked so lovely I had to look further.
Sometimes you can't find the solution, I guess you are the only solution then. That's how everybody learns. hopes it helps.