# global UV map

Hello, is it posible to easily set it up so that everything has a simple grid on it rather than solid colors, AND have the grid being applied to the mesh according to its global location? i know you can do ut to each individual object if you UV map it, but that is not what i want.

take a look at this unreal engine video, and how the grid is applied to the mesh. no matter how he manipulates the mesh, the grid stays the same in global space.

You get global coordinates if you add the object position to Object texture coordinates. You can access the object position using Input > Object Info node, and from Input > Texture Coordinates node choose coordinate system Object. Add them using the Vector Math node.

Then simply connect the resulting vector to whatever textures Vector input.

connect the Position from the geometry node into a checker node

Totally forgot this! Why do it the easy way when things can be complicated

I just tried this out of curiousity, but I got zfighting looking artifacts until I added a Vector Math node set to add or subtract between the geometry node and the checker node. It adds nothing but gets rid of the artifacts… weird. Anybody can explain to me what is going on there?

If you mean the diagonal artifacts, they are still there

I think it’s a floating point problem, where integers are used as floats. As the vertices of the mesh are slightly shifted by floating point errors, the modulus funtion from the checker texture will either peek the value above or below independently for each triangle…

You can work around this by changing very little the checkers scale or the vertices of your mesh.

Hm maybe the unused addition node somehow conditions the values. But I can’t really understand what’s the matter here. It’s just an extruded cube. No subdivisions or duplicate geometry… It looks like this:
http://imgur.com/pDaJzwx

You’re not connecting those nodes correctly. Unless you know what you’re doing, always mind the color coding of the nodes’ inputs and outputs: Green to green, yellow to yellow, blue to blue etc.

Only a green (shader) output may be connected to the green inputs of the Material Output node.

another problem, how can i make this visable in the viewport? i have to go “rendered” view -.-

cycles btw

I just setup the one below, which seems to work fine in material mode:

If choosing to color like I do, you may want to use waves/sawtooth instead (one for each component), since this is already mod continuous. Regular mod%1 may work well for generated coords, but usually fail for object coords which has negative components. The function used doesn’t do anything “weird” or negative coords.

Edit: I made a group out of it where I expose vector and the three scales individually:
Meter < - > Feet (1, 3.048)
Decimeter < - > Inches (10, 12)
Centimeter < - > Inch Fraction (10, 16)
So even if I’m usually working in metric, some documentation we receive at work use imperial units, so I figured it could be useful to allow instant change.

Oh, stupid me haha!:o Thanks for clearing that up for me. However:

In case you can see your attached image - we can not: “Invalid Attachment specified.”

Strange… does it work now?

Yup. Could you upload that scene file somewhere for us to have a look?