Home Technical Talk

Worldspace Textures

I am trying to think of a workflow to speed up the world building process and created a triplanar world space texture shader. This allows me to texture a model without having to worry about any of the UV's being accurate(as there is no stretching since the texture is using world space coordinates).

This works well for terrain and terrain pieces, like boulders/rocks that you combine into larger assets without having any seems. My question is if anyone has experience using worldspace textures with hard model assets like buildings, wood planks, etc. 

I am curious if one could really get away with never using local space texture coordinates. It would be a pretty large time saver to only use world space coordinates. I have a slider in shader forge that allows me to rotate the texture in world space to give me variety if I want.

Any thought would be appreciated. Thanks.

Replies

  • Ged
    Offline / Send Message
    Ged interpolator
    you could probably get away with it if all your lighting is either fully real time or if your shader had support for secondary uvs where you bake lighting. Down side is that repeats in textures become really obvious if youve got a large scene so you may need to use vertex colours to blend worldspace materials/textures together to get a pleasing result. Also some realistic things would just look wrong eg on wood planks you would expect the grain and details to go along the length of the plank not just be random wood texture. Perhaps if you went for a stylised art style or followed a specific art direction it could still work.
  • mathius777
    Good points. I have a blend shader that blends a second texture based on the normal angle, so this helps break up seems. It just seemed like a huge time saver to not have to worry about UVs ever. I thought about the wood plank scenario as well. I wonder if you could apply a shader that takes the object space rotation and rotates how the UV displays on that mesh. Then you could use that to make the world space texture align properly with the mesh.
Sign In or Register to comment.