• Non ci sono risultati.

Height Map

N/A
N/A
Protected

Academic year: 2021

Condividi "Height Map"

Copied!
7
0
0

Testo completo

(1)

Non solo mesh

• Non di sole mesh vive la CG

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Height Map

• Or: Height Field

• Or: 2.5 Dataset

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

float[resX][resY] heightMap;

Height Map

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Gray-scale image, interpreted as a height map

Curisosità: physical height maps

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a (CGI)

(CGI)

(real)

(real)

(2)

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Height Map: rendering rasterization based

Height Field Triangle mesh

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Esempio

• un esempio tipico:

– campo d'altezza per modellare un terreno...

Point Clouds

• Mesh… senza connettività

• Output «raw» di molti device e tecniche – computer vision,

– stereo matching…

• Spesso, bassa qualità

– rumore, – campionamento

disomogeneo

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Da Nuvola di punti a Triangle Mesh

nuvola di punti ?

( point cloud ) triangoli!

problema abbastanza studiato, (non facile)

Algoritmi comuni: “Ball Pivoting”, “Front Advancing”

x

y z

x

y z

(3)

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Esempio Strutture Volumetriche ad elementi finiti

• Elementi finiti (volumetrici):

– voxels (“cubes”)

– hexahedrons (“cuboid”) – tetrahedrons

• 3D models can be

– voxelized (voxel grid),

– hexahedrized (hexahedron mesh) – tetrahedrized (tetrahedron mesh)

Voxels

• “Voxel” = Volume element – Così come…

• “Pixel” = Picture Element

• “Texel” = Texture Element

• Elemento griglia regolare 3D

• Esempio code:

array[resX][resY][resZ] of Voxels;

• File formats

– DICOM (medicina)

Voxels

(4)

Voxels: non solo 1 o 0

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Dataset Volumetrico:

- griglia 3D regolare di valori di densità - campionamento regolare in 3D - es: output di una scansione TAC - es in C:

densità: 0.3 densità: 0.45 densità: 0.74

float volume[RES_X] [RES_Y] [RES_Z]

consumo memoria cubico con la risoluzione (diventa facilmente

ingestibile)

Voxelized volumes

• Output naturale di CT scans

(ogni voxel, un valore di densit

Voxelized volumes

Voxelization

Marching cubes, Dual Countoring

Voxelized volumes

• Varie

risoluzioni

(5)

Passare da volume a superficie

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Dataset Volumetrico:

- griglia 3D regolare di valori di densità - campionamento regolare in 3D - es: output di una scansione TAC - es in C:

densità: 0.3 densità: 0.45

float volume[RES_X] [RES_Y] [RES_Z]

consumo memoria cubico con la risoluzione (diventa facilmente

ingestibile)

Passare da volume a superficie

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Dataset Volumetrico V

algoritmo

“Marching- Cubes”

Iso-superficie Triangolata

(di valore s) S

• s = valore soglia

• superficie (chiusa) dove il valore del campo = s

• racchiude i punti di V che hanno valore > s

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

(6)

Algorimo Marching-Cubes : alcuni cenni

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Cubetto con vertici in 2 x 2 x 2 = 8 campioni del dataset

Ogni campione : - o dentro (se >s) - o fuori (se <s)

Per ciascuna combinazione di dentro/fuori

=> una triangolaione predefinita

(usare una tabella tabella, 2^8 = 256 casi) (ma solo 15 diversi contando le simmetrie)

Voxelized Volumes:

• Input naturale dei 3D printing devices

3D printer Tri Mesh

Voxelized volume

(ogni voxel, 1 bit: pieno/vuoto)

oggetto/i fisico/

Voxelized Volumes:

• Input naturale dei 3D printing devices

Modelli 3D per simulazioni fisiche accurate

• FEM / FEA

– Finite Element Method / Finite Element Analysis – Simulaz strutturale accurata

• distribuzione carichi

• Volume voxelizzato = struttura regolare

– come dire, “quadretti, ma in in 3D”

• Volume di tetraedri / hexaedri

= equivalente volumetrico

delle tri / quad meshes.

(7)

Tetrahedralization Tetrahedralization

M a r c o T a r i n i ‧ C o m p u t e r G r a p h i c s ‧ 2 0 1 4 / 1 5 ‧ U n i v e r s i t à d e l l ’ I n s u b r i a

Da dataset volumetrico a triangoli: altro esempio

Riferimenti

Documenti correlati

, alla scadenza del periodo di prova, trasmetta a questo Giudice una relazione conclusiva dettagliata sul decorso e sull'esito della prova medesima, che

If 25.00 mL of 0.100 mol•L –1 sodium hydroxide solution is used to the endpoint of the titration then the concentration of the citric acid in the drink is:.. Many people take

[r]

 Object space: Object-Space Normal-Maps (The same in which I express the vertex pos).   the normal per vertex

si ottiene la normal map relativa allo spazio tessitura una tangent space normal map, dunque. o 5x5,

Spazio tangente: Tangent Space Normal-Maps (le bump-maps di default, nei games). servono, per vertice,

// Questa soluzione ad ogni passo, calcola la profondità che abbiamo raggiunto // che viene passata come parametro

Since the top tree and each bottom tree has size less than 2B − 1 and the bottom trees are stored contiguously in memory, the bound for range reportings in the van Emde Boas