Print at Aug 15, 2018 4:29:20 PM View all posts in this thread on one page
Posted by bdfd at Nov 27, 2017 6:03:02 AM
sad   Texture on a shape
Hi,

why have this bad rendering in automatic with a texture on a box ?



Front, back, top and bottom OK but not right and left ?

I know that manually it's possible but when you have more 5 boxes, it's too long... drooling
I think that manually is good when the textures are different by faces...

More, when I put manually a texture on the second box (right), I saw that the sizes are not the same for front, back, left and right faces and OK for Top and bottom ???



Can you correct this 'bug' ?

Regards.
smile
----------------------------------------
only 5.7 and nothing else - W10 64b

Posted by Puybaret at Nov 28, 2017 1:19:45 PM
Re: Texture on a shape
It's because how texture coordinates are handled in Sweet Home 3D.
When you change the texture of an object with the Texture button in its furniture modification dialog box, a formula computes automatically the mapping of the chosen texture on the entire 3D model, using the size of the texture. The problem is that formula isn't flexible enough to get the results you expect on the 6 sides of a box.
At the opposite, when you change the texture of a material in the Furniture materials dialog box, this formula is used only if texture coordinates are not defined on the shape matching the modified material (the box provided in the default catalog comes with texture coordinates defined for its sides and applied in such a way that a texture should cover an entire side).
This gives two more or less logical ways to handle textures for users, without letting them bothering too much about the notion of texture coordinates which remains something quite complicate for the targeted audience of Sweet Home 3D.

For a long time, I've been tempted to program an exception for the default box to ensure the texture would be mapped more nicely on its left and right sides when the texture is set with its furniture modification dialog box. But then why not introducing an exception on the default cylinder or the default triangle too? And how to explain to users that this behavior won't be applied on a cube they will import themselves? It's a complicated subject but I'm opened to discuss about it...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer

Posted by bdfd at Nov 28, 2017 5:24:17 PM
Re: Texture on a shape
I tried with the texturableBox.obj in the given link.
=> It's not perfect but it's better...

So I did do working my brain (yes it's possible laughing ).

I took 6 default boxes (1, 1, 0.001) & (1, 0.001, 1) & ..., one by face with their own texture.
I built a new box (1, 1, 1) in a new group.

See the result :

Left : new box
Right : same box with height = 2

=> EUREKA ! the textures are not distorted ! wink
=> All sides are correct.

It's a complicated subject...
Perhaps, but sometimes, a good think gives better result.

smile
----------------------------------------
only 5.7 and nothing else - W10 64b

Posted by Puybaret at Nov 28, 2017 5:42:18 PM
Re: Texture on a shape
3 boxes are probably enough since only the left and right sides are not correctly textured.
But from your previous message, I understood you thought this solution was taking too much time!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer

Posted by bdfd at Nov 28, 2017 6:20:25 PM
Re: Texture on a shape
But from your previous message, I understood you thought this solution was taking too much time!
Yes, so I created a new object put in a group for all my projects.
One update of the group is only necessary for the 6 sides.

I'll do the same thing for triangular shape...
----------------------------------------
only 5.7 and nothing else - W10 64b

Posted by bdfd at Nov 29, 2017 12:33:48 PM
Re: Texture on a shape
I'll do the same thing for triangular shape...
Yes, I did it !



I you want them, contact me.

smile
----------------------------------------
only 5.7 and nothing else - W10 64b