POV-Ray : Newsgroups : povray.general : mesh camera for UV-mapping output : Re: mesh camera for UV-mapping output Server Time
19 Apr 2024 17:34:05 EDT (-0400)
  Re: mesh camera for UV-mapping output  
From: William F Pokorny
Date: 12 Nov 2022 07:13:27
Message: <636f8de7$1@news.povray.org>
On 11/12/22 04:04, And wrote:
> May I ask an important question?
> When I using mesh_camera, (for texture baking), its coverage is not sufficient
> at the edge(seams). Just like the document said:
> -----------
> If used for texture baking, the generated image may have visible seams when
> applied back to the mesh, this can be mitigated. Also, depending on the way the
> original UV map was set up, using AA may produce incorrect pixels on the outside
> edge of the generated maps.
> -----------
> Has this problem been solved?

I'm not aware of a general solution. I don't generate or use uv maps 
much, but some ideas.

- If you are not using interpolation when reading the image map, suspect 
using it might lesson the seam artifact in your case. Interpolation may 
also introduce seams in other cases I think.

- For simpler shapes using the matching camera type - ie spherical 
camera - to create the map images and then the same image_map mapping 
will be cleaner than mesh based texture baking and uv mapping.

- What happens if you generate your map image with a higher resolution 
mesh than that to which you map in the actual render? It might be too, 
higher resolution image maps (denser mesh camera), help.

- IIRC, there are some suggested ways to bake map images via meshes 
while doing some AA via different meshes which might help. I've never 
played with the technique outlined. I suspect POV-Ray's inbuilt camera 
ray AA won't be of much help.

- Scaling your uv map image up say 2x/3x in an external program will 
likely mitigate the seams.

- Have you tried rendering at different output resolutions to see how 
any seams might change? (Rendering large and shrinking a help?)

I have for a long time wondered how seams in the map image are handled 
in the non POV-Ray cgi game. There images are typically cookie cutter 
sheets for different parts of the uv mapping onto the overall mesh. Maps 
I've played with 'sometimes' have visible seams too which in my 
experience often do create minor artifacts...

When we read an image map we can use (pixel) interpolation - but we 
perhaps should not where image maps used for uv mapping (or for any 
non-continuous mapping such as images for cubic warps). The reason is 
the seams cut off sharply in many uv image maps and any interpolation 
will be looking at adjacent (or wrapped) pixels and not pixel adjacency 
as the image is used in uv mapping on the mesh. This, I think, forces us 
to higher resolution maps than might otherwise be required for smooth 
rendered results.

It is possible with cubic warp mapped images, for example, to create the 
images in a way which looks for and includes the correct adjacent pixels 
at the seams so that smaller, interpolated images can be used while uv 
mapping. I think I posted about some of my experiments - using user 
defined cameras to create such 'interpolate-able' images. Unsure how to 
do this in general. Perhaps there are too some post initial image mesh 
walking AA / smoothing techniques possible, but I'm not aware of 
anything like a canned program though.

Anyhow... Interested.

Bill P.

Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.