Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
lord funk
Feb 16, 2004

Avenging Dentist posted:

The grid on the first picture is really making me think of Marble Madness.

An updated Marble Madness with those fluid dynamics would be soooooo great.

Adbot
ADBOT LOVES YOU

Luigi Thirty
Apr 30, 2006

Emergency confection port.

RexJericho posted:

I've been writing this hobby program that makes my computer real hot for hours on end and also simulates liquid fluids. Right now I'm using the program to animate fluid flowing through portals. This one's been taking my tiny laptop about 5-10minutes to simulate and 12-15 minutes to render each frame.

Here's a frame rendered in Blender:


Liquid is falling into the orange portals and exiting through the blue portals on the wall.

I've got a GitHub repository for the project here: https://github.com/rlguy/GridFluidSim3D

And some animations created with the program here: https://www.youtube.com/watch?v=zdTcAg_G0Go

That's awesome.

Polio Vax Scene
Apr 5, 2009



I gotta say if you haven't watched that youtube seriously watch it. The quality of that is unreal. Or super-real.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

lord funk posted:

An updated Marble Madness with those fluid dynamics would be soooooo great.

Or Pipe Dream on steroids!

Plumps
Apr 21, 2010

Manslaughter posted:

I gotta say if you haven't watched that youtube seriously watch it. The quality of that is unreal. Or super-real.

You're not wrong there. Can't be too long until the Matrix now.

Purple Prince
Aug 20, 2011

Plumps posted:

You're not wrong there. Can't be too long until the Matrix now.

Good luck getting that level of fidelity across a real-scale ocean in tractable time, although I'm sure the movie FX guys have tried it.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
Gunning for licensing revenue from the LEGO Movie people? ;)

(this looks really cool)

Purple Prince posted:

Good luck getting that level of fidelity across a real-scale ocean in tractable time, although I'm sure the movie FX guys have tried it.
In real-time land, we're still struggling to do even "puncture barrel, barrel drains out over ground" fluids. I mean we can do that once. But, uh. Just the one barrel. For miles.

It's fine, our Matrix will just have no fluids. IIRC, isn't the Christian heaven supposed to have no bodies of water? We can just call it Heaven, bam, sorted.

Shalinor fucked around with this message at 17:08 on Aug 14, 2016

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
I'd imagine the Matrix uses a lot of simplifications for stuff people aren't currently looking at closely (read: 99% of the ocean). It's obviously got to be able to simulate things with extremely high fidelity, since the simulation takes place in an era with electron microscopes. However, it can't be a full simulation down to fundamental particles, since the Matrix's servers are all just on Earth; a simulation can't be larger than the system it runs on. They must be simulating only part of the planet, either by approximating lots of stuff, or by only simulating a small region of Earth, like in the 13th Floor.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I understand the fluid simulation, but how in christ do you simulate foam like that? That's amazing.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
My first guess would be the foaming effect is altering the color/opacity of the fluid based on the velocity of the particles it's composed of.

RexJericho
Mar 20, 2011

Suspicious Dish posted:

I understand the fluid simulation, but how in christ do you simulate foam like that? That's amazing.

Internet Janitor posted:

My first guess would be the foaming effect is altering the color/opacity of the fluid based on the velocity of the particles it's composed of.

The animations with foam are actually created with two simulation methods. There's the basic fluid simulation that models regular fluid flow using particles/grids and generates a triangle mesh representing the fluid surface. On top of that simulation, there is a post-processing simulation that looks at the geometry of the surface mesh and velocity of the fluid particles and from that generates foam particles. Foam particles are generated in regions where the water is likely to become aerated, such as at wavecrests and in regions of high turbulence where air can be pulled into the fluid. The foam particles are carried along with the fluid through a velocity field, they have a bouyancy and rise to the fluid surface as bubbles, and if they are outside of the fluid, they fall back to the surface in a ballistic trajectory as spray.

This paper describes the foam generation in more detail: Unified Spray, Foam and Bubbles for Particle-Based Fluids

The foam particles are rendered in Blender by duplicating a tiny sphere over each particle.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
That is a super readable paper, thank you.

Purple Prince
Aug 20, 2011

Shalinor posted:

In real-time land, we're still struggling to do even "puncture barrel, barrel drains out over ground" fluids. I mean we can do that once. But, uh. Just the one barrel. For miles.

It's fine, our Matrix will just have no fluids. IIRC, isn't the Christian heaven supposed to have no bodies of water? We can just call it Heaven, bam, sorted.

I used to live with a couple astrophysicists. Fun fact: you can't simulate the standard model. All computational models in astrophysics are increasingly elaborate hacks to get a half-decent approximation and they still run on distributed supercomputer networks. Our technology sucks.

Hell, having 3 gravitating bodies (I asked about this for a game project) is a pain to implement in real time, as you need numerical analysis to get anything close to accurate.

Purple Prince fucked around with this message at 01:14 on Aug 15, 2016

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Purple Prince posted:

Hell, having 3 gravitating bodies (I asked about this for a game project) is a pain to implement in real time, as you need numerical analysis to get anything close to accurate.

I believe numerical analysis is only necessary if you want to skip forward m timesteps in constant (-ish) time. Otherwise, you can just evaluate all the gravitational interactions at O(m*n2). I actually did an N-body gravitational simulation in Mathematica back in college and it wasn't especially difficult, although it scaled pretty poorly.

Purple Prince
Aug 20, 2011

Avenging Dentist posted:

I believe numerical analysis is only necessary if you want to skip forward m timesteps in constant (-ish) time. Otherwise, you can just evaluate all the gravitational interactions at O(m*n2). I actually did an N-body gravitational simulation in Mathematica back in college and it wasn't especially difficult, although it scaled pretty poorly.

From experience writing the original simulation, brute evaluation tends to lead to an unstable system with 'quirks' like moons flying off into the sun, although how much of that was down to floating-point imprecision I'm not sure. Only being able to simulate two bodies is okay, though: it's pretty cool to set a binary star pair turning.

ErIog
Jul 11, 2001

:nsacloud:

RexJericho posted:

I've been writing this hobby program that makes my computer real hot for hours on end and also simulates liquid fluids. Right now I'm using the program to animate fluid flowing through portals. This one's been taking my tiny laptop about 5-10minutes to simulate and 12-15 minutes to render each frame.

Here's a frame rendered in Blender:


Liquid is falling into the orange portals and exiting through the blue portals on the wall.

I've got a GitHub repository for the project here: https://github.com/rlguy/GridFluidSim3D

And some animations created with the program here: https://www.youtube.com/watch?v=zdTcAg_G0Go

You win the thread.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
also where do you find the car commercial music, i've been looking for a good source of that

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

ErIog posted:

You win the thread.

Eela6
May 25, 2007
Shredded Hen

Avenging Dentist posted:

I believe numerical analysis is only necessary if you want to skip forward m timesteps in constant (-ish) time. Otherwise, you can just evaluate all the gravitational interactions at O(m*n2). I actually did an N-body gravitational simulation in Mathematica back in college and it wasn't especially difficult, although it scaled pretty poorly.

The n-body problem is not solvable analytically, yeah. I did the solar system (sun through Neptune, plus moon) in MATLAB as a project in a numerical analysis of odes class. Adaptive step size runge-kutta works pretty well, if I remember. You need to choose your units and time steps pretty carefully or the floating point error will destroy you. I too watched the earth fly out into the void at a couple thousand times the speed of light.

Because gravity trails off quadratically, you can generally abstract away everything but the closest and most massive bodies. This lets you cut down on the number of calculations per time step by a lot.

I.e, for the moon, you really only need to worry about the earth and sun. The effect of, say, Jupiter is most likely below the threshold of floating point error.

Edit: That fluid simulation stuff is absolutely stunning.

Eela6 fucked around with this message at 05:05 on Aug 15, 2016

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Eela6 posted:

Edit: That fluid simulation stuff is absolutely stunning.

Suddenly my FAT12 driver for Sim68K is less impressive

Cory Parsnipson
Nov 15, 2015
I don't know the first thing about any of that stuff, but now I wanna make the pretty water too :saddowns:

Baloogan
Dec 5, 2004
Fun Shoe
just go get a hose and gently caress up your back yard

man you entirely exist in a fluid dynamics sim, drat

Baloogan
Dec 5, 2004
Fun Shoe
hella jealous of that neato fluids tho

Cory Parsnipson
Nov 15, 2015

Baloogan posted:

just go get a hose and gently caress up your back yard

man you entirely exist in a fluid dynamics sim, drat

Real life water just wouldn't be the same.

RexJericho
Mar 20, 2011

Suspicious Dish posted:

also where do you find the car commercial music, i've been looking for a good source of that

I used this song from PremiumBeat, which has music for all kinds of commercials, but it's not free.

Cory Parsnipson posted:

I don't know the first thing about any of that stuff, but now I wanna make the pretty water too :saddowns:

You can make pretty water by using existing software packages such as Blender, Houdini, RealFlow. There are a lot of tutorials available.

If you are comfortable with programming and a bit of math (vectors, linear algebra, differential equations), then maybe you could try implementing your own simulator. I used these note which contained a lot of helpful programming implementation details: https://www.cs.ubc.ca/~rbridson/fluidsimulation/fluids_notes.pdf.

Simulation update: I've ended the simulation, and here it is in two parts: Part 1 Part 2

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Look at you guys all freaking out because someone has a slow mo camera, a bunch of blue paint, the ability to levitate bunny shaped water globs, and a bunch of free time on his hands. Pfft.

Sex Bumbo
Aug 14, 2004


https://www.shadertoy.com/view/Xlt3zs

Sex Bumbo fucked around with this message at 16:03 on Aug 22, 2016

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Sex Bumbo posted:

Ill make everyone feel better about themselves, here's a burger emoji that I rendered in the stupidest way possible

https://www.shadertoy.com/view/Xlt3zs
It's the code that really sells it:
code:
bool poo poo(vec2 uv, vec2 p0, vec2 v0, vec2 v1, float dot00, float dot01, float dot11, float invDenom, float io)

ErIog
Jul 11, 2001

:nsacloud:

Sex Bumbo posted:

Ill make everyone feel better about themselves, here's a burger emoji that I rendered in the stupidest way possible

https://www.shadertoy.com/view/Xlt3zs

This is humble brag as gently caress.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Scaramouche posted:

Look at you guys all freaking out because someone has a slow mo camera, a bunch of blue paint, the ability to levitate bunny shaped water globs, and a bunch of free time on his hands. Pfft.



Here's a directory reading for a FAT12 disk image in 68k assembly :shrug:

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

Sex Bumbo posted:

Ill make everyone feel better about themselves, here's a burger emoji that I rendered in the stupidest way possible

https://www.shadertoy.com/view/Xlt3zs

Mods plz change my username to "Procedural Emoji" kthx

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Cool dance, took me a bit to figure out I could change the input and it will dance to different music. What size limits do shaders have? Can you make a single shader that uses all of the resources of the gfx card?

Sex Bumbo
Aug 14, 2004

taqueso posted:

Cool dance, took me a bit to figure out I could change the input and it will dance to different music. What size limits do shaders have? Can you make a single shader that uses all of the resources of the gfx card?

A single shader can easily become alu bound and memory bound if that's what you mean. You have way more pixels to render than cores on your gpu unless your viewport is tiny. If a single shader drops your gpu below your refresh rate, there's a good chance its spending the majority of its time crunching numbers or waiting on memory.

Your shader size limits are dictated by the hardware. New-ish hardware can run colossal shaders but you're more likely to crash your shader compiler in my experience than reach the theoretical max.

Sex Bumbo fucked around with this message at 21:11 on Aug 16, 2016

Your Computer
Oct 3, 2008




Grimey Drawer

Sex Bumbo posted:

Ill make everyone feel better about themselves, here's a burger emoji that I rendered in the stupidest way possible

https://www.shadertoy.com/view/Xlt3zs

I watched this for over 2 minutes hoping that there would be a really heavy drop to send the pieces flying :(







....I watched a bouncing burger emoji for over 2 minutes, good job.

Pollyanna
Mar 5, 2005

Milk's on them.


I made a game in Unity, am I cool now?

Sex Bumbo
Aug 14, 2004

https://www.shadertoy.com/view/4t33W2

Sex Bumbo fucked around with this message at 15:54 on Aug 22, 2016

Cirrial
Oct 24, 2012
Hey, gently caress off with the "bad programming", you're making yourself look just as arrogant while pretending to be self-deprecating.

In short,

ErIog posted:

This is humble brag as gently caress.

Sex Bumbo
Aug 14, 2004
Yeah sorry. It feels really weird to spend a zillion hours and tens of thousands of characters on something that can be rendered in literally one character okay. I get grumpy and it's a nice consolation to have something to show which usually isn't the case.

Sex Bumbo fucked around with this message at 16:10 on Aug 22, 2016

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Sex Bumbo posted:

Yeah sorry. It feels really weird to spend a zillion hours and tens of thousands of characters on something that can be rendered in literally one character okay. I get grumpy and it's a nice consolation to have something to show which usually isn't the case.
I liked your burger.

It was a good burger. Very burger'y.

Adbot
ADBOT LOVES YOU

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Hell yeah my OS can load programs now.



Op success.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply