- Home /
Projecting camera view on to a right angled surface
I am rendering the camera view on to a render texture and subsequently applying the render texture on to a material that I am applying to the inside of a cylinder, as seen in this image:
Thus, you can see that the camera view is sort of projected on the bottom corner of the cylinder wherein part of it is on the curved surface of the cylinder and part of it is on the base of the cylinder. The camera view that is being projected is of a square wall: Now as you can see, the projection on the curved surface of the cylinder is consistent with the camera view; i.e. the horizontal stripes remain horizontal, whereas, on the base of the cylinder, the stripes change orientation and become vertical.
Can anyone shed any light on why this might be happening? And what can I do to rectify it? TIA!
Answer by Zaeran · Sep 08, 2020 at 12:23 PM
It's most likely the UV mapping of the cylinder. You'll likely need to create a new cylinder in a 3D modelling software such as Blender, and adjust the UV map to get the result you want from the rendertexture
Thank you @Zaeran I'll definitely try that out. Could you possibly link any pertinent resources for UV mapping for my use case here? I'm kind of new to it
Sure thing :) YouTube is probably your best bet. Here's one solid tutorial: https://youtu.be/xPoxqOcUzNQ
Thank you @Zaeran It was indeed a problem with the UV mapping and changing the UV mapping did the trick Thank you so much!
Your answer
Follow this Question
Related Questions
Rendering a Pygame surface in Unity 0 Answers
Assigning a render texture to many objects? 0 Answers
Render Single Camera to Two Displays 0 Answers
How to call Camera.Render from Update 1 Answer
Check if mouse is over GUI element using Rendertexture? 1 Answer