stride3d / stride3d/stride

Add Triplanar Mapping as UV Coordinate source

Open
#964 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Shaders enhancement good first issue
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

I often encounter 3d models which have no texture coordinates. Unwrapping them with e.g. blender only works if the geometry is static, but if the geometry is being modified at runtime, offline unwrapping is no solution.

Tri planar projected mapping to generate texture coordinates is an easy way to add texture coordinates (e.g. it would be great if there was an entry in the texture coordinate source dropdown "triplanar mapped" in order to select this kind of mapping).
Here is an article about it with unity:

https://www.martinpalko.com/triplanar-mapping/

Using a Shader as source for maps and implementing the triplanar mapping there might work as well, but i could not find documentation about whether it was possible to change uv coordinates in a way that they could also be reused for other maps (computing the uv coordinates for every map again and again seems a bit wasteful to me)

One might also consider triplanar mapping in world coordinates, or in "local" coordinates (e.g. the models bounding box).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the texture coordinate source dropdown and the shader/map handling described in the issue, then compare the linked Unity triplanar-mapping article. Clarify whether coordinates should use world or local space and whether generated coordinates must be reusable across maps. Done means a selectable triplanar source supports models whose geometry changes at runtime.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.