Primitives with Adjacency

本文介绍了一种特殊的几何表示方式——带有邻接信息的三角形列表。这种表示法为每个三角形都附加了三个相邻三角形的信息,主要用于几何着色器中实现某些需要访问相邻三角形的着色算法。为了使几何着色器能够获取这些相邻三角形,它们必须与基本三角形一起提交到渲染管线,并且需要指定特定的顶点拓扑结构。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

5.5.2.6 Primitives with Adjacency

 A triangle list with adjacency is where, for each triangle, you also include its three neighboring triangles called adjacent triangles; see Figure 5.14b to observe how these triangles are defined. This is used for the geometry shader, where certain geometry shading algorithms need access to the adjacent triangles. In order for the geometry shader to get those adjacent triangles, the adjacent triangles need to be submitted to the pipeline in the vertex/index buffers along with the triangle itself, and the D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ topology must be specified so that the pipeline knows how construct the triangle and its adjacent triangles from the vertex buffer. Note that the vertices of adjacent primitives are only used as input into the geometry shader—they are not drawn. If there is no geometry shader, the adjacent primitives are still not drawn.



### Instant Neural Graphics Primitives with Multiresolution Hash Encoding Multiresolution hash encoding is a technique that allows the representation of high-frequency details in neural fields, such as images or volumes, while maintaining efficiency during training and inference. This method divides space into multiple resolutions using an octree structure to efficiently store information at different levels of detail[^1]. The core idea behind instant neural graphics primitives (INGP) lies in combining multiresolution grid-based feature vectors encoded through hashing techniques. By mapping spatial coordinates into discrete indices within grids, this approach can capture intricate patterns without requiring excessive memory resources. The use of hash tables enables fast lookups when accessing these features. For implementing INGP: - **Octree Construction**: An adaptive octree is constructed based on scene complexity; finer divisions occur where more detail exists. - **Feature Vectors Storage**: Each node contains low-dimensional learnable parameters representing local geometry properties. - **Hash Function Application**: Spatial positions are transformed via modulo operations followed by random projections onto higher dimensions before being fed into networks for learning purposes. This combination results in models capable of generating highly detailed outputs from compact representations learned directly from data samples provided during training phases. ```python import torch.nn.functional as F def get_grid_coordinates(xyz, level): """Convert continuous xyz coordinates to integer grid cell ids.""" scale = 2**(level - 1) coords = ((xyz + 1.) * scale).long() return coords % (scale*2) def apply_hashing(coords, table_size=1<<20): """Apply simple modular arithmetic hashing function""" hashed_coords = [] primes = [1, 2654435761, 805459861] for i in range(3): h = int((coords[:,i]*primes[i])%table_size) hashed_coords.append(h) return torch.stack(hashed_coords,dim=-1) ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值