Improve terrain rendering

Aperta
#3,936 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
44/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, unity

Direzione di ricerca

Start by running the Bepu sample and selecting its heightfield scene to reproduce the terrain triangles being culled near the bottom of the screen. Read the heightfield model component and the sample's terrain material setup; the issue describes uniform subdivision and built-in Phong tessellation as the relevant options. Done means providing an alternative tessellator or terrain mesh generation method that handles large height changes and avoids the premature culling.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area-Graphics area-Physics area-Shaders bug enhancement
Stride version

Latest git

Platforms

Windows, Linux, Android, macOS, iOS, Game Studio (editor)

Graphics API

No response

What happens

The idea with PR #3758 was to get physics working and provide a fairly simple and straightforward rendering package that users or maintainers can build on top of.

As of writing, the heightfield model component is a uniformly dense plane that can be stretched on the whole field or around the camera. The sample comes with a default setup for the terrain material using the built-in phong tessellation to effectively act as a dumb LOD for terrain detail. Our phong is very aggressive when culling, it doesn't expect any change in height from generated vertices, meaning that triangles that are near the frustum and with a significant slope may be culled too early, as can be seen in the video below.

C9kbfsyib3.webm

This is not necessarily a show stopper as users my increase the uniform subdivision on the component and remove tessellation to fix this issue, but it would be nice to provide an alternative tessellator that expects large changes in height, or implement one of the many existing methods for terrain mesh generation.

Steps to reproduce
  1. Spawn bepu sample after #3919 is merged in
  2. Run the sample
  3. Select the heightfield scene
  4. Notice the triangles intersecting with the bottom of the screen occasionally being culled
Log and callstack

Screenshots and other details

No response

Lingua principale
C#
Stelle
8k
Fork
1.2k
Merge medio
2g 7h
PR unite (30g)
316

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stride3d/stride

Tutte le issue di stride3d/stride

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.