Make character face from photo for unity - unity3d

I'm new to Unity 3d. I'm trying to create human character with face generated from photo. (to give real face look) I tried UMA 2 plugin, but it does not support changing face. I searched and found 'Avatar Maker UMA' can do it. Avatar maker UMA has low quality.
Is there any other way or software to create character from photo and use it in Unity 3d? Would appreciate any sources.

For the Unity Engine is quite impossible to generate faces, you should to it in another system but I want to share with you some ideas from the internet:
Can Unity generate faces?
"Yes and No.... Unity has zero support on this feature out of the box, in fact unity has virtually nothing in this regard, it engine that you design. that's what makes it so versatile and malleable. your problem has virtually nothing to with unity its self. in other words unity won't do it for you but it can be done within it.
but is probably possible if your willing to work really hard at it, many things are possible within unity that it does not come with. however generating 3d detailed meshes from a picture is a really daunting task, your basically need to do some edge detect algorithms... Oh god, its... its nightmare. its even harder because you going straight from scratch.... look I strongly suggest you get real good practice in programming and a really good understanding of how the 3ds does that exactly or you will be in the dark on this one.
Unity has a MeshClass that you will need and the webcam texture.
http://docs.unity3d.com/ScriptReference/Mesh.html http://docs.unity3d.com/ScriptReference/WebCamTexture.html
you can use that for the actual generation. but as i said, it is an absolute nightmare of a job.
I hope this answer's your question"
But there is a new plugin that maybe can help you, it's called AVATARSDK and can generate 3d faces.

Related

Is there a way to convert a game made with ImpactJS to Unity?

I know that is possible export Unity projects to WebGL, but is there a way to use code from a ImpactJS project on Unity?
I checked the web for converter and found none, so unless I missed something, what you are trying to do is impossible.
There is always a way to convert. Sometimes it may require some manual fixing. Generally most languages are similar enough that you can automate many parts. The art assets are often re-usable, for example.
No. Unity converts it's own framework and system of gameobjects and c# code that you write into WebGL code.
However, if you have computing and business code that does not do much with the canvas/UI then that code can be copied over somewhat. For code that is purely computational or business logic, you can use any online tool to convert javascript into C# code with some success.
My guess is that if most of your code dealt with the canvas and UI and interaction, that none of that code will be able to be reused.

Unity modular NPC

We are developing a Top Down RPG Game. So, there's a question about NPCs. Making a lot of NPC FBX files would not be optimal. From what I know, people usually make 3-4 bodies and a bunch of heads, so the NPCs would look different. Do you guys have any idea, if there's an optimal way of doing that?
I tried modelling bodies and heads in separate files and then putting heads onto the empty object on top of the body (this empty object was part of the FBX itself). It didn't work, as the actual head always displayed too high above, so it looked like the head was hovering in the air.
I also thought about making heads a part of one big FBX with just one body. So all the head would be on the same coordinate in space, and so in Unity there would be a possibility of making active just one head in time. I still don't think it would be very optimal.
So, is there a way people usually do this? I mean, this must be really common. They used it in Gothic, for sure and in many other games. So there must be an optimal way, but I'm unable to find it.
There are a few character customization packages available on asset store that you could use. I recommend UMA2 (Unity Multipurpose Avatar). It is a perfect tool and I'm using it on one of my projects and it's really gets the job done. And the good thing is that it's free. Once you imported it into your project, you can either buy contents (cloth, hair, face, ...) or create your own contents like I do using blender. There are tutorials about how to integrate and create contents on Secret Anorak youtube channel.

How to avoid Unity Complie all Standard shader variants

When add Standard Shader to Graphics——Always Include Shaders, Unity always stucks in sharedassets0.asset. I know it's unity complies shader variants in the background. it's about 60000 variants which make the .apk size is triple bigger than normal size. And it takes a long time(a couple of hours) to build, even if an empty project.If I remove the shader from the list, when I load a model from asset bundle, it will be a pink.Only add Standard to the list, then everything is ok!Is there any way to solve this problem? Please help me!I googled all I can google!
Edit: Unity 2018.2 added IPreprocessShaders which is described at:
https://blogs.unity3d.com/2018/05/14/stripping-scriptable-shader-variants/ You can review each individual shader keyword combination in IList<ShaderCompilerData> and remove ones you are certain you don't need. The this API is not complicated, but standard shader keywords are not well documented. Some of the keyword correspond to enum BuiltinShaderDefine while others are not. I ended up using this preprocessor to remove any ShaderCompilerData with BuiltinShaderDefine.UNITY_HARDWARE_TIER1, BuiltinShaderDefine.UNITY_HARDWARE_TIER2 and INSTANCING_ON(This is not in the BuiltinShaderDefine enum) turned on since I am certain we didn't use quality settings toggle and instancing.
The Unity Shader Variant Collections works kind of wonky. I ended up using a plugin called "Shader Control" to clean up the mess. But the process is still far from enjoyable since when you remove a keyword there is a chance you break something.
The best solution I could think of is remove all the "Built-in Shader" (Maybe not "Deferred" is you are using Deferred Rendering) and "Always Include Shaders" at the beginning of the project and if someone needs a built-in shader, download "Builit in Shaders" from the Unity Download Archive and import only the one needed back to the project. So that you can:
Have 100% control over built-in shader
Only compile shaders you used
Avoid shader duplication in AssetBundles (If you pack something referencing default imported shaders, the shader will be duplicated for each AssetBundle)
But this "best solution" is certainly more of a hindsight and does not help your current situation though. Give Shader Control a try.
Hi I want to suggest a method that worked for me. I was going to comment but my reputation hasn't reached 50. I would not recommend this as answer but no harm for you in trying I guess.
Instead of including the shaders under Graphics——Always Include Shaders I went to Project Settings -> Player -> Optimization and included the shaders under Preloaded Assets.
I also have doubts if it is the correct way to do so but it solved my problem. I would be glad if anyone could point out what was wrong about it and explain a bit, as I could not find much reference to this method on the Internet.
I have posted a similar question at game dev stack exchange
https://gamedev.stackexchange.com/questions/190092/unity-2020-3-what-is-best-practice-to-include-shaders

Tracking a 2 dimensional sprite in Java

I'm kind of new to this whole thing but I'll get started by asking my first question ever.
So a friend and I are working on a project in which we need to track the player character's head movement and attach items to it. Now is this something that needs to be done in Java or would this be something that would be done in Unity?
Sorry if this is a stupid question but I've never really worked on a project of my own volition before.
Thanks,
BadAssWalrus
Ok, so first things first. There is no java in unity, you can do scripting in C#, UnityScript (essentially JavaScript) or Boo.
Now to answer your question, according to my understanding you want to move some objects as the head of the character moves. Now depending upon how you are really trying to move the objects you could either do it with scripting or simply by making the object you are trying to move a child of the head of the character.
Unity has excellent documentation about the scripting API and a lot of tutorials. I suggest you get started by looking at one of these tutorials, and you should get an idea of how things work pretty soon and then you should be able to do pretty much anything you want to do with relative ease.

Cocos2D game tutorials/game suggestions

I use Ray's link to learn Cocos2D, any other good links or tutorials I can use for developing?
Any suggestions about game developing?
Since you weren't too specific on what kind of links you wanted...
This is a bit philosophical but helped me stay focused on getting some simple games finished and polished rather than leaving them half done and moving to the next thing:
http://makegames.tumblr.com/post/1136623767/finishing-a-game
Here's a ton of links to all sorts of game related topics:
http://www-cs-students.stanford.edu/~amitp/gameprog.html
For cocos2d I'd suggest grabbing the full source code and opening up the cocos2d-ios workspace and then compiling and running all the test applications. They'll let you see a bunch of cocos2d's capabilities and give you a starting point to answer those "How would I do X..." type of questions. So after running the TileMapTest you'll know the different type of modes (ortho, iso, etc) it supports and know that there's sample code you look at to get it working.