Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

236
Vistas
Filling the area between points with a material in Unity at runtime

I am creating a random shape that is formed from placing points (3 or more points) on a plane (most of the time the plane is horizontal). After connecting these points, a closed shape is created (Polygon from points and lines).

I want to fill the inside area with a texture or a material.

I know I can create a mesh and a mesh renderer to show the material, but I am not sure how to create the mesh from vertices only. I have no idea how to make triangles of the mesh.

Edit 1: I found good answers from this question: Given an irregular polygon's vertex list, how to create internal triangles to build a flat 3D mesh efficiently? .

I am facing many problems with the solutions. Some methods work with convex and others with concave polygons.

Also, some solutions convert concave polygons to convex before getting triangles (it uses the convex-hull method to get boundaries).

Also when adding the material to the created mesh, it looks different than the original material. The small mesh at the middle of this image is the created mesh at runtime with the same material as the plane mesh on the background (plane mesh is created from the editor before running the application).

Material issue

Is there a library or a plugin that handles the creation of the mesh by just passing to it an ordered list of vertices and a material?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda