Procedural Wood Floor

I found this great looking procedural texture:


but when shape is something else than square, texture gets deformed.
(shape was edited in edit mode, so it’s not a scale problem)
And all details are lost too.
Thank you for help


.blend file - https://dl.dropboxusercontent.com/u/55113627/test_WoodFloor.blend

It’s enough to tab into wood group and change coordinate output from UV to Object to correct this.

Thank you :slight_smile:
It worked to get back details, but planks are still squeezed as in the first screen :frowning:

Edit: OK I assigned “Object” texture coordinates to “Brick Texture” too :slight_smile:




If it helps, here’s a video demonstrating the difference between Object and Generated coordinates:

Thanks great explanation :slight_smile:
That’s what I discovered today too - texture node use by default “Generated” coords if nothing is plugged into vector socket and “Generated” behaves like a bounding box.

also big difference for the scale in object like X 10
not certain why

happy bl

Attachments


just to explain a bit more about coordinates…

I’ll start with the ‘Position’, because it’s better to go from here.
-‘Position’ is the world coordinate. The Origin is the blender origin, and the values go from negative to positive in all axis (XYZ) and their scale is the default blender unit. ( be aware that scaling the dimensions in the world settings doesn’t change the unit size in materials)

-‘Object’ is very similar to ‘Position’, but the Origin is instead the object origin. Also, because objects can be affected by transformations (the world can’t!), ‘Object’ coordinates will reflect those transformations.

-‘Generated’ is similar to ‘Object’ with the only difference that the coordinates are scaled to the interval between 0 and 1 in each axis (‘Object’ coordinates, on the other hand, can be negative and also bigger than the unit).

@RickyBlender, the wave and the gradient textures (more visible in their radial/spherical results) use the [0,0,0] as the center. And in the generated coordinates this point is moved to one corner of the object’s bounding box. Also, when no vector input is supplied, cycles uses ‘Generated’ by default.

but why does it affect the scale so much!
I can see the center location change but not the scale !

I thought generated use the Bounding box coordinates instead of the object center !
and center was on the left bottom side.
but what about the scale !

thank
happy bl

the scale of the generated is only 1, whatever size the object is…
In your example, if you place the origin of the plane in the bottomleft vertex and set the size of your plane to be 1x1 unit, the result will be identical.

ohh… and just tested to confirm what I said, the ‘Generated’ will set the Z to 1 in the case of a plane, which scales the wave texture even more. (this is a interesting behaviour, to choose the z max value of an object that is bidimensional in xy!! :/)

also just noted another strange thing for a plane
if you change dim it will affect the XY and Z value
and one will rotate it

so this looks like this dim is using the bounding box values and not the plane itself cause a plane does not have any Z as such

happy bl

@Secrop: “…to choose the z max value of an object that is bidimensional in xy” - is it?
I don’t feel like it is http://www.pasteall.org/pic/show.php?id=99293
Object’s origin is on [0,0,0] and it’s not 2-dimensional to better visualize procedural’s ‘position’ in 3d space.

@eppo, I didn’t went for a correct measure the first time… but here’s the final and correct information:

when using the generated coordinates on a plane (parallel to xy) the returned z value is 0.5 (in my earlier post i assumed it was 1 but i was wrong)
like this: http://www.pasteall.org/pic/show.php?id=99297

generated use center point of the OB to map things!
so yes Z = 0.5

but if you change your center then won’t be true

happy cl

not in the single plane case… Unless you add vertices to change the bounding box of the object.

changing the origin does not affect the generated coordinates… but it will affect the object coordinates!

right mixing words

see pic here

happy bl

Attachments


For me this looks like texture generation starts at Object’s bounding box corner (idk how to properly mark or name it) if mapping is Generated and at objects Origin if mapping is set to Object. Best is seen if texture is Wave - Spherical.

It’s the [0,0,0] point of the bounding box, so I call it the “Bounding Box Zero Point” in my mind. I suppose Generated textures could have (A) originated at the [0,0,0] point, (B) originated at the center [(xMin+xMax/2), (yMin+yMax/2), (zMin+zMax/2)] point, or © originated at the Object’s Origin Point (as an Object-Coordinate system does). Blender uses option A.

What’s always confused me is why the default setup between Generated and Object coordinates gives different results. It seems to me that the default Generated system (Default Cube --> Apply Texture --> Generated Coordinates) should match the default Object system (Default Cube --> Apply Texture --> Object Coordinates). However, the Object coordinates come in at half the size:


Seems counter-intuitive to me.

well 4^(Scale = 2) = 16
square X * square Y = area scale

happy bl

In the case of your cube, the generated coordinates start at one corner of the bounding box, with the value (0,0,0), and end in the other side with (1,1,1).
The final space is allways 1x1x1.

On the other hand, the object coordinates start at the cube’s origin, and go in all axis in blender units (with the object matrix applied to the coordinates)…
The final space will be the object dimentions. In the cube, it goes from (-1,-1,-1) to (1,1,1), therefore 2x2x2.

Well, when you put it that way, Secrop… That’s a nice, clear explanation. I guess I expect too much of our default cube :slight_smile: