.fbx Model grayed out can can't be edited - unity3d

I have models created with 3D Studio Max.
When I save as .FBX and import into Unity 3D they become grey. What's the reason of this and how can i solve it?
Also i have huge troubles with performance of model on mobile. What's the best approach to get app faster?

When I save as .FBX and import into Unity 3D they become grey. What's the reason of this and how can i solve it?
I've gone through the same issue when importing the following 3D Data Visualization model
The model was created using Cinema4D and exported as .fbx.
When i imported into Unity using drag and drop, I got the following result
As we can see from looking at the Inspector (image above) the material is grey and can't be edited, the textures were not imported. The materials of the default assets cannot directly be edited but there's a way to go around it.
I've created a new material (right click in assets > Create > Material)
Gave it a new name (green) and changed Albedo to green.
And dragged the material to the cube
The end result now looks like expected
Also i have huge troubles with performance of model on mobile. What's the best approach to get app faster?
It can be tricky to develop mobile VR apps but the game window has an info panel that displays useful live information (Use Stats button in the Game window to enable it)
There we can read how many SetPass calls, Batches and polygons are being drawn. Aim for 50 SetPass calls, that's a good number accordingly to Unity experts.
About optimizing performance, some very good developers already explain in detail how to optimize your scenes. I suggest the following links
Understanding VR Performance
Profiler window

1) all models gray- this means the texture was lost in the import. You can create materials and drag them onto the mesh. But Unity can import your max files directly, you dont have to export to .fbx. Maybe if you try that your textures and materials will be setup automatically.
2) performance on mobile- can be various causes. maybe too much detail in your models. Or more likely too many drawcalls, or maybe too heavy cpu upsage . hard to say. the unity docs have pointers on optimizing for mobile.

Related

Using Minecraft character with skin into a unity game

I've decided to use Minecraft like characters in my small game since I do not know how to make 3d models (nor I want to learn how to do such thing in the near future).
However the task now seem a little harder than expected:
I've tried looking in the asset store for prefabs to use but without success.
So, I've decided to try and make a model on blender(by not knowing a thing about non parametric 3d modeling, my knowledge of blender is extremely limited) and import it into my unity game.
And surprisingly, I managed to create the model using McPrep, export it and import it into unity maintaining objects that drive the bones (the output is a bit messy but I think I can manage to clean it up a little).
However the imported version does not have any skin and appears in a gray shade.
Turns out that the output does not keep materials/textures with it!
I've tried getting the texture used by blender and it returns the same skin I fed into mcprep so, by using the same skin, I've tried creating a material with it by getting the .png and using it as texture in a unlit texture material.
However, the result is a bit messy as shown here (left is Blender, right is Unity):
How may I make the texture on unity3d be better and right? (I've heard there is a way using a C# script but I really don't know what it is nor how to do it)
EDIT:
Thanks for the answers before, I did set the filter to point obtaining the texture to be a bit better. However the part that should be transparent is displayed in black on top of the other part (I think).
The image on the right is only filter point and the one on the left is point + alpha is transparency and the transparent shader using unlit transparent
ANSWER FOUND:
As Bart said, make sure the textures' Filter Mode is set to Point, but additionally:
Minecraft player characters are made of 2 layers, the second layer usually has lots of transparency and is used for clothing or other relief detail. So you need to use a transparency-capable shader on your material in Unity.
You're running into a filtering issue. In your case you want no filtering to happen. So select your texture, and in the inspector change the import settings so that your "Filter Mode" is set to "Point". In this case it will do no filtering of the input and your large pixels should appear sharp as you want.

Is there a difference to creating your scene in the Game Engine or the 3D creation software?

Hey I have a simple question which I am having trouble finding any info about it online.
Situation: I am making an island explorer game.
In Blender i am creating my islands and all the static objects with the island (Trees, rocks, folliage, buildings, etc.) and exporting this island & static objects together in 1 FBX file. Then in Unity3d I have my scene already done I don't have to perform the scene creation there, i can focus on developing the interactable objects.
When I want to make a new island I just use the same project in Blender and re-use my previous works if I want to. Then export the new island to unity3d.
Is this correct? Am I supposed to "dress" my scene in Unity3d or in Blender? Does it make a difference (performance wise)
What I understand is that when I export multiple islands that are reusing the same tree for example, in Unity3D even though these trees are the same they are in different fbx's. But this only affects project size afaik?
It depends what you are making. Unity has a lot of tools, specifically environment creation tools that are much faster and more powerful to use in Unity rather than import from blender, especially for laying out a scene and prototyping.
Tools to check out:
ProBuilder (Asset Store)
PolyBrush (Asset Store Deprecated) :(
Terrain (Package Manager)
It is good that you are learning blender as for making characters / detailed objects its still the way to go.
Performance is based on verts / textures and won't matter if you make something in Unity or import from Blender.

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.

Unity profiler Device.present

When trying to optimize my game the biggest problem seems to be the device.present. Been going through some forums and i couldnt really find any useful answers. What is usually the main problem associated with this?
There are just many things that could cause this but the main reason is because the Thread is blocked by the graphics driver in a way to let the GPU catch up.
These are the specific reasons:
1.Image Effects
Check your camera. If you have Image Effects such as Flare Layer, Anti-aliasing and others, disable them.
2.UI Effects
Check all your Images, RawImages and Texts. If you have an Outline, Shadow or Position As UV1 component attached to the Images, RawImages and Texts, this could cause the problem. Usually when you have multiple of this attached to one
Image, RawImage and Text.
3.Bad Light Settings
Select your light and make sure that the Resolution under the Shadow Type is not set to Very High Resolution.
4.In the Quality Setting change the V Sync Count to Don't Sync.
5.Check for Sprites and Images with 0 alpha then disabled them
6.From the Player Settings, disable Auto Graphics API then change the Graphics API to OpenGLES2.
7.Custom Shaders
Are you using custom shaders (non standard shaders)? Disable it temporary. An expensive or bad written shaders could cause this problem.
Those are the usual problems. It is very possible that yours is a different problem. I suggest you enable/disable items one by one and you will likely find the problem.
If not, then consider creating new project and scene. Save out your old game as prefabs or assets then import them one by one into the new project. Don't import them at the-same time because the problem might appear again. Import then test then import again and test until you find the problem. If the problem is no longer there then it's likely an Editor Settings problem.

What is the best software for creating OpenGL ES models and textures?

What is best software for creating models , textures etc... for iphone development.
From simplest to more complex programs.
First thing that comes to my mind is blender , but I'm curious what everybody else is using and their opinions.
Blender is a very good issue for your needs.
It's a very complete solution. Just take your time to learn it step by step. You'll get some great tutorials on the website.
Agreed! I found a tutorial about 3D programming mentioning Blender as a free tool. It was SO daunting to use at first, and I still haven't even figured out most of what it can do. However, I can now build and export the needed geometries for my applications.
Tips:
Use a 3 button mouse (RMB:Selects a vertice, edge or face; MMB Rotates the view camera)
'A' selects or deselects all
'X' deletes anything selected (prompts you first)
'B' Bounding Box Selection Mode
'E' Extrude selected things
For creating textures, I use Adobe's Illustrator, Photoshop and Fireworks, and then import the image into Blender. There is also a texture paint mode in Blender as well.
I tried Cheetah 3d , it looks decent and it exports directly to header files.
I will definitely try blender , but it seems overwhelming and i am not sure do i need to loose to much time on getting to know how to work in blender.
On other hand i was trying out cheetah 3d and i figured out most of the staff in couple of hours.