Object texture size as a function of camera distance
Hope yall doin great. I am a complete noob with UE (game engines in general) but I have been doing 3d work for few years (Maya,Zbrush and so on). So I would like a bit detailed help if possible instead of a few code words :| :) Any help would be appreciated!
Alright, I have a plain terrain that has a camera and a plane wall (with numbers and words as texture) perpendicularity facing the camera. I have gone upto a level of adding a texture to the wall. I need the texture to increase in size as camera gets away and decrease as camera moves closer to it. How would I do it? Do I use event graph and blueprint(have still to learn what they are).
How do I set up a float number counter (where you enter a number) in the start of the game that you give the size of the texture of an object. Say if I write the in the box as 10, the texture size is 10. And after that, when game starts, it is relative to camera position?
Thanks and cheers mates! Have a great weekend. Im getting drunk myself,
asked Jul 03 '15 at 01:24 PM in Using UE4
1) In level blueprint use get distance to node to find the distance between camera and object and add it to event tick.
2)Create a new material instance parameter from add new and add a scalar parameter to it. In the level blueprint assign the camera object distance to the scalar parameter.
2) In material blueprint create a 2dtextureparameter and create a texcoord node. Multiply the texcoord node and the created scalar parameter and input to 2dtexture.
Voila! Now if you run it the texture size changes as the function of camera distance.
answered Jul 27 '15 at 09:05 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here