How to procedurally generate terrain to make an infinite terrain? - unity3d

I have been researching this subject just about everywhere I can find it, but all everyone talks about is the mathematical side to things, not about how to make an infinite randomly generated terrain. I am pretty new to Unity, so when say things like "just tile it," I have no idea how to tile. I've heard about the diamond-square algorithm, but I don't know how to apply an algorithm to the terrain. Perlin noise I only know how to apply as far as the terrain toolkit to one terrain tile. Any help would be really, really appreciated!

Related

Why can I see the inside of a room as soon as I cross it, in Unity?

I am currently working on a 3d game in Unity, and I am working on the level design using ProBuilder. I basically created a huge cube which I "flipped normal", and a second one way smaller
which, as the other one, I flipped normal, but as soon as I crossed it while turning backward I could weirdly see through the small cube, which makes it feel unfinished. How could I fix this issue?
Normally in 3d games triangles can only be seen from one side. Usually this is not a problem because walls have some thickness. Since you clearly have paper thin walls made of only one layer of triangles this is exactly the result you should expect.
In short add the other side to your walls. The simples way is to duplicate the existing triangles and flipping them. Walls will still be paper thin of course. Later you should probably make them thicker.

From Blender mesh to Unity

I'm creating my terrain in Blender, as I feel more comfortable with it than using Unity's built-in tool. I have this mesh now, and I've implemented the LOD feature as well. The next problem to fix is the collider. I want to use the mesh collider for it. But I'm worried about performances. I split already my terrain in "chunks" each with its own LOD. I need to apply to each square a mesh collider.
What do you think about it? And also do you have any optimization advise?
On YouTube and on some Assets on the AssetStore, I can see a lot of modular terrains packages, and once I checked the mesh that they use, I can see that they are using mesh colliders everywhere.
Extra question: should the mesh be static?
Thank you guys for your time. To some, they might seem such stupid questions, but from someone who is starting now...Well, they still represent a big challenge.
I don't think it will be a problem as long you create a mechanism to deactivate the unnecessary, and unused parts. Look also Ocullision culling and make all the terrains static.

In Unity can I modify at runtime the mesh of a terrain created using the terrain editing tools so that I can 'dig' a hole?

I am new to Unity and would like to be able to emulate the idea of 'digging' a hole in the 'earth' with a spade, at runtime and have the terrain slightly ahead of my camera lower slightly, then move that dug 'earth' into a pile somewhere next to the hole.
I have created a terrain using the preview terrain tools and now want to alter it at runtime a little like you see in this part of this video : https://youtu.be/l_2uGpjBMl4?t=2970
I want to be able to make a small 'dig' into my environment, just like a spade making a hole in the earth, and that state to then be something I can persist.
I then want to be able to move the 'dig' volume, i.e the 'earth' onto somewhere else in the terrain - literally imagine what happens when you dig a hole.
If I want to follow this guy's video, he is generating his terrain, and I am not sure how to apply his logic, because I would likely want to shoot a raycast from my camera, and where it intersects with the world, then alter the 'mesh' of my painted terrain, and then add to a 'pile' of earth somewhere else. I am not sure about just doing the piles of earth with just changing the height of the terrain, because there would need to be a volume associated with the 'earth' you have dug, so it's more of a object, than a terrain if you see what I mean.
I realise this is a bit of a braindump, but I am looking for direction and have done research these are the questions I would like answered, I want this to be a sounding board for whether my thoughts are on the right path, and if not, what is an optimal course for learning some techniques for achieving this.
You need to use Terrain.terrainData which contains the GetHeights and SetHeightsDelayLOD methods. SetHeights is also available, but is not as efficient. Check the documentation to see how they work!

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?

How to change character weight in Unity?

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.