Rendering Point Sprites through cameras in cubic maps

I represent a particle system with vertices that are then tessellated into ATVs in a geom shader and textured / displayed as point sprites. Then they are scaled in size depending on how far they are from the camera. I am trying to map every frame of my scene to a cube map. So basically, I put six cameras in my scene and point them in each direction for the face of the cube and save the image.

My point sprites have different sizes. When they approach the border of one camera (if they are large enough), they appear in two cameras at the same time. Since point sprites are always facing the camera, this means that they are not continuous along the seam when I translate the cube map back into 3D space. This is especially noticeable when the points are close enough to the camera, since the points are larger and stretch further into both types of cameras. I also do alpha blending, so this may also help in solving the problem.

I don’t think I can just drop the points closer to the edge of the camera, because when I get back to 3d, I think there will be strange areas where the cloud will be more sparsely populated. Another thought I had was to blur the edges of each camera, but I think that would also give me a strange blurry area when I return to 3D space. I feel that I can manually edit the frames in Photoshop so that they look normal, but it would be kind of pain, since this is an animation at a speed of 30 frames per second.

The attached image is a part from a cube map. You can see a horizontal seam where the sprites are not aligned correctly, and a slightly less noticeable vertical seam on the right side of the image. I am sure that my camera settings are correct because I used this setting in other scenes and my cubes look normal.

Does anyone have any ideas?

I do this in openFrameworks / openGL fwiw.

Detail from cubemap file

+4
source share
1 answer

Instead of looking at the camera, can you come across the origin of the cameras? Not sure if this will fix everything, but intuitively I would say that it should be close to OK. Perhaps this is already what you are doing, I have no idea.

enter image description here

(I would like it to be a comment, but without a reputation)

0
source

Source: https://habr.com/ru/post/1599767/


All Articles