Live data from Hacker News

Show HN: A simple infinite world in WebGL

erkaman.github.io

21–30 of 61 posts

Re: Show HN: A simple infinite world in WebGL

#22

There seems to be some missing triangles after a while (10-20 sec.) on Chrome on OSX Are these caused by some z-buffer issues caused by increasingly large coordinates?

It does looks like float32 errors from moving the camera too far in a scene.

Seen it before while trying to create an infinite city in WebGL. I ended up creating a world offset for each sector, and every time the camera's position was more than a sector length, reposition the camera in the scene and adjust the sector offsets. May not be the best solution, but it was quick and worked.

Re: Show HN: A simple infinite world in WebGL

#26
Very nice. This reminded me of the flight simulator easter egg in old versions of MS Excel.

Does anyone have some good resources on getting started with WebGL or graphics programming in general? I know the libraries (like Three.JS) but I wouldn't know where to start or how to use them. I see Three.JS being used in fancy websites all the time now and would like to stay up to date.

Re: Show HN: A simple infinite world in WebGL

#27

Very nice. This reminded me of the flight simulator easter egg in old versions of MS Excel. Does anyone have some good resources on getting started with WebGL or graphics programming in general? I know the libraries (like Three.JS) but I wouldn't know where to start or how to use them. I see Three.JS being used in fancy websites all the time now and would like to stay up to date.

for those who've never had the pleasure: https://www.youtube.com/watch?v=c6nY0QkG9nQ

Re: Show HN: A simple infinite world in WebGL

#30
post #17

Earlier quoted context omitted.

>var f = 0.0015974 Where did this number come from? Is it arbitrary?

Just arbitrary hand-tweaking. It was chosen because I though it looked good. When doing procedural generation like this, you basically just tweak constants 'til it looks good. There's no deeper reason behind it.

I'm hoping that this kind of interaction will be part of one of our first encounters with aliens, sometime in the far future. The aliens would ask why we had done something a certain way and the human answer would be: "Because it looks good".
Post reply on HN