sloan at December 24th, 2007 13:39 — #1
Gravity effects just about everything, including light. Being the nut that I am, I enjoy messing around with super masses (when writing) which has lead me to ask thus if anyone has had parallel thoughts. Would most likely cause the average PC to melt to create the effects in real time.
Anyway, just a bit of random thought, tear it to shreds.
nyx at December 24th, 2007 14:22 — #2
It's not too clear what your idea is. Are you talking about simulating the bending of light due to gravity?
If so, you may be able to use shaders and postprocessing to get a rough approximation, in some cases, of what an observer would see in terms of distortion.
However, a proper simulation of global illumination with gravitic lensing and such would probably mean simulating individual photons as actual particles that do not travel instantly, instead of rays... Or perhaps turn the rays into parametric curves in space, if there's a way to easily know the trajectory a photon will take when subjected to gravitational sources of different shapes and intensities.
reedbeta at December 24th, 2007 16:14 — #3
It's been done, though not in real time:
thenut at December 25th, 2007 00:55 — #4
With a raytracer this is a trivial problem, but with rasterization it sounds pretty complex, if not impossible.
As a fake solution, I suppose if you treat each pixel on the screen as an atom (a single, floating particle), then you could manipulate (twist, swirl, and stretch) those atoms around your gravity wells. Draw the scene once normally, then again to manipulate the frame buffer results in a fragment shader. You could calculate the distance of each pixel to the gravity well (whose positions are supplied as fragment parameters) and then given some time T (another parameter), you could project where the pixel should have been (distortion). This is very simple at best, with a lot of issues still to be addressed (such as missing gaps generated)
sloan at December 25th, 2007 05:57 — #5
Wow, it seems I was answered. I can sort of see how this would work for something such as the black hole/superstar orbit near starburst galaxy M82, I guess my real question is the possibility of an object with a gravitational field moving (in relation) at high speed past what could said to be (in relation) spot lighting.
Why might you ask? The theory of existents of life forms living within a high gravity well, who with being able to surmount the barriers of this well, have found them selves in a such relatively low-gravity realm that their DNA structure begins to crystallise in the relative micro-gravity. Thus following with weaponry to be of such compressed mass that the projectile would bend light in its passing.
reedbeta at December 25th, 2007 14:04 — #6
There are "light-bending" effects in several recent Valve games - for instance, if you've played Portal, there is a slight (hard to notice) bending effect when you open a portal, also in the Half-Life 2 games when a strider fires its big laser gun (not its normal gun) there is first a "sucking" effect where light appears to be bent around the strider. Maybe other games have something similar, too. So it's possible to do some light bending effects in real time, but it's not anything like an actual general-relativistic simulation, just a hack that looks good. Still, I bet you could implement your projectiles this way and no one would know the difference.
sloan at December 26th, 2007 07:11 — #7
It seems that I have never played the games thus mentioned. For your examples. are they both from stationary objects? If so, then question is how it would react whilst in movement; I need a Steven Hawkings incarnate, does anyone have one that I could barrow for this?
it also sounds like a general warp effect, my thoughts go along lines such as the effects seen when experiencing a solar eclipse, the bending of light such that it brings into view object that have once been blocked by such said light bending mass.
thenut at December 26th, 2007 18:46 — #8
They were called "Striders" in Halflife. Here's a You Tube video on one. Scroll to the 25th second. The effect simply "sucks in" the surrounding area and then the projectile is fired off. It's not really what you're after, but it's a start I suppose.
reedbeta at December 26th, 2007 20:14 — #9
I don't see that there would be any technological difference between doing it on a stationary or on a moving object.
sloan at December 27th, 2007 15:43 — #10
In reading through that which my mind can handle; it seems that it matters a large amount on the numbers side, something about angle.
Any real physics nuts around here? It looks like we have a hunt.
Oh, and here is a old discussion about something similar that I found: http://www.physicsforums.com/showthread.php?t=87991
reedbeta at December 27th, 2007 15:51 — #11
Okay, if you're going the full monty and doing a general-relativistic simulation, then yes it does matter whether the observer and the source of gravitation are moving relative to one another, or not. However, the degree to which a gravitational field's shape changes under motion depends on how close to the speed of light the motion is. But you want your light-bending projectiles to move at a slow speed, or the player can't possibly see them moving. Thus the effects will be negligible.
sloan at December 30th, 2007 08:00 — #12
Well, I am not sure what the point would be of a gravitational mass traveling in a parabolic arc; so it should be near enough to the light speed horizon that the object itself cannot be tracked by the human eye, only the trailing gravitational effects.
Also, just something to throw out, lets say this object would be moving at 30% of the speed of light, how much of a Doppler shift would that be? I know it would be a visible when throwing around such large speed such as 30% of light, but I am not sure of the effected area.