UV Mapping Rotation
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
UV Mapping Rotation
Hi,
is there a reason why there's no "rotation" option for 2D mappings?
We can only scale and translate it.
Can this feature be added?
is there a reason why there's no "rotation" option for 2D mappings?
We can only scale and translate it.
Can this feature be added?
Re: UV Mapping Rotation
It is faster: it requires a 2x(Mul+Sum) instead of a multiplication per a 3x3 matrix. Anyway, it was implemented like this because it was the way old Lux was working as far as I remember.B.Y.O.B. wrote: ↑Sun Feb 11, 2018 3:33 pm is there a reason why there's no "rotation" option for 2D mappings?
We can only scale and translate it.
Yes, it could be an additional kind of mapping or replacement for the current 2D mapping. Is it needed ?
Re: UV Mapping Rotation
Uh, isn't uvmapping3d what are you looking for ?
Re: UV Mapping Rotation
Maybe. I forgot it existed.
I'll test it.
Re: UV Mapping Rotation
I tried to use uvmapping3d on an imagemap, but I get this error:
I guess I can only use it for 3D textures?
What I need is the option to rotate an imagemap.
It is used if you want to cover up the tiling of an image texture, see attached material setup.
It's a bit like this: http://www.neilblevins.com/cg_education ... _trick.htm
Maybe this feature could be added in a new type of mapping (a copy of uvmapping2d with rotation support) to avoid a performance hit for un-rotated uvmapping2d?
Code: Select all
RuntimeError: Unknown 2D texture coordinate mapping type: uvmapping3d
What I need is the option to rotate an imagemap.
It is used if you want to cover up the tiling of an image texture, see attached material setup.
It's a bit like this: http://www.neilblevins.com/cg_education ... _trick.htm
Maybe this feature could be added in a new type of mapping (a copy of uvmapping2d with rotation support) to avoid a performance hit for un-rotated uvmapping2d?
Re: UV Mapping Rotation
I added the support for ".rotation" to uvmapping2d:
Code: Select all
scene.textures.checktex.type = checkerboard2d
scene.textures.checktex.texture1 = 1.0
scene.textures.checktex.texture2 = 0.0
scene.textures.checktex.mapping.uvscale = 5 5
scene.textures.checktex.mapping.rotation = 45
Re: UV Mapping Rotation
Thanks! I added support for it to the addon.
Re: UV Mapping Rotation
Finally had time to try it in a scene I'm working on.
Re: UV Mapping Rotation
Nice result B.Y.O.B., it seems you broke the repetition of the texture.