stride3d/stride

Add Triplanar Mapping as UV Coordinate source

Open

#964 ouverte le 14 déc. 2020

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)C# (886 forks)batch import
area-Shadersenhancementgood first issue

Métriques du dépôt

Stars
 (6 001 stars)
Métriques de merge PR
 (Merge moyen 10j 11h) (22 PRs mergées en 30 j)

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).

Guide contributeur