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

Random UV rotation in steps (new option) #528

Closed
juangea opened this issue May 3, 2021 · 3 comments
Closed

Random UV rotation in steps (new option) #528

juangea opened this issue May 3, 2021 · 3 comments
Assignees

Comments

@juangea
Copy link

juangea commented May 3, 2021

Right now we can randomly rotate the UV's which is great for pur randome or tileable textures, however when we have a tile texture for floors if we randomly rotate the texture we could endup with diagonal graphics in the floor, something that it's not desired.

Could be great to include a step feature, so we can say what we say right now:

  • Randomly rotate from 0 to 360 degrees.

But clamp the rotation to the steps, for example:

  • Randomly rotate from 0 to 360 degrees in steps of 36 degrees

This would give us 10 random rotations in a controlled angle clamping, for my tile example it would be:

  • Randomly rotate from 0 to 360 degrees in steps of 90 degrees

That would give us 4 directions for each tile, like what it's done in reality, and much more control of random rotation in tiling :)

I'm not sure if this is a BlendLuxCore feature or a LuxCore feature, I'll mention both of you about this @Dade916 @Theverat :)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Dade916
Copy link
Member

Dade916 commented May 3, 2021

It is a LuxCore feature. Indeed, it is relatively easy to add.

@Theverat Theverat transferred this issue from LuxCoreRender/BlendLuxCore May 3, 2021
@Dade916 Dade916 self-assigned this May 9, 2021
@Dade916
Copy link
Member

Dade916 commented May 10, 2021

I have added the support for a new (optional) rotation step parameter to UVRandomMapping2D and LocalRandomMapping3D:

Without step:

scene.textures.imgtex.mapping.rotation = 0 360

With:

scene.textures.imgtex.mapping.rotation = 0 360 45

@Dade916 Dade916 closed this as completed May 10, 2021
@juangea
Copy link
Author

juangea commented May 10, 2021

Awesome! Thanks @Dade916 , very useful addition :)

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

2 participants