POV-Ray : Newsgroups : povray.general : Repeating texture sprite : Re: Repeating texture sprite Server Time
29 Apr 2024 14:00:21 EDT (-0400)
  Re: Repeating texture sprite  
From: Anthony D  Baye
Date: 29 Feb 2016 09:45:01
Message: <web.56d458f63999a40fd6b6fe10@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Argh.
> Sorry.  I started reading this before enough, or any, coffee was consumed.
>
> Anthony - that is some wicked cool stuff right there.
> Thanks for that - I really enjoyed watching that guy bang out a nicely aligned
> tile set in no time at all.   Very educational!
>
> Mike - I think the two concepts are separate, but related.
>
> The diamond-square algorithm can get you a nice terrain:
>
> http://www.paulboxley.com/blog/2011/03/terrain-generation-mark-one
> http://www.playfuljs.com/realistic-terrain-in-130-lines/
>
http://www.javaworld.com/article/2076745/learn-java/3d-graphic-java--render-fractal-landscapes.html
>
> And it won't tile _if you generate it completely randomly_ .
>
> So maybe what you do is take a cue from the video showing how it's done in
> Photoshop and use that to keep the opposite edges of the large square the same.
> Whatever's at 0,0 is what ought to be at 128,0.   Whatever's at 32,0 is what
> 32,128 ought to be.   That way if you did that double-half-displacement thing,
> the edges would be identical.
> You could probably do that at the time of generation or maybe even as a
> post-generation interpolation across a wider swath.
>

The diamond square will tile if you wrap the calculation over the edges.

> I think if you check out the guy's tile set with the dirt and grass, you'll see
> that it's a radial pattern / texture - akin to a circle in a square, but not
> quite circumscribed.   The edges always match, and you get a nice solid center
> tile.
>
> If I'm following Anthony with his idea of generating shades of grey - then maybe
> he's suggesting using a texture map.  Make one greyscale tile set, and then use
> POV-Ray to put the right terrain on the different greys to generate the
> transitions.   (I admit, I haven't thought it out completely, but I think that
> might be what he's suggesting)

That's pretty much it.

Regards,
A.D.B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.