Home Unreal Engine

Material Tree error

polycounter lvl 13
Offline / Send Message
JobyeK polycounter lvl 13
It's my first time working with the material system in UDK and I've stumbled on this weird error.

I've been trying to get the glossiness to work as it does in Max, and from what I read online, the best way is to plug a Lerp node into SpecPower with min and max constant node values plugged into A and B and the glossiness map plugged in the Alpha.

My setup is as follows and you can see the error in red:


error%20glossiness.jpg

Any ideas what's causing this error? Minotauro thought maybe it was the way I plugged the emissive, but tried using a constant instead, but I still get the error.

Replies

  • Ben Apuna
    Change the Alpha input of your Lerp to one of the output channels of that Texture Sample rather than the RGB output. RGB output (the black square) is all 3 channels R, G, and B in one.

    EDIT:

    You need to feed the Lerp's alpha input a single channel such as Red, Green, Blue, or Alpha channel output from the Texture Sample.
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    yup ben is right. By plugging in the texture sample, you're plugging in RGB which is float 3 but is just looking for a float thus the error :)
  • JobyeK
    Offline / Send Message
    JobyeK polycounter lvl 13
    Ah thanks guys it works! I just put my glossiness into the alpha of my normal map so I have even less maps, so it's perfect.

    While I'm at it, I had another question about texture sizes. Right now, UDK compresses automatically my textures by half (my 2048s are compressed to 1024), how do I prevent this compression as I don't want that right now?
  • Ben Apuna
    Bring up the texture properties in the content browser and set it's LODGroup to TEXTUREGROUP_RenderTarget. You'll have to do this for each texture that has a resolution greater than 1024.

    You can also set the texture's LODBias to -2 to make the textures LOD further away from the camera (makes them appear sharper up close).

    You might have to reload your textures and resave the package for the changes to take effect.

    One other thing you can do is check Defer Compression to True/On which allow you to import your textures uncompressed, however this only lasts until you save the package at which time the textures then get compressed.
  • JobyeK
    Offline / Send Message
    JobyeK polycounter lvl 13
    Awesome! Thanks for the help Ben!
Sign In or Register to comment.