Announcement

Collapse
No announcement yet.

List of material expressions

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

  • replied
    I believe you just multiply your normal map by the output of the TwoSidedSign and use that as your normals. That seemed to do the trick in my tests. It is only meant for use with the CustomLighting lighting model, though. The normal Phong lighting model does this automatically as far as I know.

    I updated the page with an example image that should show up tomorrow.

    Leave a comment:


  • replied
    I actually have a minor request too.
    Originally posted by TwoSidedSign
    The TwoSidedSign expression is useful for flipping the normal on backfaces of two sided custom lighting materials to match the functionality of Phong. +1 for frontfaces, -1 for backfaces of a twosided material.
    That's awesome and I'm sure I could have a lot of uses for it since I use a lot of two sided mats. I have no idea how to plug it in to my materials though.
    Is it an automatic thing if I have this in line with my Normal? It autoflips if it's on the backside?
    If there's some trick to how you need to set it up (beyond "Connect Normal map to TwoSidedSign. Connect TwoSidedSign to Normal material slot"), could you post an example?

    Leave a comment:


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

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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...

    Leave a comment:


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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


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

    Leave a comment:


  • replied
    Thank you very much. This is exactly what I was locking for.

    Leave a comment:

Working...
X