Cuberite Forum
Random Chitchat 2012-2016 - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Off Topic (https://forum.cuberite.org/forum-9.html)
+--- Forum: Off Topic Discussion (https://forum.cuberite.org/forum-10.html)
+--- Thread: Random Chitchat 2012-2016 (/thread-434.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487


RE: What we're doing - xoft - 04-17-2013

Unfortunately it depends a lot on the structure of the query. The lower the "frequency" of the noise, the faster it performs. In the worst case scenario (frequency larger than 4 datapoints per pixel) it will behave the same as the old noise generator, but with an added penalty of data structure preparation. Luckily for us MCServer uses much lesser frequencies, so it should still be a speedup.
Tomorrow I'll try to twist my brain around the 3D version of this.


RE: What we're doing - xoft - 04-17-2013

More knowledge Smile
On x86, there's no measurable difference between using a double and a float for the noise functions.
But on ARM, there's a 20% performance increase when using floats. So we'll be sticking to floats for now.
If anyone could compile and run the $/Tests/NoiseTest project on x64 with both NOISE_DATATYPE set to float and then double (in $/source/Noise.h), and post both results, that would be awesome.

Here's both results when run on a RasPi (ARM, stock config):
Code:
With NOISE_DATATYPE set to double:
[12:29:16] --- Started Log ---
[12:29:21] cCubicNoise generating 1000 * 256x256 values took 4650000 ticks (4.65 sec)
[12:30:16] cNoise generating 1000 * 256x256 values took 54610000 ticks (54.61 sec)
[12:30:16] New method is 11.74x faster

With NOISE_DATATYPE set to float:
[12:36:52] --- Started Log ---
[12:36:56] cCubicNoise generating 1000 * 256x256 values took 3760000 ticks (3.76 sec)
[12:37:50] cNoise generating 1000 * 256x256 values took 53840000 ticks (53.84 sec)
[12:37:50] New method is 14.32x faster



RE: What we're doing - NiLSPACE - 04-18-2013

lol i tried changing it to "int" just for fun ;D its 29.03x faster xD

and bool is 37.11x faster

now trying everything Wink


RE: What we're doing - xoft - 04-18-2013

Well, yeah, but the results are wrong. Compare the two .raw files that are in the folder with the program, one is the correct data (old algorithm) and one is the new algorithm, they shouldn't be much different - two or three differences throughout the entire file is more than enough.

(For ints: There are more efficient methods of generating all zeroes)


RE: What we're doing - NiLSPACE - 04-22-2013

Is it difficult to change the 2D noise to 3D noise?
EDIT:
Lol i saw here 4D noise ;O what is that lol?


RE: What we're doing - xoft - 04-22-2013

I changed my mind, I'm not doing the 3D part, I'm actually trying to make MCServer use the faster 2D algorithm wherever it generates 2D noise data. And it's not going so well - so far, the generator is actually slower than before.

Right now, the original version clocked at 190 chunks/sec, while the new version clocks at 145 chunks/sec. No idea why so slow, when the underlying noise generator is faster Sad
Also the terrain looks different, which is weird, they should both generate the exact same thing.

4D noise is usually used when you need to animate a 3D noise, same as 3D noise is used to animate a 2D noise. The noise functions work in any number of dimensions, 6D noise is also quite usual.

Duh, I'm so stupid! In the biomal height gen, I first found out what biomes are used within the current chunk, and then went ahead and generated height for all possible biomes, instead of only the used ones.
Now the performance is back up, but curiously though, not too much higher than before. There's still something fishy. But it'll have to wait till tomorrow.


RE: What we're doing - xoft - 04-23-2013

I'm having a bad, bad day....
It seems that the new noise is not optimized enough to make up for the need to generate a bit more of it.

I tried replacing cHeiGenBiomal's cubic noise calculation with the new noise generator, but it's about 5 % slower than the original, because the original doesn't compute full noise for all used biomes. So that's a no-go.

Then I tried replacing cCompoGenBiomal's noise (used for underwater sand / dirt decision) with the new noise, turns out that code path is used only 20 % of the time, so making it calculate the full noise array again slowed things down. Another blunder.


RE: What we're doing - xoft - 04-23-2013

I need testers. I've managed to get 4x4 linear interpolation in Biomal height generator working with reasonable results; however, I need to verify if the results are indeed reasonable. So please get rev 1406, set your height generator to Biomal, and have a look at freshly generated world, if the height seems okay. Especially in the flatter biomes, such as plains or swamps.

You should also see some increase in generator speed, I've measured 22 % more chunks per second.


RE: What we're doing - NiLSPACE - 04-23-2013

well it seems to be allot faster for the generation but the server uses 15-20% CPU for me now and 30% when i started moving to not-generated chunks.


RE: What we're doing - xoft - 04-23-2013

The main thing is whether the terrain height looks alright. Does it? No regular rectangular shapes?