Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ComputeTangentFrameEx

オープン
#1 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp

調査の方向性

まず既存の ComputeNormals と ComputeTangentFrame の動作を確認し、要求されている API としきい値を D3DXComputeTangentFrameEx と比較します。特異点グループ化アルゴリズムと現代的なスコープはこの issue では未決定のままです。完了時には少なくとも、ミラー化されたシームを処理する頂点分割バリアントを提供します。

索引モデルが issue の本文から書いたものです。

説明

proposal

The basic ComputeNormals and ComputeTangentFrame do not perform any vertex splits, so artifacts can be found on large angle changes.

An alternative version is needed which would be able to duplicate vertices to resolve these problems.

enum CTF_FLAGS
{
   CTF_DEFAULT = 0x0,
       // Default is to compute normals using weight-by-angle

    CTF_WEIGHT_BY_AREA = 0x1,
        // Computes normals using weight-by-area

    CTF_WEIGHT_EQUAL = 0x2,
        // Compute normals with equal weights

    CTF_WIND_CW = 0x4,
        // Vertices are clock-wise (defaults to CCW)

    CTF_DONT_ORTHOGONALIZE = 0x10,
    CTF_ORTHOGONALIZE_FROM_U = 0x20,
    CTF_ORTHOGONALIZE_FROM_V = 0x40,

    CTF_DONT_NORMALIZE_PARTIALS = 0x80,

    CTF_WRAP_U = 0x100,
    CTF_WRAP_V = 0x200,
    CTF_WRAP_UV = 0x300,
};

struct CTFVertex
{
    uint32_t vertex; // index of the 'original' vertex
    XMFLOAT3 normal;
    XMFLOAT4 tangent; // .w is handedness
    XMFLOAT3 bitangent;
};

HRESULT ComputeTangentFrameEx(
   _In_reads_(nFaces*3) const uint16_t* indices, _In_ size_t nFaces,
   _In_reads_(nVerts) const XMFLOAT3* positions,
   _In_reads_(nVerts) const XMFLOAT2* txtcoords, _In_ size_t nVerts, 
   _In_reads_(nFaces*3) const uint32_t* adjacency,
   _In_ DWORD flags,
   _In_ float partialEdgeThreshold,
   _In_ float singularPointThreshold,
   _In_ float normalEdgeThreshold,
   _Inout_ std::vector<CTFVertex>& frames, _Out_ size_t& nDupVerts );

HRESULT ComputeTangentFrameEx(
   _In_reads_(nFaces*3) const uint32_t* indices, _In_ size_t nFaces,
   _In_reads_(nVerts) const XMFLOAT3* positions,
   _In_reads_(nVerts) const XMFLOAT2* txtcoords, _In_ size_t nVerts, 
   _In_reads_(nFaces*3) const uint32_t* adjacency,
   _In_ DWORD flags,
   _In_ float partialEdgeThreshold,
   _In_ float singularPointThreshold,
   _In_ float normalEdgeThreshold,
   _Inout_ std::vector<CTFVertex>& frames, _Out_ size_t& nDupVerts );

The D3DXComputeTangentFrameEx function supported vertex splitting based on various thresholds.

The real question is if anyone needs the full original D3DX9 algorithm with all it's complex 'singularity group' handling, or if the current functionality is sufficient for modern needs.

At a minimum, there needs to be a duplicate vertices version to handle mirrored seams...

主要言語
C++
スター
860
フォーク
169
平均マージ
1日 9時間
マージ済み PR(30日)
5

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/DirectXMesh のほかの issue

microsoft/DirectXMesh の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。