How to change character weight in Unity? - unity3d

So i try to make a adventure game and in one point my character need to eat some food and get fatter and fatter, smoothly every second.I've found only one solution in asset store.The MCS(Morph 3D) has this feature.But problem is i don't want to use one of their character.I have my on low-poly 3d character and i want to use this.
This is an example of what i need :
MCS Morph 3D
So where should i start? What should i look in to? Is there simple way to this or is it really hard?
Thanks already :)

This would normally be done with a frag/vert shader. You would modify the vertices of the mesh in the stomach area based on some value. This could be done really simply in which the distance of the stomach vertices from some given point located in the character's core would just increase based on your given value. I believe your thoughts are imagining something much prettier than this, but anything else would be much more involved for something that is purely visual. If you are not experienced with shaders, I would highly recommend purchasing a visual shader editor, such as Amplify (ASE) or Shader Forge. They make the jump into shaders much easier.

Related

Unity Shader Graph - Glow motion of an object with Shader Graph

I'm new to shaders and with the new Shader Graph from Unity I'm trying to experiment and archive some effects that I have in mind for my games.
I want to get something like this:
https://imgur.com/vqy9y3H
I want a glow effect to go arround my object. In my case it's a square neon light, so it's simple I think.
What I have so far, experimenting and unifying different tutorials, effects, etc.:
https://imgur.com/aPW95S0
This is the current Shader Graph, i know its a mess and maybe there are useless nodes, etc.:
https://imgur.com/J3jzGE6
This is the tutorial I think it's the most accurate to what I need:
https://www.youtube.com/watch?v=UJUlGJS3QpY
Thanks in advance for any tip that help me find the correct path to archive the effect.
EDIT:
To make it clear, the real problem for me is the motion effect. I already setup the glow effect with post-processing and bloom. My problem is how to do the effect arround the object. In my case it's a neon tube, so it's easiest I think, as the effect can be on all the object but from the start of the tube to the end. As the tube is closed, it will start again from the begining almost at the same point. Hope it make it clear.
you can use post processing to get the effect your after, specifically bloom and tone mapping effects.
With post processing applied you just need to increase the color into HDR levels in your shader.
Applying a blur outside of post processing is actually extremely expensive and isn't really recommended unless there is absolutely no other option.

Is it possible to obtain the shape of an IRL object from the slam algorithm to hide 3D objects?

I want to do some test with the AR in Unity, so my idea is to use the ground plane detection of the arcore to instantiate a ring. The ring is made of segments and I want to use an obstacle between the camera and some segment to hide these segments.
I have thought to use the slam to get the shape of the obstacle and use the coordinates to hide (disable or change shader/material) or not the segments behind the obstacle.
I do some researches about Vuforia and I know they use the slam but it does not seem that we can access the shape directly from Vuforia so I thought to use the arcore directly. I think it may be done with spatial mapping.
Because I am not very experienced I prefer to ask about the possibility to do it and if I am in the good way.
If I understand correctly, the term you are looking for should be "Occlusion Management". Vuforia. There is a sample package in the asset store, but I don't know how much value it can offer to your cause. Look here
You could as well take a manual approach and integrate your obstacle as Image- or Model-Target, so that you can simply use a virtual replica of your obstacle that hides everything behind it. This however means that your obstacle would have to be always the same object, so I am not sure if this approach is suited for your needs. But this would be the easiest and cleanest way imho.
You can find many tips to get around occlusion problems here

Unity - Randomly generated Worms like destrucible terrain advice

I've been looking online for some guidelines for this and have had no luck.
I'm having issues with the destructible part of my terrain.
I currently have a script which fills in a 2d array with 1's and 0's and then continues to create a mesh and collider from this array.
The trouble I'm having is that I have no idea how to detect a part of the mesh which was hit with an explosion and then almost cut the explosion from the mesh. I'm struggling to find any hints on how to modify a runtime generated mesh.
All I've been seeing online so far are 3rd party assets, but I'd like to avoid using assets as much as possible.
I'm not asking for someone to provide me with a solution, rather, point me in the right direction.
I'm sorry if this explanation was lacking, but in short, is it possible to modify a mesh at runtime and if so, how?

Pass spotlight's light to the other side of a mash

I have a spotlight in front of a mash:
And I would like to see the circle of light also from behind the mash. I would also love to have the light a bit diffused like lighting a piece of fabric.
Any tips about how to achieve this?
Thanks alot!
TL;DR the effect you're trying to achieve is not possible in the manner you're trying to achieve it in.
You've essentially got two or three options here. And you may want more than one of them.
Set the mesh to not cast shadows. This is pretty much the straight forward solution. It's not going to change the...texture of the light ("make it more diffuse") but it will mean that the light will illuminate other objects behind it.
Use two lights. One light will illuminate the mesh and only the mesh. You'll have to use physics layers for this, and layer masks. The second light--which is more diffuse than the first--illuminates everything but the mesh.
Along with #1 and #2, there's a thing called a cookie that might come in handy.
There might be a solution involving custom shaders. Not having explored this in the past myself, I can only say "it is a research direction I thought of." Research it. (Note: Shaders are complicated and Hard).
Writing your own lighting solution. This is probably the most advanced topic I can suggest. By which I mean "this will solve your problem, but keep in mind, there's about 40 years of research already been done to come up with the models we have which don't solve your problem." We only started to get subsurface scattering as an option in the last three to five. Now you want subsurface scattering to affect the light cone for other objects. Sooo...have fun with that.

Create planet with Terrain in Unity

I'm looking to create some procedurally-generated planets in unity. I'm not looking to make huge, realistic planets, but very small, walkable ones (like Super Mario Galaxy).
I've run into a problem though - Terrain objects cannot be rotated, so I can't really make a sphere out of 6 separate squares.
I've tried importing a hi-res icosphere with limited success. It's difficult to make look good (even with a high number of faces) when up close. There's also limited support on terrain-like features on non-terrain objects - like how to blend textures, add grass, or place objects on the surface.
I have seen a few unity store assets that do exactly what I'm requesting, so I know something like this is possible. I just can't figure out where to start. I've searched for nearly anything related to the topic and found nothing.
Thank you!
You can write a shader that will curve your flat surface, like this:
https://www.assetstore.unity3d.com/en/#!/content/26165
and here is base code:
https://alastaira.wordpress.com/2013/10/25/animal-crossing-curved-world-shader/
I have used it while ago and with upgrades it works well.