No announcement yet.

Help with camera facing material

  • Filter
  • Time
  • Show
Clear All
new posts

    Help with camera facing material

    I have basically the same question as this answerhub post:

    Which is that I'm wanting to modify the attached camera facing material function.
    Right now, it only faces the camera in one axis so if you go above/below the object then you will see the flat plane.
    The function comes from the StylizedRendering project example.
    The ContentExamples project also has some camera facing materials but they do not work with the foliage painter like the one from StylizedRendering does.

    I'm trying to make grass/foliage similar to what Elder Scrolls Online has.

    Any ideas will be much appreciated!

    Click image for larger version

Name:	1AxisCameraFacingMat.JPG
Views:	1
Size:	135.6 KB
ID:	1220621


    Attached are three more billboard / camera facing material functions I've tried.
    These three all yield the same results; they face the camera in all directions, which is what I want, but (unlike the material function shown in the first post) they do not work with the foliage painter.
    Here's a video clip demonstration the issue I'm having with the foliage painter:

    Click image for larger version

Name:	CameraFacingV2.JPG
Views:	1
Size:	58.6 KB
ID:	1128608

    Click image for larger version

Name:	CameraFacingV3.JPG
Views:	1
Size:	242.8 KB
ID:	1128609

    Click image for larger version

Name:	CameraFacingV4.JPG
Views:	1
Size:	308.9 KB
ID:	1128610


      Have there been any workaround found for these solutions not working with foliage tool?

      I am most interested in the Align mesh to the camera node. I am having a hard time finding any documentation on it and to me it looks like it was placed specifically for this functionality. I think the answer to the foliage tool problems could live in the world position input on the align to camera node.

      Hey of course the day after I finally decide to ask a question I find the solution!

      There is a material in the engine content simply called sprite,

      In your grass plane material you can add a material function call node and apply the sprite material too that node, just use this in WPO!

      All I had to do was adjust the scale to 100,100, And then to make my pivot point change I just load the texture in with half empty bottom for now! I cant believe how hard it was to find this simple function. Documentation looks outdated, maybe I'm bad at searching it.
      Last edited by ImpastaRigitony; 01-06-2019, 01:37 PM.