Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture offset and repeat settings on Material object #11193

Closed
brianchirls opened this issue Apr 18, 2017 · 6 comments
Closed

Texture offset and repeat settings on Material object #11193

brianchirls opened this issue Apr 18, 2017 · 6 comments

Comments

@brianchirls
Copy link
Contributor

Currently, the only ways to adjust the offset and repeat are to either change it on the texture object or to change the UV coordinates of the geometry. However, there are cases where it would be useful and performant to adjust on the Material.

For example, imagine creating a room where the walls would share a repeating texture - perhaps tiles, drywall, marble, etc. Ideally, you'd be able to use a single texture for all the walls and a single geometry, with each wall as its own Mesh object with different scales, positions and rotations. But if the walls had different dimensions, the tiling pattern would be stretched differently on each wall. To solve this now, you'd either have to make many instances of the texture, each with its own repeat/offset values or you'd have to give each wall its own geometry. It would be easier, faster and more flexible to allow each Mesh to have its own values.

Yes, you could merge the whole room into a single geometry and tweak the UV values. But that's much harder to do procedurally and it doesn't suit cases that require flexibility such as a scene editor. And it's slower to adjust in real time.

(This issue replaces #10490)

@WestLangley
Copy link
Collaborator

See #5876. You have to read the whole thing though. :)

@brianchirls
Copy link
Contributor Author

@WestLangley Thank you for sharing that nightmare with me. I didn't realize it was a classic - not sure how I missed it.

Looks like it's a popular issue that's been sitting stale for ~15 months. Any idea what it might take to move it along? #8278 is also of interest as I recently ran across the same use case as mentioned here.

@WestLangley
Copy link
Collaborator

@brianchirls It is up to @mrdoob, of course. A good time to request such large-scale changes is right after a new version is released.

@pailhead
Copy link
Contributor

Each texture uniform should have another uniform on the shader managing the channel and the repeats. Or hold that information while sharing the actual image data( same way mesh/geom work)

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 19, 2017

@brianchirls Is it okay for you if i mark this issue as duplicate and close it? It might be better to resume the conversation in #5876.

@brianchirls
Copy link
Contributor Author

@Mugen87 Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants