Home Technical Talk

position based texture in UDK

Hello

I hope this finds yall well.

I have a question about position based materials in UDK. I have seen the information on player position based materials but I am looking for something a little different.

Is it possible for an UDK material to get the location of an object (let's say a plane), then sample said material underneath said plane, then add sampled material to the plane.

I would like the sampled material have the same tiling as the material below (so if you are looking down at the plane, I would like for the plane to blend into the surrounding landscape) but if the plane is moved, the texture does not change.

I believe I can use the object world position node to get the position of the plane but that is about as far as I got. I thought of using a node like DestColor but those materials have to be transparent and I would like my material to look solid.

thanks for your time!

Replies

  • Brendan
    Options
    Offline / Send Message
    Brendan polycounter lvl 8
    So basically you're baking from the world onto the plane?

    If you can, try and set up a render texture or environmentsampler or something to grab the surrounding, and write and use that.

    I don't know if you could do it many other ways, because otherwise you could end up with your plane over two materials, and it may not have the verts or UVs to support it having 2 materials (if you could even get it to pick up and assign both properly).
  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    if the texture on the plane doesnt change then why does it need to be set up dynamically? surely you can just texture the plane to match the material underneath perfectly when in one position and just be static? what are you trying to use this for?
  • matthew
    Options
    Offline / Send Message
    Thanks for the responses

    @tharle i need the texture on the plane to change cause it is not spawned with the level, a mechanic will spawn the plane where the player wants it.

    @brendan thanks for the ideas, i will head down those paths and see what I can come up with.
  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    ah i see, not sure theres any way to do what you want using the normal nodes in the material editor then i'm afraid. it should be possible to use the world x and y coordinates to uv something so that you can apply the same material to the plane and the thing underneath and have then match but i cant see any way to stop that updating when it moves.
Sign In or Register to comment.