Triplanar Texturing or Mapping Possible?

Blitz3D Forums/Blitz3D Programming/Triplanar Texturing or Mapping Possible?

RustyKristi(Posted 2016) [#1]
I wonder if this has already been done in B3D. Basically it solves the stretching part if you have some cliffs for terrains or terrain mesh.

https://gamedevelopment.tutsplus.com/articles/use-tri-planar-texture-mapping-for-better-terrain--gamedev-13821

Without Triplanar


With Triplanar



There's some tutorials in blender but it leads to cycles and not for game export.


Naughtical(Posted 2016) [#2]
I've been wondering the same thing... Maybe subdividing the sides will work...


Kryzon(Posted 2016) [#3]
It's not the same thing, but the closest you can get with fixed-function Blitz3D is with a cubemap set to DIFFUSE mode (not the default), with the cubemap faces all being that same texture.

That, or just better UV mapping in your 3D software (Maya has this mapping technology, Unfold3D, it's great).


_PJ_(Posted 2016) [#4]
Essentially, fro that image you want to change the texture scale to a factor of h where h is the ratio of the triangle's vertex height to the UV's of the triangles at the base and on top.

Blitz 3D applies texturescale to EVERY instance of that texture, so it cannot be done without a separate texturehandle and therefore (unless a higher texture layer is used,) a separate surface.
Unfortunately, if you're going to use a separate texture handle, you may
as well simply use a different texture since internally it has the same video and memory implications,

I am tempted to agree with Neophyte that the simplest is to subdivide the vertical triangles - it will increase polycount but this may actually be less overhead than the triplanar technique!


RustyKristi(Posted 2016) [#5]
Thanks guys. Yes, this is an old post and I realize that it will be better off having this on a modern engine that supports shaders which this technique originated in the first place.