POV-Ray : Newsgroups : povray.general : Repeating texture sprite Server Time
16 May 2024 11:11:06 EDT (-0400)
  Repeating texture sprite (Message 6 to 15 of 25)  
<<< Previous 5 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Anthony D  Baye
Subject: Re: Repeating texture sprite
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

From: Bald Eagle
Subject: Re: Repeating texture sprite
Date: 29 Feb 2016 10:50:00
Message: <web.56d468a63999a405e7df57c0@news.povray.org>
http://www.bluh.org/code-the-diamond-square-algorithm/

discusses "wrapping" over the edge.

http://www.mapeditor.org/    looked interesting if you're doing that kind of
work.


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Repeating texture sprite
Date: 29 Feb 2016 19:30:06
Message: <web.56d4e18b3999a40fd6b6fe10@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> http://www.bluh.org/code-the-diamond-square-algorithm/
>
> discusses "wrapping" over the edge.
>
> http://www.mapeditor.org/    looked interesting if you're doing that kind of
> work.

I was thinking that if you assigned each tile a shade of gray, you could use the
value of each pixel to tell you what tiles to place.

here's some old code I wrote for the diamond square algorithm:
https://www.dropbox.com/s/wbr4h93jssm6pfn/dsquare.tar.gz?dl=0

comments are almost non-existant, and it's somewhat messy, but it's functional.
I included the makefile so you can build it easily.

usage is lScape5 width height

really, I could have just used one parameter, since the image has to be square.
Also, the dimensions have to be one pixel higher than a power of 2 for it to
work: eg. 257x257 or 513x513

Regards,
A.D.B.


Post a reply to this message

From: Bald Eagle
Subject: Re: Repeating texture sprite
Date: 29 Feb 2016 22:05:01
Message: <web.56d5066b3999a405e7df57c0@news.povray.org>
I also just found this, from ... 1998

http://news.povray.org/povray.general/message/%3C01bde695%2434006a80%246a0e8dc3%40default%3E/#%3C01bde695%2434006a80%24
6a0e8dc3%40default%3E

Does anyone have a copy of this include file squirreled away on their hard
drive?
TdG probably has it, but it might take him all week to find it...   :D

Sounds pretty interesting though.


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Repeating texture sprite
Date: 29 Feb 2016 22:55:00
Message: <web.56d511733999a40fd6b6fe10@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I also just found this, from ... 1998
>
>
http://news.povray.org/povray.general/message/%3C01bde695%2434006a80%246a0e8dc3%40default%3E/#%3C01bde695%2434006a80%
24
> 6a0e8dc3%40default%3E
>
> Does anyone have a copy of this include file squirreled away on their hard
> drive?
> TdG probably has it, but it might take him all week to find it...   :D
>
> Sounds pretty interesting though.

http://www.reocities.com/SiliconValley/Lakes/1434/tilegen.html

Regards,
A.D.B.


Post a reply to this message

From: Mike Horvath
Subject: Re: Repeating texture sprite
Date: 1 Mar 2016 02:24:55
Message: <56d543c7$1@news.povray.org>
On 2/29/2016 10:03 PM, Bald Eagle wrote:
>
http://news.povray.org/povray.general/message/%3C01bde695%2434006a80%246a0e8dc3%40default%3E/#%3C01bde695%2434006a80%24
> 6a0e8dc3%40default%3E

Maybe here:

http://www.reocities.com/SiliconValley/Lakes/1434/otherincludes.html

https://web.archive.org/web/19991106003247/http://www.geocities.com/SiliconValley/Lakes/1434/otherincludes.html


Post a reply to this message

From: Mike Horvath
Subject: Re: Repeating texture sprite
Date: 1 Mar 2016 02:25:39
Message: <56d543f3$1@news.povray.org>
On 2/29/2016 8:20 AM, Bald Eagle wrote:
> Not _quite_ following what you need.
> Did you need to make these things:
> http://uploads.gamedev.net/monthly_06_2011/ccs-8549-0-57863900-1307467523_thumb.gif
>   ?
>
>
>
>


Yes, exactly. I was hoping to avoid using Photoshop however. I want to 
do everything in POV-Ray.


Mike


Post a reply to this message

From: Thomas de Groot
Subject: Re: Repeating texture sprite
Date: 1 Mar 2016 02:50:26
Message: <56d549c2$1@news.povray.org>
On 1-3-2016 4:03, Bald Eagle wrote:
> I also just found this, from ... 1998
>
>
http://news.povray.org/povray.general/message/%3C01bde695%2434006a80%246a0e8dc3%40default%3E/#%3C01bde695%2434006a80%24
> 6a0e8dc3%40default%3E
>
> Does anyone have a copy of this include file squirreled away on their hard
> drive?
> TdG probably has it, but it might take him all week to find it...   :D
>
> Sounds pretty interesting though.
>
>
>


cough! cough! Lots of dust in my attic...

Here it is.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'tile generator.zip' (7 KB)

From: Mike Horvath
Subject: Re: Repeating texture sprite
Date: 1 Mar 2016 03:08:54
Message: <56d54e16@news.povray.org>
On 2/29/2016 8:20 AM, Bald Eagle wrote:
> Not _quite_ following what you need.
> Did you need to make these things:
> http://uploads.gamedev.net/monthly_06_2011/ccs-8549-0-57863900-1307467523_thumb.gif
>   ?
>
>
>
>


Here are the images again, but clearer.


Mike


Post a reply to this message


Attachments:
Download 'ccs-8549-0-92862100-1307467497.gif' (3 KB) Download 'ccs-8549-0-57863900-1307467523.gif' (8 KB)

Preview of image 'ccs-8549-0-92862100-1307467497.gif'
ccs-8549-0-92862100-1307467497.gif

Preview of image 'ccs-8549-0-57863900-1307467523.gif'
ccs-8549-0-57863900-1307467523.gif


 

From: Mike Horvath
Subject: Re: Repeating texture sprite
Date: 1 Mar 2016 05:08:21
Message: <56d56a15$1@news.povray.org>
On 3/1/2016 2:50 AM, Thomas de Groot wrote:
> On 1-3-2016 4:03, Bald Eagle wrote:
>> I also just found this, from ... 1998
>>
>>
http://news.povray.org/povray.general/message/%3C01bde695%2434006a80%246a0e8dc3%40default%3E/#%3C01bde695%2434006a80%24
>>
>> 6a0e8dc3%40default%3E
>>
>> Does anyone have a copy of this include file squirreled away on their
>> hard
>> drive?
>> TdG probably has it, but it might take him all week to find it...   :D
>>
>> Sounds pretty interesting though.
>>
>>
>>
>
>
> cough! cough! Lots of dust in my attic...
>
> Here it is.
>


I played around with this a bit. It seems it creates images that can be 
imported and used in subsequent scenes as repeating textures, but not 
repeating flat textures that can be used within the *same* scene. Unless 
I'm missing something.


Mike


Post a reply to this message

<<< Previous 5 Messages Goto Latest 10 Messages Next 10 Messages >>>

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