I am planning to draw part of a sphere in unreal engine like a projection from a single point. The shape needs to change depending on the angle between the end edges. I am attaching the image for the reference. What will be the best method to draw the shape in UE4.26 ?
I only need to draw the yellow sector bounded by the green thick lines. But based on the angle between the lines, the shape must change.
if you want to create a line from the center of the sphere to the points you can use some scaled cube to make a line and parent with a scene component in the center. Then you rotate the scene component to match the end pointsā¦UVs go from 0 to 1ā¦so vertical pole to pole angle (0 to 180) is the distance from UP and DOWN parametersā¦for example if ABS(UP-DOWN) = 0.5 then the angle is 90 degreees.
If vertical angle is 0 and vector is looking down and DOWN parameter is 0.25 then the angle is 45 degrees.
Horizontal UV (U) is all the circle (like the equator) so ) to 1 equals 0 to 360.
No wireframe but you can mix in the material a grid texture and emulate the wireframe.
This approach is with a material and objects UVs, not with actual geometry.
So far as I understood from the video, you just made a material. Then for clipping what did you do ? Duplicate the material and added the blocks. I see two materials in the content browser. SO got a small confusion.
Its just a materialā¦one is the base material (like the blueprint of it) and the used one is an instance of the material material where you can tweak the parameters.
those params are named UP DOWN LEFT AND RIGHTā¦you can find them in the material BP
My main goal is just to visualize a field of view. Actually i have a camera in the center point and just need to visualize the sphere based on the camera. So i think i will go with the materials. I had a doubt that does using materials will affect the properties or the environment while in game play ?
important point: will the FOV change or camera mm will be fixed? like 35mm or 50mm and never change? If so you can just use a static mesh for thatā¦with the central ālinesā included
Because we are thinking into something that can be adapted to different FOV angles
Yes the fov changes i.e the horizontal and vertical angles should change. But I am not going inside the camera to think the imager size or focal length. I have the angles and the range also (from the center point to the sphere) readily available, so just need to construct the sphere portion with these values.