Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Nov 2009
    Posts
    29

    Question UDK/Unreal engine (Materials Help)

    I want to make a material that truns transparemt the closer you get to it, as i want to make a atmosphere. when you on the ground you see the sky and when you go into space the atmosphere fades and you can see the universe.

    Please help

  2. #2
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    Well, what part are you stuck on? What have you done/tried so far?

  3. #3
    Join Date
    Nov 2009
    Posts
    29
    Well i tried the material editor but i could not make it go more transparemt when you move closer but i was thinking about using post processing blocks to do it, would using post processing be better than trying to do it in the material editor or will i have to write code.

  4. #4
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    What did you try in the material editor? Try to break down the elements of what you want to do and find material nodes that might help achieve that. I'd rather help you learn to problem solve than just tell you the answer.

  5. #5
    Join Date
    Nov 2009
    Posts
    29
    Im at school at the moment so i need to check it at home, I will reply with what i done in 90min

  6. #6
    Join Date
    Nov 2009
    Posts
    29
    What i did was; I used a costant3Vector for the sky and put it on diffused. i thought that to make it fade i would need to use opacity. so i worte out what what i wanted to do; what was the material will fade the closer the player gets. so what i thought was (Starting from opacity) use a If and if A is high then b then fade but if a is not biger then b dont fade but i need help on how do i tell the material editor were then cam is.

  7. #7
    Join Date
    Sep 2008
    Location
    Salisbury, UK
    Posts
    2,812
    Help (maybe...) from a fellow noob:

    One thing does immediately strike me - you are trying to vary something, but you've set up a constant...?

    Cheers, G.

    I found
    my current avatar on google, so props to THIS GUY who created the original...

  8. #8
    Join Date
    Nov 2009
    Posts
    29
    Im using a costant3Vector just for the diffused and it works fine as that the only thing conected to it, but the problem i am having is with opacity. what i want to do is when the cam/player gets closer; the opacity changes but i kind off work it out how to do it but i have one small problem and that is; how do i tell the materual editor how far away the cam/player is from the material it self, i thought of using a if but cant think of What to put for value a or b to tell the editor the distence from the player to the material. the other of doing was make a bule materual that you can see past it and use lots of differnt layers of post processing block but that will slow down the game more and i dont real want to do that

  9. #9
    Join Date
    Sep 2003
    Location
    Raleigh, NC
    Posts
    7,272
    So in other words, you want to know the DEPTH to the current PIXEL being rendered. And you want to INTERPOLATE between two values for your opacity based on that value.

  10. #10
    Join Date
    Nov 2009
    Posts
    29
    Yeah that had help if you word it that way, i going to spend the rest of the day trying it and reply tomoz if I was succes full or not, thanks for the help

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •