Author Topic: Triplanar Setup  (Read 2096 times)

2020-01-03, 23:22:59

Br0nto

  • Active Users
  • **
  • Posts: 47
    • View Profile
Hi there,

I'm trying to set up a car paint material with a triplanar noise in the normal map. However, I'm not sure which projection type to use in the texture tag. I thought that having the triplanar map meant it would ignore any uvs or projections, but each projection seems to dictate where the texture is, as if I weren't using a triplanar map at all.

My setup is:

Layered Material
1. Base matte layer (Just color and reflection)
2. Flake layer
   Bump--> Triplanar
      Texture --> Corona Normal
         Texture -->Tiles (This is the true content layer and I have this set to large tiles for ease of testing)
3. Upper shiny reflection layer (Just color and reflection)

Is this setup correct? Do I need to set up my triplanar in a different way? What is the "correct" projection type to use with a triplanar map so that the map works correctly?

Thanks!

2020-01-08, 19:19:14
Reply #1

Br0nto

  • Active Users
  • **
  • Posts: 47
    • View Profile
I realized my initial post probably did not have enough information. Let's try that again:

The core of my issue is that I am having trouble applying a triplanar map to a normal in the bump channel of a corona material.

I get similar and predictable results when I place the texture inside a triplanar map in either the diffuse or reflectance channels. I can switch the texture tag projection to any type, and the mapping does not change. This is as expected, from what I understand about the triplanar map.

Diffuse Only (Regardless of Projection):


Reflection Only (Regardless of Projection):



The real weirdness starts with the normal map. As mentioned in my original post, to simulate car paint flakes I have a tiles shader with tiles colored a solid R, G, and B to give random normal directions. At a small enough scale, this would look like shiny flecks. However, when I do my same triplanar tests with the normal slot, the outlines of the normals don't change, but the angles of the normal do. And it's consistent for certain groups of projections, too, which is bizarre.


Examples (All same shader setup, but switching projection types):

Cylindrical/Spherical/ShrinkWrap:


Flat/UVWMapping:


Cubic:


Frontal:


Spatial (Almost-but-not-quite the same as Frontal):


Is there an ideal projection type in this situation? Is it supposed to shift this way? Any insights?

Here's my shader setup, it's not terribly complex:


Thanks!

2020-01-08, 19:25:51
Reply #2

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
Hi Br0nto!

Would you have an example scene, where you apply this to a sphere or a cube for example? That way, we'll be able to try it out more easily.

2020-01-08, 19:34:24
Reply #3

Br0nto

  • Active Users
  • **
  • Posts: 47
    • View Profile
Sure, here you go! Just change the projection type and the normals should shift angles, but keep their shapes. I used a stretched sphere to try to accent any distortion from UVs and such. Should be trivial to make a cube if necessary and apply the same texture.