Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 260 261 [262] 263 264 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 907928 times)

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3915 on: February 16, 2013, 11:55:57 am »

So still no way to have easy, pretty 3D terrain and water? Dx

Well, there are easy ways, and there are pretty ways. I wrote a Java/LWJGL application framework that lets me easily render some OpenGL stuff in a 3D environment with a movable camera, and in the process of my newest project I'm currently writing the same thing for C++/SDL, so I can give you the code when I'm finished, along with some quick usage examples of OpenGL. Interested?
As long as it's easy enough xD I'm surprised that this niche hasn't been filled. Just water and land. Dx
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3916 on: February 16, 2013, 11:59:05 am »

How is your erosion model coming along?
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3917 on: February 16, 2013, 12:12:14 pm »

I scrapped the first one, and I'm working on another version, using virtual pipes.
Debugging will be hard :/ The first serious bug I have is 'water won't flow amd you can't fix it'. Dx
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3918 on: February 16, 2013, 12:40:50 pm »

Okay, changed my mind. MSVC++ is even more stupid, going back to Eclipse CDT.
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3919 on: February 16, 2013, 12:50:39 pm »

This PDF looks like it might help with some of your erosion simulation woes :) Visual Simulation of Hydraulic Erosion. You will get a loooot of source material to peruse if you do a search for "Simulating Hydraulic Erosion", most of which goes by a similar method to what is used in the paper linked.
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3920 on: February 16, 2013, 12:55:30 pm »

I am already basing my similation off a different model. It builds off that exact paper, and it uses virtual pipes. :P

It's mostly a debugging problem. I seem to be an horrible programmer.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Soadreqm

  • Bay Watcher
  • I'm okay with this. I'm okay with a lot of things.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3921 on: February 16, 2013, 01:06:01 pm »

You may need to get permissions though
That looks like the kind of copyright violation that no one would actually care about. Anyway, I'm not exactly at the "commercial product" stage yet. :D

It's mostly a debugging problem. I seem to be an horrible programmer.
I think that deep down, we all are.
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3922 on: February 16, 2013, 01:22:15 pm »

The best thing about thinking you are a horrible programmer: there is always room to improve! :D

Soadreqm: yeah, it is a sorta weird copyright violation to worry about, but you can never be too sure if you decide to monetize the project by selling it. You don't want to accidentally screw up and have to go through litigation if the commercial product is successful enough to be noticed by the copyright holder :(

Skyrunner: awesomes that you have seen that exact paper :D Any details you can share about your new pipe-based system?
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3923 on: February 16, 2013, 01:40:43 pm »

This paper, 'Fast Erosion' is the one I built my model on. It mentions the one you linked, the one I was looking at before this(here, Neidhold et al, Interactive Physically-based Fluid and Erosion Simulation), and Layered Data Representation for Visual Simulation of Terrain Erosion which is also mentioned by the one you linked and the one I was using ...

xD

The model pretends all the cells are water tanks connected by pipes and calculates water movement, water velocity, and sediment movement. If I manage to get it working, I want to implement the multiple layers described in Neidhold's model. :S A hopeful part is that the 2.4 GHz simulation of Neidhold achieved 4 fps, serial. I probably will be able to get decent fps with good parallel processing. This project is making me learn about those things o_O
I still don't know how my making a plant growth sim lead me to erosion, but might as well do it since I'm here.

The first problem I have is that the water won't move at all. A precursory step-through hints of incorrect initialization, but I have to investigate tomorrow, after math. >.>
« Last Edit: February 16, 2013, 01:44:49 pm by Skyrunner »
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3924 on: February 16, 2013, 02:42:43 pm »

thankyouthankyouthankyou for those links to tasty tasty research materials ^_^ Learning new things is awesome! and so is mathz! :D
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3925 on: February 17, 2013, 02:25:12 am »

No, math in Korea is not awesome by any stretch of the imagination. :/

Meanwhile: My water flows! It seems to be working well, with water flowing downhill and collecting in hollows. I still wish I could have done it Neidhold's way. The virtual pipes doesn't respect momentum, so the water doesn't go down the hill and up the other side >_<
128x128 grids work at roughly 4 fps, and 256x256 grids work at 1 fps. I am going to see if making it work on four threads will speed it up. The original paper was designed for a GPGPU, so making it parallel won't be too hard. One problem is that I have to fervently hope is for reading locks or caching delays not to happen >.>

Just now, boost::thread has been throwing an error which I hadn't time to fix. It has to do with there being an argument number mismatch... Dx

Also, I haven't actually implemented the erosion part yet.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3926 on: February 17, 2013, 02:38:25 am »

Yeah, those sorts of erosion models are embarrassingly parallel, as they are cellular automata at their core (albiet very complex cellular automata). And one can parallelize those simply by putting a synchronization point between each step and swapping between read/write buffers.

@galen: for more like those, check out the VTerrain link in the OP.
If you really want to do something interesting, I highly recommend this: http://www.siggraph.org/publications/bibliography/
It's a searchable list of SIGGRAPH papers. Search for a keyword, plug the name of a useful-sounding paper into google, and you've now got yourself a starting point.
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #3927 on: February 17, 2013, 03:11:41 am »

I have looked at VTerrain and all the papers and other links are awesome ^_^ Just haven't looked at it much lately, or specifically for erosion modeling or hydraulic flow in general. I will be looking over it in the next few days and collecting even more papers to read through I think... Probably about 300MB of papers I still need to read and understand though :(
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Soadreqm

  • Bay Watcher
  • I'm okay with this. I'm okay with a lot of things.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #3928 on: February 17, 2013, 03:24:54 am »

The virtual pipes doesn't respect momentum, so the water doesn't go down the hill and up the other side >_<
But you're planning to use them for erosion modeling, aren't you? Because on a geological timescale, there is no momentum.
Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: if self.isCoder(): post() #Programming Thread
« Reply #3929 on: February 17, 2013, 03:39:20 am »

alway: My worry is that I did something wrong with the read orders so they have to wait a bit, or they try to synch memory and wait more, and other threading shenanigans >_< I only had to make a "this thread does these rows" function to parallelize it.

The virtual pipes doesn't respect momentum, so the water doesn't go down the hill and up the other side >_<
But you're planning to use them for erosion modeling, aren't you? Because on a geological timescale, there is no momentum.
The virtual pipes doesn't respect momentum, so the water doesn't go down the hill and up the other side >_<
But you're planning to use them for erosion modeling, aren't you? Because on a geological timescale, there is no momentum.
The virtual pipes doesn't respect momentum, so the water doesn't go down the hill and up the other side >_<
But you're planning to use them for erosion modeling, aren't you? Because on a geological timescale, there is no momentum.
To the contrary! Think of a stream flowing down a U-shaped valley's one side. It would read the bottom and go up the other side a bit before flowing into the trough. It would erode faster there because the water has more force. Still, on a basin scale, the difference is miniscule.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward
Pages: 1 ... 260 261 [262] 263 264 ... 796