Page 1 of 1

Random Texture Rotation

PostPosted: Wed Feb 16, 2011 8:20 am
by Quen
Hi there,

I read this in a thread somewhere in this forum a few weeks ago, but could not find it again. But the idea has a lot of potential, I think.
Would it be possible to create a random texture rotation (for the single textures that are used to create the texture map) to avoid the tiling effect on larger areas?
I guess this would be complicated as there would have to be some real texture splatting and merging instad of just tiling them. So I'm not sure if the time and effort would be worth it, but it would let the terrain look a lot more random/natural. :-)

Greetings,
Quen

Re: Random Texture Rotation

PostPosted: Thu Feb 17, 2011 2:24 am
by Telarus
You can make your own tiling textures in Photoshop that are higher res and hide tiling better, and then tell L3DT to use those when generating the texture map.

Here's how to make something a tilable texture:

http://robertokoci.com/diffuse-texture/

Then, the trick is to scale up your canvas by x2, and then copy your original texture 4 times and arrange in the 4 quadrants.

Then, scale your original texture up by 200% and fit neatly onto new canvas size.

So, you'll have 2 layers. 1st with scaled up original texture, 2nd with original tiled x4.

Then, you use the 'mask' feature on the top layer.

Now here's the key. If you make sure your canvas is always a power-of-2 number (128, or 512, or 1024, say), then the Filter> Render> Clouds function spits out a 2 color "cloudy" map that is instantly tillable.

So you render some black and white clouds into the mask layer. This hides random sections of your scaled up texture and lets parts of the "detailed" layer show through.

You can also use 2 closely related textures, instead of the same at different scales.

As an example, here is a "grass/muddy-grass texture I make using this technique. The original was 2048x2048, but this has been scaled to 800x800 by photobucket for ease of web view:

Image

There are other tricks you can do to get rid of seams and make tiling less noticeable.

http://library.creativecow.net/articles ... tiling.php

http://www.hourences.com/tutorials-texture-tricks/

I'm not totally sure how the image-size to final texture scale is in L3DT. Aaron, can you point to something on the Wiki?

Re: Random Texture Rotation

PostPosted: Wed Mar 16, 2011 10:05 pm
by Aaron
Hi Telarus,

Telarus wrote:I'm not totally sure how the image-size to final texture scale is in L3DT. Aaron, can you point to something on the Wiki?


It depends on the resolution settings in the material texture layer (see here) and the TX/HF resolution set in the texture settings wizard. By default it's 1:1 with the output texture map, but there are various ways to stretch the texture out further than this. If you want the texture to be more compressed, you have to do the down-sizing in an image editor; L3DT doesn't do that on the fly because it's computationally expensive.

Cheers,
Aaron.