G-Lens
- 4 Devlogs
- 9 Total hours
A gravitational lensing simulator, in development rn
A gravitational lensing simulator, in development rn
If you have seen my other sim, you’ll know I wasted no time on adding presets.
Well I now have presets for this sim too to replicate lensing from different celestial bodies
Also, the distortion was kinda eliptical, so I had to fix this as it would change due to different aspect ratios (now its circular).
Added a mass slider, this had some layering issues before but thats not a problem now. I had to fix a bug where the field size and lens size increased at different rates (my stupid ahh used two different equations) so I just rewrote the equations I used for both.
Overall a pretty productive 1hr 30mins, will probably add MORE UI features to make it feel more polished, change the bg image etc. Also probably a toggle lensing button.
See you in the next one!
all video devlogs are at https://instagram.com/urged.st
Okay so for the last 4 hours i’ve been fighting with my shader code as it didnt work for a long time, but it finally works.
Overall, that 4 hour period was a rollercoaster and i’m glad its over. If you want to see how it broke (I didnt devlog this cause I was too preoccupied) there’s a video devlog on my instagram:
Been toying around with distortion lately, I’m still torn between making a full on shader or just having distortion to look like lensing. Most of my time spent has been trial and error with different ways of distorting, from basic inward radial distortion to a more complex particle tracing distortion. I am gonna try and perfect this before moving on I think, because if I can’t get this right then in my opinion I have a long way to go before making a shader.
added mass slider, larger masses = more gravity, so more lensing/distortion!
made the source draggable, but I don’t know how useful this really is lol (maybe easier to centre, to see einstein rings?)
This is, to say the least, gonna be hard.
I have a rough idea of what I’m gonna do, but really i have never made a shader before or used GLSL.
Luckily I decided not to do this today as I was already tired and decided to make a prototype which rather than solving the lens equation, simply uses a radial distort to… well distort the space around it. I did initially try distort a point mass (yeah my bad) so obviously had to switch it to a bunch of particles densely packed. This actually shows a distort, even if its not accurate to astrophysics (this isn’t the goal for today)
Next steps? think about how i will integrate actual physics into this, and read MORE research papers.