- Home /
The question is answered, right answer was accepted
Cloth, Mesh or Terrain for wavy sea water?
It's pretty straight-forward question, but basically I'm wondering which one of these methods would be least demanding on the hardware and which one of these would look better for such a thing.
Thinking about using perlin noise and updating the mesh/terrain constantly.
Answer by tanoshimi · Jan 31, 2017 at 01:19 PM
Definitely Mesh.
Cloth is designed for physical simulation of thin surfaces - it's expensive and somewhat fragile.
Terrain is designed for heightmap-based terrain surfaces - it's not designed to be changed often during runtime, and it has lots of additional features you don't need (trees, grass, splatmaps).
Answer by AnneSchmidt_legacy · Jan 31, 2017 at 03:49 PM
In 3D?
Use a plane, add a colour, and then add the following script to it:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ocean : MonoBehaviour
{
public Renderer water;
void Update ()
{
water.material.mainTextureOffset = new Vector2 (0, Time.time / 100);
water.material.SetTextureOffset ("_DetailAlbedoMap", new Vector2 (0, Time.time / 80));
}
}
Source: https://unity3d.com/learn/tutorials/topics/graphics/realtime-global-illumination-daynight-cycle
Yeah, it looks gorgeous, but I am after more of a 'cartoony' look for water, so using a mesh and smoothly updating the y
values of it is what I'm after.
Follow this Question
Related Questions
Rivers on procedurally terrain 0 Answers
Finding the height of a mesh 1 Answer
Collider for rocks. 1 Answer
Perlin Noise Spherical Terrain 2 Answers
Can't paint detail on terrain. 1 Answer