stride3d/stride

Add Triplanar Mapping as UV Coordinate source

Open

#964 aberto em 14 de dez. de 2020

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)C# (886 forks)batch import
area-Shadersenhancementgood first issue

Métricas do repositório

Stars
 (6.001 stars)
Métricas de merge de PR
 (Mesclagem média 10d 11h) (22 fundiu PRs em 30d)

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

Guia do colaborador