Comments (14)
Seems like I can modify https://github.com/jpcy/xatlas/blob/master/extra/example_uvmesh.cpp#L83 to handle the 4 8-bit colors and 4 float colors.
from xatlas.
Apart from the repack example (which is incomplete), the other example output images are just for visualization. The rasterization used to generate them isn't precise, so I don't recommend using them for anything.
from xatlas.
My goal is to take multiple meshes make them use 1 texture and uv space. Then, merge the meshes.
Is this not suitable?
from xatlas.
The repack example here does that, but it doesn't handle bilinear filtering yet.
from xatlas.
Why would it need to handle bilinear filtering?
from xatlas.
I have access to:
INTERPOLATE_NEAREST
INTERPOLATE_BILINEAR
INTERPOLATE_CUBIC
INTERPOLATE_TRILINEAR
INTERPOLATE_LANCZOS
from xatlas.
Because bilinear filtering samples neighboring texels. The repack example copies texture data by conservatively rasterizing charts in the new UV space. A source texel on the edge of a texture may end up in the middle of the atlas and bilinear filtering would lerp with neighboring black texels.
from xatlas.
If we made the original texture twice as big using a filter like LANCZOS and would it have the same effect?
Or the other way around shrinking by half...
from xatlas.
Going back to the theory. Sorry for my misunderstandings.
from xatlas.
Why can't we pad the charts with suitable pixels? https://github.com/jpcy/xatlas/blob/master/xatlas.h#L204
from xatlas.
I have access to a function that takes a square size of image data and resizes it.
template <int CC, class T>
static void _scale_lanczos(const uint8_t *__restrict p_src, uint8_t *__restrict p_dst, uint32_t p_src_width, uint32_t p_src_height, uint32_t p_dst_width, uint32_t p_dst_height)
You create a bounding rectangle here https://github.com/jpcy/xatlas/blob/master/extra/example_repack.cpp#L359.
Not sure where to go.
from xatlas.
@fire you can check AliceVision on github to see how it handles bilinear filtering. It uses geogram which uses xatlas. Here, this is how you do it. I'm going to implement it for example_repack in a week or so.
from xatlas.
There shouldn't be any artifacts with bilinear filtering now.
Comparing input to output, they don't quite match and there's some distortion in the texture data. I think something is off by half a texel.
from xatlas.
Trying the revised code today.
from xatlas.
Related Issues (20)
- Consider restoring texture repack example?
- Question about checking for zero-area-faces?
- Getting Face Materials from Packed Mesh
- co_await support
- Question: mesh transforms
- webassembly build for in browser usage? HOT 1
- How to use this library for regenerating Diffuse UV maps in Unreal Engine? HOT 3
- Packing UV meshes results are invalid HOT 2
- How can chart in internal::pack::Chart be rotated? HOT 2
- support for quad meshes HOT 2
- compilation error: libgtk3 not found error even though gtk is installed HOT 1
- Some charts are flipped after packing HOT 3
- weights dont do anything
- how to solve embree3.dll HOT 3
- How to recompile the shader? I tried to modify a certain shader, but it was not regenerated. I don't know why
- Why is the generation of chessboard grids processed by GPU instead of CPU, so that only one calculation is needed each time, and the rendered code has more universality
- Why is a simple cube unfolding sometimes unstable HOT 1
- Numerical unstable normals calculation causes segfault crashes
- xatlas regression test fails
- Function inquiry HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xatlas.