Home Unreal Engine

Turning a float into texture2D?

polycounter lvl 15
Offline / Send Message
ivars polycounter lvl 15
Hi.

Is it possible to blend some textures together, and then manipulate the UV:s for it.
As I get it, you can only plug Texture coordinates in to a texture2D but the results from my blends would be a float....
Is it possible to turn that float in to a texture2D somehow?

Here's a screen of what I'm working on. I'm trying to create a normalmap from heightmap (very wip still :P). Now, everywhere I have the texture samples I would like to be able to plug in the combined results from a few blends...

Replies

  • imbueFX
    Options
    Offline / Send Message
    imbueFX polycounter lvl 5
    The short answer is no. But there are workarounds. Can you be more specific on what you're trying to achieve? Your material network seems overly complicated, are you trying to generate a normal map from a single color channel?
  • ivars
    Options
    Offline / Send Message
    ivars polycounter lvl 15
    Yeah, I can see how it wouldn't work as it would need another pass.... Some kind of render to texture and then another texture lookup.
    The network here is just me trying to generate a normalmap from a greyscale heightmap (one channel in this case) I know it's probably not that optimized, or good for that matter.... The whole end part for the blue channel is messed up and should be done completely differently.

    My initial thought was if it was possible to combine different heightmaps and then generate normals from that info.

    I first tried using the HeightmapToNormal-node but that one only takes a texture2D, which was why I decided to try to make my own, and now I know why it's like that :P

    Like adding rivets to a surface or multiplying cracks on to another....
  • imbueFX
    Options
    Offline / Send Message
    imbueFX polycounter lvl 5
    I think it's cool from a conceptual standpoint to make your normal map in the material. If anything, it's a great exercise. But yes, it's incredibly expensive on instruction count. :)

    Why not use a program like crazybump to generate a normal map from a height map?
Sign In or Register to comment.