EmbarkStudios / texture-synthesis

🎨 Example-based texture synthesis written in Rust 🦀
http://embark.rs
Apache License 2.0
1.75k stars 83 forks source link

Please add to readme manual about how to reproduce "7. Combining texture synthesis 'verbs'" #13

Closed DenisSergeevitch closed 5 years ago

DenisSergeevitch commented 5 years ago

In provided manual at the moment hard to find out how to reproduce a result from: "7. Combining texture synthesis 'verbs'' section.

Here is a source image: nal

Here is a mask file: nal

And here is a result, which is not even closly nice as the example in readme file :) nal_1

Could you please help to understand why it is happening?

Command that gave that result: .\texture-synthesis.exe --inpaint imgs/masks/nal.jpg --in-size 500 --out-size 500 --tiling -o out/nal_1.jpg generate -- imgs/nal.jpg

anopara commented 5 years ago

Hi Denis! You'd need to use guided synthesis, similar to example 3. At the moment, there is no way to enforce symmetry during synthesis -- a trick around is to generate only half and mirror it later :)

We also describe this example during our talk. I linked it around the time where it is being mentioned.

cfoster0 commented 5 years ago

On a related note, how did you handle UV unwrapping for the rock synthesis? The color/displacement maps look like a top-down projection but then the output models have nice overhang and side features.

anopara commented 5 years ago

Hey, @cfoster0! I iteratively relaxed the model while pinning its "borders" to a unit square (min dist projection) to minimize distortion (which is still present, but that's the trade off for keeping the unwrap continuous since texture synthesis currently doesn't support discontinuities). Probably a similar setup can be achieved directly in UV space! I did it with geometry in Houdini