Announcement

Collapse
No announcement yet.

List of material expressions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    List of material expressions

    I like working with material editor in UDK. But I wonder if there is some list of what all those expressions do. I was locking for it on UDN site but I didnĀ“t find it. Does anyone of you know about something like this?

    #2
    Check here: http://udn.epicgames.com/Three/MaterialsCompendium.html

    Comment


      #3
      Thank you very much. This is exactly what I was locking for.

      Comment


        #4
        I just updated that document the other day. Let me know if you have any questions or if you notice anything missing.

        Comment


          #5
          Originally posted by ffejnosliw View Post
          I just updated that document the other day. Let me know if you have any questions or if you notice anything missing.
          Awesome.
          One question though: Does the per instance random return a value in the 0-1 range or what? Also, does it act like a single channel of a texture sample, meaning that I can multiply it with textures and things like that?

          Comment


            #6
            The output value should be a whole number between 0 and RAND_MAX for the target platform as far as I can tell. To get a normalized [0,1] value, you would have to divide it by RAND_MAX (of course that value differs from implementation to implementation). Some testing should be able to come up with a good value to use based on your intended use case.

            It is the same as a constant so you can multiply it with any other value or whatever.

            Keep in mind, it only works when the material is applied to an InstancedStaticMesh or something using an InstancedStaticMeshComponent, such as ProcBuildings. It won't work just applied to a regular StaticMeshActor, InterpActor, etc.

            Comment


              #7
              Originally posted by ffejnosliw View Post
              The output value should be a whole number between 0 and RAND_MAX for the target platform as far as I can tell. To get a normalized [0,1] value, you would have to divide it by RAND_MAX (of course that value differs from implementation to implementation). Some testing should be able to come up with a good value to use based on your intended use case.

              It is the same as a constant so you can multiply it with any other value or whatever.

              Keep in mind, it only works when the material is applied to an InstancedStaticMesh or something using an InstancedStaticMeshComponent, such as ProcBuildings. It won't work just applied to a regular StaticMeshActor, InterpActor, etc.
              Ah, ok. I was thinking that it would've been great tool to use for foliage and give them slight variation in colour etc. But since static meshes are out of question, well...

              Is terrain foliage counted as InstancedStaticMeshComponent?

              Comment


                #8
                I *think* foliage uses instancing. I will look around and see if I can find out for sure.

                Edit: From what I can tell, foliage uses instancing but not InstancedStaticMeshComponents so my gut tells me this expression won't work with foliage. If you try it and have different results, please post back and let me know.

                Comment


                  #9
                  ffejnosliw: If you **cough** happen to be looking for a doc to update, the "how to create a Material Effect" doc seems to be sorta sparse, and has dead links. Gave it a read through hoping to gain some insight into outline drawing, couldn't get much from it.
                  http://udn.epicgames.com/Three/PostP...Materials.html

                  Comment


                    #10
                    Duly noted. It will be added to my list, though I can't give any timetable on when I will be able to get to it. Thanks.

                    Comment


                      #11
                      No biggie. Lots and Lots and Lots to learn. And lots.
                      Thanks so much for the attention though

                      Comment


                        #12
                        Sorry to add to your workload, but could you look at the BlendByDepthBias page, and update it to add in DepthBiasAlpha?

                        BlendByDepthBias is apparently obsolete anyway, and the inputs for the two are different enough to ensure that the example can't be interchanged between the two...

                        Comment


                          #13
                          Originally posted by CoffeeGrunt View Post
                          Sorry to add to your workload, but could you look at the BlendByDepthBias page, and update it to add in DepthBiasAlpha?

                          BlendByDepthBias is apparently obsolete anyway, and the inputs for the two are different enough to ensure that the example can't be interchanged between the two...
                          Added to the list.

                          Comment


                            #14
                            In the material compendium itself, there are few broken links like this:

                            The CustomTexture expression allows you to refer to a texture in the HLSL code inside a [[#Custom][Custom] expression....
                            Just search the final for [[ and maybe ]] and it should come out

                            Comment


                              #15
                              Should be all fixed up now (though you won't see it until tomorrow). Those pesky links get me sometimes!

                              Comment

                              Working...
                              X