You are browsing as a guest. Sign up (or log in) to start making projects!

G-Lens

  • 4 Devlogs
  • 9 Total hours

A gravitational lensing simulator, in development rn

Open comments for this post

1h 29m 34s logged

PRESETS PRESETS PRESETS

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

PRESETS PRESETS PRESETS

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

Replying to @urged-st

0
1
Open comments for this post

4h 4m 33s logged

I FORGOT TO MAKE A LOG

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.

What was the issue?

  • when using shaders on pngs, sometimes the edges and transparent areas render weird
  • I thought my code was wrong, but in reality I just had to switch the image type.
  • issue #2 was that the blue circle, which is the lens (had to make it obvious for debugging) was firstly having inverted movement to the actual distortion field, and secondly sometimes just not showing up.
  • to fix the inverted movement, I just mapped the actual circle’s position to the field’s coords. (btw, the inversion was caused by webgl canvas and p5.js canvas having different coordinate systems)
  • to fix it not showing up, that was just a layering issue.

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:

https://www.instagram.com/urged.st/

I FORGOT TO MAKE A LOG

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.

What was the issue?

  • when using shaders on pngs, sometimes the edges and transparent areas render weird
  • I thought my code was wrong, but in reality I just had to switch the image type.
  • issue #2 was that the blue circle, which is the lens (had to make it obvious for debugging) was firstly having inverted movement to the actual distortion field, and secondly sometimes just not showing up.
  • to fix the inverted movement, I just mapped the actual circle’s position to the field’s coords. (btw, the inversion was caused by webgl canvas and p5.js canvas having different coordinate systems)
  • to fix it not showing up, that was just a layering issue.

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:

https://www.instagram.com/urged.st/

Replying to @urged-st

0
2
Open comments for this post

1h 50m 53s logged

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?)

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?)

Replying to @urged-st

0
2
Open comments for this post

1h 28m 44s logged

G-Lens Begins!

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.

G-Lens Begins!

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.

Replying to @urged-st

0
3

Followers

Loading…