Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Perlin Noise DLL - Create Terrain, Clouds and Textures (also seamlessly tiled)

Author
Message
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 7th Apr 2012 22:43
@WLGfx

I found one of the posts

Extract individual frames from an AVI. My first TPC!

to save you time I've attached every thing to get it working

to move side ways - is to move forward
Since a Strait line gets thin fast

Attachments

Login to view attachments
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 8th Apr 2012 12:47 Edited at: 8th Apr 2012 15:49
@Resourceful - That's the next thing I am going to be working on. The plugin is a good start, but I'll be adding the compression capabilities to it, which is missing from that current plugin. Plus I'm thinking of adding a switch between real-time and frame rendering.

The best I've got at the moment to work with:
Advent 8117, 1Gb Ram, 943GML GPU with 128Mb shared memory, Dual core 1.73Ghz.

It's good enough for me and slightly better than my HP Pavilion laptop. And now I can try out writing multi-threading plugins for DBPro. Just so long as I don't lose any more code, I should be churning out a few more plugins for DBPro soon.

EDIT: Updated the video in the first post...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 10th Apr 2012 03:29
@WLGfx

I know there was one video recording that some one was working on
but there was a issue with paying permission for using some code

I see why your laptop would be sluggish ,the shared video ram
and 128 megs is not rile enough but 512 to 768 mb would have been better

I look forward to your latest works of art ;O)

to move side ways - is to move forward
Since a Strait line gets thin fast
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Apr 2012 10:58
Quote: "I've just added a video to the first post showing the simplex noise in action on a matrix terrain..."

Looks incredible!

This would be very handy for creating a realistic water effect.

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 20th Apr 2012 00:50
@baxslash - Thanks, I'm hoping to add a few commands to the MATRIX set to speed things up even more and maybe to the IMAGE commands too. I've been researching the google source code on how to get access to the internal data structures.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 20th Apr 2012 04:04
@WLGfx

I like the thought there is more good additions to come

I wish I could understand how to program in what dll's are made of

I know liquids and holes in objects is whats missing

and then DBP could do every thing the other programing coding programs to could do

to move side ways - is to move forward
Since a Strait line gets thin fast
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 21st Apr 2012 13:42 Edited at: 30th Apr 2012 04:22
SIMPLEX NOISE plugin update:

Two more functions added:

1. val = WL FSQRT(num)
Returns the almost accurate square root of a number. This is using an algorithm which is approximately 50 times faster than the built in SQRT() function.

2. WL MATRIX NORMALISE matrixID
Calculates all the normals for a matrix. This is an update to the built in MATRIX set of functions. (This will also be updated again if I can get access to the internal matrix data structure)

The next step now is to add a very fast texture generator for the matrix terrain based on the height levels. You may at this moment have to add your own detail maps.

Download attached to the first post...

Here's a working example using the WL MATRIX NORMALISE function:


Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Apr 2012 17:25
@WLGfx

the code looks good but the down load for this is missing from your message
unless your talking about going back to your first posting
when you started this thread ?

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Apr 2012 17:36
@WLGfx

ok every thing is in place ;O)

the the post that started this thread is the new download

a flickering of the texture happens

as I think it's meant to since the texture is being replaced with a new one in real time

it's fast and smooth ;o)

this example would be more suited to being used for moving water
then on a land

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Apr 2012 13:37
Just seen this thread. Looks good. I'll have to do some experimenting.

Someone mentioned that I'd dabbled with this using native DBPro. I have.

Here are the relevant threads.

The first was my first stab at this using the diamond-square algorithm. My second snippet in that thread shows continually changing scrolling clouds.

clouds using diamond-square algorithm

The second thread was a discussion between myself and Dark Coder on the best way to code Perlin Noise. I think my best offering was in the last few posts:

Perlin Noise

I don't now see the point of trying to use the diamond-square algorithm as the Perlin noise method is much more flexible (although diamond-square is fast). With Perlin Noise you can leave out certain octaves to get slightly different effects, you are not restricted to power of two images and the method extends easily to three or more dimensions (you can extend the diamond-square algorithm but the details get messy even for 3D and I wouldn't recommend it).
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Apr 2012 14:36 Edited at: 22nd Apr 2012 15:52
I've been experimenting with your noise fast get2d function and it seems to return values outside the range +/-1. What's the actual range?

Edit Fixed annoying typo.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Apr 2012 15:12
I ain't got the original source code for the 2 versions together of the perlin noise anymore. I've lost that part of it, the fast version. When I was using it I had to bounds check manually at the time quickly because I was testing out something else.

What I might end up doing seeing as I still got the original perlin noise code (not the fast version) is to re-write the fast perlin noise code from scratch again but this time make sure the ranges are correct. I've also found that the tiled functions ranges are out a bit too in the original so I'll fix that too. The code didn't look right anyway and I wanted to at the time was just to average out the 4 noise calls.

The main perlin noise works great but is slow, the faster version was using the table based perlin noise. In the end I added the simplex noise which was super fast. After looking at your diamond square code, I'll also get round to adding that. It looks simple enough but as the forum posts say from your link, there's an issue with image sizes, but I'm sure I can get round that in the C/C++ code.

Some people are using the perlin noise plugin so I'll have to keep that one there for the moment until everything has been put together into a final noise library.

. Perlin Noise - (slow but most accurate version)
. Fast Perlin Noise - (needs a re-coding)
. Simplex Noise - (fastest version so far)
. Diamond Square - (probably faster than simplex)
. Matrix terrain additions - 10% - 25% done

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Apr 2012 15:56 Edited at: 22nd Apr 2012 15:59
Thanks for the explanation and update - I hadn't realised you'd completely lost part of your code (I thought you'd found it).

Do you have a reference for the simplex noise? I haven't come across that. Sounds and, from your demo, also looks good.

Edit Never mind - I've found several links for simplex noise. Should keep me out of mischief for a while.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 22nd Apr 2012 19:17
I now use drop box to back up my code. We've been through some tough times recently at home, also had a boiler flood and after that I lost a lot of code with a laptop being water damaged. Now got some kind of organisation sorted out.

After looking at the first post I really do think I need to edit it because even that is looking a bit of a mess.

Fingers crossed you will find the simplex noise doing a decent job. If the accuracy is an issue then I can alter the fast square root function, which I altered to speed it up by tons.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Apr 2012 19:06
Sorry to hear about your domestic woes. Perhaps I'd better get my own backups better organised?

The simplex idea certainly looks like a fast variation of the original rectangular grid methods - especially for higher dimensions. Thanks for bringing it to our attention.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 24th Apr 2012 20:59
@Green Gandalf - I'm just putting the final touches on a new perlin noise algorithm which is table based and gives 1d, 2d and 3d results and will be much faster than the original plugin and also comes with a lot more functionality. I'm just experimenting with having it work with or without using persistence, octaves and frequency to give less overhead on the calling stack. Also once I've got it all working I'll test out optimising speeds using assembler code and in-lining functions.

It won't be as fast as the simplex noise algorithm.

Even though I'm now using Drop Box to backup my projects, the files on Drop Box are all over the place and very dis-organised. But, at least they're safe. When the google cloud storage comes out I'll also use that too.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Apr 2012 01:57
Quote: "I'm just putting the final touches on a new perlin noise algorithm which is table based and gives 1d, 2d and 3d results and will be much faster than the original plugin"


I'm looking forward to seeing this. Perlin noise and its variants are extremely useful.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 25th Apr 2012 03:51 Edited at: 25th Apr 2012 04:37
Wow, just done a quick test:
and it's darn fast this is...

DOWNLOAD is attached to the FIRST post with the new perlin noise algorithm.

Here's the complete list of current functions in the plugin:



Ridge Noise screen shot:


Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Attachments

Login to view attachments
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 25th Apr 2012 04:32
ok I did the update

the only oddity is the new words were not highlighted no biggy

but it ran ;o)

the first col was more denser set of dots than the second one

to move side ways - is to move forward
Since a Strait line gets thin fast
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 25th Apr 2012 04:38
Just added screen shot to above post and changed the DBP code too...

@Resourceful - Have you re-built the keywords from the Tools menu?

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 25th Apr 2012 04:41
@WLGfx

yes I did the rebuild

still not highlighting

but it works ;o)

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 25th Apr 2012 04:44
@WLGfx

dang nabit
it seams that I must have said no to updating ;oP

it's now high lighted

to move side ways - is to move forward
Since a Strait line gets thin fast
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 25th Apr 2012 13:52
@Resourceful - Sometimes when I need to update the keywords it crashes my compiler but only on rare occasions. Dunno why but it is annoying...

@Green Gandalf - I've been googling the range value problems with perlin noise constantly and I cannot find a workable solution for it. One of them - http://www.gamedev.net/topic/285533-2d-perlin-noise-gradient-noise-range--/ was useful for implementing improved noise but even through tests it doesn't work to give a range -1 to +1.

If I come across a solution then I'll certainly implement it. And the 'RIDGE' noise is even worse for this. It gives nice results but only if you fiddle about with the values. When I implement the perlin noise I tend to either cap the bounds or multiply by a lower value.

I'm thinking it is likely the floating point precision that is the cause of it. The original perlin noise plugin uses double precision.

I'll be having a look through some more implementations to add today, just like the ridge noise, to add to the plugin.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Apr 2012 19:19
Quote: "I've been googling the range value problems with perlin noise constantly and I cannot find a workable solution for it. "


I suspect the problem is that it's fairly easy with a bit of maths and calculus to find upper and lower bounds but they could be unhelpfully wide. I decided it was easier to decide the range I wanted and adjust the sample afterwards - but that only makes sense if you're producing a single image or set of values for example.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Apr 2012 02:13
The simplex noise algorithm is easy to do upper and lower bounds. For each of the 1D, 2D and 3D algorithms for new perlin noise there seems to be different ranges.

When I get a chance I'll see what I can figure out to fix the ranges. I'm not too good with mental arithmetic...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Joker436
12
Years of Service
User Offline
Joined: 18th Mar 2012
Location:
Posted: 29th Apr 2012 20:06
Hey there WLGfx,

Sorry for the delay on this post, I've been tied down to real life and haven't had much time for coding. I wanted to share this little utility thing that I wrote up to help me visualize the plugins.

It's nothing special, but I found it useful as a total newbie to visualize what the numbers were doing in terms using the noise to generate terrain. The simplex plugin was hard to control because it's so darn fast... so I added a delay in there to have some more control over the values.

Here's the code. If I'm not using something correctly let me know and I'll update this.

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 30th Apr 2012 14:07 Edited at: 30th Apr 2012 14:07
@Joker436 - That's pretty cool that is! I even like the fact you've added the WL MATRIX NORMALISE function which shows it off a lot more with the smooth edges...

Here's a screen shot from your program:


Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Attachments

Login to view attachments
Joker436
12
Years of Service
User Offline
Joined: 18th Mar 2012
Location:
Posted: 1st May 2012 21:01
@WLGfx

Thanks! I'm glad you like it! Your normalize function is great... the little terrain thing I'm playing around with looks great even with no texture at all.

I do think I have found a bug... I'm not sure though.

I've attached a screen shot. I generated a matrix, normalized it and started to move around with SHIFT MATRIX up/down/left/right. The attached is what I saw.

Is this something normal or did I do something wrong?

Attachments

Login to view attachments
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 2nd May 2012 00:52
I'm just going over my code at the moment to double check it but as far as I can tell you've been shifting your matrix without re-normalising it. With you mentioning this it's made me think about a faster way of re-normalising a shifted matrix. I'll get to work on it as now it does sound important, plus a benefit.

What the code does:

. Clear every vertex normal
. For each triangle calc the normal and "ADD" to the verts normal
. Average each normal by the amount of faces the vert is attached to

The actual code: (in case anyone sees any bugs)



Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Joker436
12
Years of Service
User Offline
Joined: 18th Mar 2012
Location:
Posted: 2nd May 2012 05:50
Ok yes I found it... it was my code after all.

I was doing exactly as you indicated... shifting without normalizing first. I switched up the order and it went away.

*facepalm*

Back to it I go!
jobromedia
12
Years of Service
User Offline
Joined: 9th May 2012
Location: Stockholm, Sweden
Posted: 16th May 2012 15:44
Quoted from the initial post of this topic.

Quote: "DOWNLOAD link is attached to this post."

Ummm... There is no download link attached to the post in question.

MIDI packs for sale.
Best regards
Johan Brodd
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 16th May 2012 20:25
@jobromedia - The download for the plugins are on the very first post at the bottom right on page 1. The first post is quite large with the examples, etc...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th May 2012 22:42
On my machine the download button for your post is off-screen. Perhaps that's why he didn't see it. I guess there are some over-size images posted somewhere on the thread.
jobromedia
12
Years of Service
User Offline
Joined: 9th May 2012
Location: Stockholm, Sweden
Posted: 16th May 2012 23:27
That sorted it dudes. Thanks a bunch. Didn't want to act like a smartass, but sometime I'm blind. Keep up the great work!

MIDI packs for sale.
Best regards
Johan Brodd
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 17th May 2012 21:32
Yeah, I can't do anything about that post because it's not mine :-( and I always make sure my images are shrunk so not to take up too much screen space. It is annoying and it'd be nice if someone could shrink it down a bit.

It shouldn't be long before I revamp the speed of the simplex noise code with some more pure assembler code. I really like to squeeze as much out of the CPU speed as I can. As well as that I'll take a look at the normalise function to see where I can squeeze a few more cpu cycles out of it too.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 18th May 2012 02:28
umm now if people would keep there text lines so ya do not have to
read them like a stretched out book

the way I have this text is the way ever one should be doing it
but it appears a lot do not

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th May 2012 13:14
You
are
correct.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 19th May 2012 10:42
@ WLGfx,

Your other plugin drew my eyes of this one...

Where is this one at? Are you going to develop this one further in due course?

Did you solve that thing with simplex noise and >1/<0?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 19th May 2012 14:36
@Duffer - The Simplex noise plugin doesn't have the boundaries issues, that's the perlin noise, the second faster version. Although The perlin noise second version is fast and very good for a lot of things, the extras that I was going to add I may as well add to the original perlin noise plugin and the simplex noise plugin.

The extras are going to be things like the ridged noise and a few others that I've found. Mainly for different types of procedural generation for textures, terrains, etc.

@Green Gandalf and Resourceful - Yeah, some forums do get annoying when a code snippet opens up or someone has posted a ginormleously large image, and even the text stretches over the edges.

The other plugin has been taking quite a bit of my time up lately to do but I think it's about time I finally did something with it and get it finished. And no-one knows yet but I've even used a very cut down version of the simplex noise in it to create the slopes. (That's a secret)

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
gwheycs62egydws
15
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 19th May 2012 15:02
I use to consider any thing bigger than 640 x 480 a big enough screen size

now that I have the laptop display set at 1600 x 900
and a lcd display connected at 1680 x 1050

I have to wonder how much more larger a display setting I will think
is the limit

sorry to get off topic

I thought Fractals was complex

these two defetnly take things to a new place

it seems there is a bit of Fractals with thees two

to move side ways - is to move forward
Since a Strait line gets thin fast
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 19th May 2012 15:07
@ WLGfx,

Hi, my problem is having difficulties in understanding what of code snippets (above on this thread) I can and cannot use with latest version of these plugins.

I've attached the plugins in a format that can be unzipped direct to DBPro main folder. I've only added the one basic simplex noise demo though. I'd like to shove as many demos as possible in to the attached zipped projects folder (if you see what I mean).

Also, would be helpful to understand what all the parameters of the variables are and what role the variables play....

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 20th May 2012 00:31
@Resourceful - I usually shrink my images down to 640 x 480 when posting a screen shot. It seems that some people don't consider others when they post mega large images.

Fractals come in all kinds of weird and wonderful algorithms and some of these noise functions use basic fractal stuff. I'll get there soon enough when adding some more.

@Duffer - It does take a few experiments to understand the parameters of the noise functions and it's likely you have to run a program a few times until you get the correct values to produce what it is you were after.

As far as I know there's four versions between the two plugins, the original and most accurate perlin noise (prefixed with PN), fast perlin noise (prefixed with NOISE FAST), the simplex noise (prefixed with SIMPLEX) and the new fast table based perlin noise (prefixed with FN).

For example the function: value# = SIMPLEX SCALED 2D(octaves, persistence#, scale#, LoBound#, HiBound#, x#, y#)

Will return a 2D noise value between the range of LoBound and HiBound from the coordinates of x# and y#.

The roughness of the noise is determined using the octaves, usually 6 is sufficient for terrain, etc.

In this version, persistence# and scale# depends how the noise is calculated. The proper way to calculate noise is using the x# and y# values between 0.0 and 1.0 but I fiddle with the persistence and scale to stretch it over a larger range.

With me having that many projects on the go, I've not had the chance to put a list of examples together. Most of the time I've quickly put an example together to show what it does and once it's posted, I don't keep it. The only stuff I have kept (apart from losing some source code recently) is my main projects for the plugins.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
MayoZebraHat 1979
16
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 17th Aug 2012 01:10 Edited at: 17th Aug 2012 04:51
I really hope you are still working on this, it's much faster than anything I can hack together but I did run into some troubles with seeding. It seems the higher seed I use the more blocky the patterns become. I would think that the seed would just make the noise different rather than more blocky or pixelated.

Second problem, none of the tiled commands save for "noise get hight tiled" seem to work for me but them not being ready would explain why you don't use them in the examples and do your float to byte by hand. Maybe I should have read that somewhere...

Also, that would be the "noise set params" used with "noise get height tiled" that gives increasingly out of phase maps the higher the seed is set. The Fast Perlin version's seed seems to work as I thought (I would use it but no tiled). I don't think seed is available for simplex so I could not test.

I then noticed that you are having trouble having it come out to solid +/- 1.0. Is your cosine interpolation being a little stingy? I had that problem once... but it's probably not even related to yours. Just thought I would say something in that regard.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 17th Aug 2012 13:34
@MayoZebraHat 1979 - If you've got some sample code showing the blockiness of the noise, it would be interesting to see what is happening. This shouldn't really happen so much using the first perlin noise code as it uses double floats for all it's calcs and then casts the results to a float to return to DBP. The second perlin noise is a faster table based version. Although it might be how in depth your using the noise functions. But saying that the only noise functions I tend to use now are the perlin noise main function from the pnoise.dll and the simplex functions from the snoise.dll mainly because the return values are far better. The fast perlins seed just regenerates the look up table. One thing I could add to the rest of the libraries is the tiled functionality though.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
MayoZebraHat 1979
16
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 17th Aug 2012 16:18
Yes, but it's just your sample code with an input statement. If you enter seeds around 10,000,000 (give or take) it starts to get really noticable. If you enter negative numbers, I think below -10 or so, they start getting blocky much faster.



I'd probably be better off only using tiled simplex, the results seem better for my needs and faster. It's the one algorithm I always wanted but never could quite get to work right.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 17th Aug 2012 20:41
Yeah, I tested that and entered the different values. I'm thinking it's the floating point issue with the random values. The higher the seed value the calcs get skewed.

Another way to add extra randomness is to offset randomly the X and Y values too.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 23rd Aug 2012 23:38
This is great WLGfx - where you going with it?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Aug 2012 02:12
There are a few ideas in mind to this project, one is to put them into one simple dll and add a few more features. ie add the seamless properties to all three algorithms. And with my latest ideas about the 'infinite values for programming' is maybe to add another extra algorithm that allows the noise to return values for any numbers given and accurately. Okay, within a range of course and big, but I'll see what I can come up with.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-11-24 11:20:33
Your offset time is: 2024-11-24 11:20:33