HNHacker News
TopNewBestAskShowJobs

OmarShehata

1,448 karma · joined March 23, 2012

Graphics programmer. I like telling stories.

https://omarshehata.me/

submissionscomments
OmarShehata··on Google Photorealistic 3D Tiles and Unreal Engine
Unfortunately you're not allowed to ship these files with your game. They have to stream directly from Google's servers for each user (caching is allowed as long as you follow standard caching rules).

A chunk of Manhatten I extracted is about 30mb glTF, but 7mb with all compression options in gltf-Transform (https://twitter.com/Omar4ur/status/1657361031763578881). But this is not the highest resolution available.

See terms of use: https://developers.google.com/maps/documentation/tile/polici...

OmarShehata··on Hundreds of millions of stars turned into a map of GitHub projects
This is amazing! I love this effect of showing me that my little project that I was working on fairly solitarily is actually part of a community of other people doing similar work that I can reach out to/collaborate with etc!

What does it mean if, I click on a repo, and it shows 5-6 links to specific projects? Does that just mean the jaccard similarity index was below a threshold?

OmarShehata··on Google Earth 3D Models Now Available as Open Standard (GlTF)
It's even worse, you can't even use it for non-visualization purposes! Which limits a _lot_ of possible applications.
OmarShehata··on Google Earth 3D Models Now Available as Open Standard (GlTF)
For anyone else who still feels like this is "too good to be true", here's a quick video clip I made of extracting a piece of Manhatten as glTF files and rendering them in ThreeJS (https://threejs.org/editor/)

https://twitter.com/Omar4ur/status/1656841042279137282

OmarShehata··on Google Earth 3D Models Now Available as Open Standard (GlTF)
You can simply just grab the glTF! Here's Google's doc page on making requests to the .glb (binary version of glTF) https://developers.google.com/maps/documentation/tile/create...
OmarShehata··on Mars Now
If anyone's wondering, looks like it's running ThreeJS! (you can tell by typing `THREE` in the console)
OmarShehata··on Intentionally making close friends
I've seen this happen but it's really interesting that you say this is cyclic/it always falls into this pattern for you.

Have you found that reaching out to individual people in the group to be worthwhile?

I often find it hard to make/maintain meaningful connections in these groups (and the "people care less about what I have to say" etc feels relatable), but I've had great success with just asking individuals like "wanna grab coffee/lunch sometime" either 1 on 1 or in a group of 3. It can be kind of awkward, and there's always a sense of "Oh you guys were hanging out? Why didn't you let me/XYZ know!" but I just embrace that and it's been a much better way for me I think to make close friends.

OmarShehata··on Layoff spree in Silicon Valley spells end of an era for Big Tech
> My experience is also that large proportion of hires can barely program at all

This seems like an oft repeated myth, but you say it's your personal experience, so I'm really curious what you mean by this. These are folks you've seen in SWE who just like, not opening any PRs? Just pretending to do busy work while some nice coworkers do their assigned tasks? How does this work?

OmarShehata··on Creating a DOOM-inspired aesthetic with PlayCanvas
Thanks greggman! It does make sense why it behaves this way, I was confused why Chrome doesn't behave similarly.

(huge fan of your work by the way!)

OmarShehata··on The Future of Games is an Instant Flash to the past
I disagree that Mochi was as or more important than FGL. Perhaps this was true for developers who released a lot of games and could rack up consistent significant monthly views across on all their games.

I remember a big question was always: should you self sponsor if you can't get high enough bids for sponsorship? If they're willing to pay $5k to put their ad on your game, why shouldn't you capture that revenue yourself?

The answer was for most developers it was difficult to capture that value without some kind of centralized game portal where you could redirect this traffic and keep those users coming back. So even if the sponsor was paying $5k and still making money off that game, it was unlikely you could make anywhere near that amount just from Mochi ads or similar.

OmarShehata··on Rotations with quaternions
It's at the bottom of the "What causes gimbal lock?" section, the final code snippet:

``` rotationAroundX = Quaternion.fromAxisAngle(angle1, Xaxis); rotationAroundY = Quaternion.fromAxisAngle(angle2, Yaxis); rotationAroundZ = Quaternion.fromAxisAngle(angle3, Zaxis);

cubeRotation = rotationAroundX * rotationAroundY * rotationAroundZ; ```

Basically, you store 3 quaternions, representing 3 angles, and combine them to get the final rotation.

You might say "This is just quaternions emulating Euler angles!" and my answer is, sure. You can say the same about rotation matrices. There's nothing inherent about rotation matrices that makes them susceptible to gimbal lock. You can implement them as representing 3 fixed angles, thus gimbal lock, or you can implement them as accumulating rotations, thus no gimbal lock. Same is true of quaternions.

The fact that you can get gimbal lock with quaternions is a feature, not a bug. Quaternions are just one way to describe rotations. Gimbal lock is a natural phenomenon of certain physical rotation systems, and can be described whether you use quaternions, or matrices etc.

OmarShehata··on Rotations with quaternions
Oh hey!! Always a pleasure running into familiar faces from NG out in the wild :)

And that's funny...I had the exact same experience in a job interview...which gave me the extra motivation I needed to finally write that up!

OmarShehata··on Rotations with quaternions
Yes, exactly!

And the idea is, _that's_ how you avoid gimbal lock. It's that implementation of multiplying, and overwriting, which can be done with any system that describes and applies rotation, including Euler angles, rotation matrices, etc.

OmarShehata··on Rotations with quaternions
This article incorrectly states that gimbal lock is a property of Euler angles, and that using quaternions prevents it.

This is a common misconception.

Euler angles can be used to rotate an object exactly the same way as quaternions do with no gimbal lock. Similarly, you can apply quaternions in such a way that gimbal lock will happen (if you wanted to represent a physical system of gimbals with quaternions, where that is a physical property).

I wrote a short article demonstrating and clarifying this, hope it helps: https://omar-shehata.medium.com/how-to-fix-gimbal-lock-in-n-...

OmarShehata··on Collected renderings of satellite imagery as cubist art
Nice description from the page:

> I had an idea of the world as a cubist painting. Using a convolutional neural network, I combined compelling satellite imagery with the bold work of abstract expressionist painters. The results you see collected here show approximately what I'd hoped: that humans shape our planet in distinct, clear ways.

OmarShehata··on Integrating Rust into the Android Open Source Project
The reason I'm optimistic about this trend is that it's been a common thing in game development for a long time (low level language for execution speed, high level scripting language for development speed) and it works really well.

Having to maintain this interface between the language does come with its own set of problems but is well worth the tradeoff especially if you can spend most of your time in one language or the other.

OmarShehata··on Bird song sonographs show distinct drawing patterns
This is amazing. The GitHub repo has more information too, about how the common explanation of how our ears work (isolating sounds in an FFT-like-process) may be incorrect:

> Contrary to what you might think, our ears don't seem to rely on an FFT-like process to extract isolated frequencies. Instead, our ears detect periodic parts in the signal, although in most cases those periodic parts closely match the FFT frequencies. There is a simple experiment that proves this point:

https://github.com/soundshader/soundshader.github.io#why-acf...

OmarShehata··on New book contends that Catch Me If You Can is mostly made up
This seems like a pretty big hoax if you made an entire career out if appearing on national TV and giving talks at places like Google for life experiences you completely made up.
OmarShehata··on New book contends that Catch Me If You Can is mostly made up
They reference this talk in the article. I also used to think it was an amazing talk...too bad it's almost entirely fiction.
OmarShehata··on Why does an A note sound different across instruments?
I think just saying "it's timbre" or stating these terms isn't helpful. I've read dozens of articles that try to explain these concepts but still left me with lingering questions.

This was my attempt to show you how you can derive the answer from first principles, just by analyzing the sound, and forming your own hypothesis/getting to these conclusions yourself.

The links at the end do have resources for the physics and theory behind it.

OmarShehata··on How to render outlines in WebGL (with ThreeJS and PlayCanvas source code)
Direct link to source code + live demo: https://github.com/OmarShehata/webgl-outlines#how-to-render-...
OmarShehata··on Uber discovered they’d been defrauded out of 2/3 of their ad spend
They mention the common retort to this which is very bizarre to me: "If online ads don't work, then huge companies wouldn't spend billions of dollars on them. Therefore they must work. You academics are just missing something."

Ok, how does those companies know it works? They don't have any real data to show that it does, just the fear that if they stop they'll lose a lot of business.

OmarShehata··on Show HN: Simulating a Solar Analemma on the Web
TL;DR - if you look up at the sun in an earth engine like CesiumJS and increment time by 1 day each frame you'll see a figure 8 shape being traced.

The shape is the same on any point on Earth, but will be rotated/obscured under the horizon depending on where you are.

OmarShehata··on [dead]
This would be so cool to visualize in CesiumJS and you could watch it from the ground at any point. We even have a tutorial on how to visualize FlightRadar data like this:

https://cesium.com/docs/tutorials/build-a-flight-tracker/

OmarShehata··on Fictional Videogame Stills
This reminds me of a few game jams that were basically about one phase where artists create screenshots of games that don't exist, and then developers pick one of those screenshots and make it a reality.

It was as amazing as it sounds, and you had a lot of leeway as a developer to interpret so much about the game from the one screenshot. So multiple people could choose the same one and make completely different games.

One from Newgrounds in 2013 [1]. A more recent one on itch [2].

[1]: https://www.newgrounds.com/bbs/topic/1342155#bbspost24671968...

[2]: https://itch.io/jam/cartridge-jam-3

OmarShehata··on Show HN: Discover $ monthly revenue of OnlyFans models
Yeah for top tier in a lucrative industry this isn't surprising, and in fact low as you mention. For most of them this is only one revenue stream.
OmarShehata··on Flash Animations Live Forever at the Internet Archive
You should donate to the project making this possible too!

https://github.com/sponsors/Herschel

OmarShehata··on How I generated incomes as a web developer without working as a freelancer
This is very well articulated but don't forget that another big reason is simply buying a new start/commitment to learning something.

If I see a course on SQL, sure I could get all that content for free, but I am more likely to commit if I paid something for it, and I know that, and I'll convince myself it's a good investment because it's curated etc even if I ultimately end up using a lot of free resources anyway to do my learning.

OmarShehata··on How I generated incomes as a web developer without working as a freelancer
How often do you publish? I was also a bit surprised that the blog just skimmed over what I think is the most important part: how to build an audience.

It sounds like "I wasn't a good writer, but I just wrote 50 articles and improved and now I had tens of thousands of readers a month"

I am skeptical that it was all about quality. If his first article had been the best article ever it's still unlikely he'd have found an audience/get noticed. So maybe it's about the frequency of posting? I think it'd be worth reflecting on this more, how did his readership grow in that early period? Were there any inflection points? Etc

OmarShehata··on AWS forked my project and launched it as its own service
In what world does any company use open source software to save money??

What is the alternative? Develop everything yourself in-house? That's not just expensive, it's dumb, because you'll get worse/less reliable software in general.

← PreviousPage 5 of 7Next →