Knicks guard Jalen Brunson loses the ball in front of Rockets...

Knicks guard Jalen Brunson loses the ball in front of Rockets forward Amen Thompson, left, during the second half of an NBA game Monday in Houston. Credit: AP/Michael Wyke

HOUSTON — Some nights in the NBA, you can game-plan, study film and then find a simple truth — nothing is working.

And for much of the night Monday, that is where the Knicks found themselves. The revamped offense that had begun to flow so smoothly in recent games was missing one key ingredient — the ability to make a shot.

Layups clanked off the backboard. Midrange shots rattled off the rim. The Knicks repeatedly fell into double-digit deficits as an athletic Rockets squad bullied them around and blew by them on the other end.

They fought back to make it close before crumbling in the final minutes, settling for a lesson learned in a frustrating 109-97 loss.

You could point to the reasons. The shooting. The frustration with the officiating. The failure to adjust.

“Yeah, but we can’t say, ‘Shots weren’t falling; that’s why we lost,’ ” Jalen Brunson said. “We need to be able to win games when shots aren’t falling. And I think we thought we fought a good amount, just not enough.

“We needed to play harder. The first half, they outrebounded us and had a step on us. We needed to play harder from that aspect. I think we closed out the second quarter well to an extent. That’s how we need to play all the time.”

If you want to be the contending team the Knicks believe they can be, you find a way. And through foul trouble and frustration, they managed to pull within reach.

The numbers were ugly — 23-for-60 from inside the arc, an 0-for-9 night for Deuce McBride, 9-for-24 for Brunson and four fouls on Karl-Anthony Towns almost before you could blink.

But OG Anunoby kept the Knicks close in the first half, scoring 16 of his 21 points. Towns shrugged off getting his fourth foul 94 seconds into the second half to remain on the floor and grab 10 rebounds in the third quarter alone, finishing with 17 points and 19 rebounds.

The key for the Rockets wasn’t the scoring as much as it was the defense of Dillon Brooks, who frustrated nearly every Knicks player as he switched from Towns to Brunson and nearly everyone in between. Giving up six inches to Towns, Brooks took away his perimeter game and the Knicks struggled while trying to take advantage of the mismatch in the size in the paint.

A pair of free throws by Brunson with 5:28 remaining cut the deficit to one, as close as the Knicks had been since the first quarter. But Alperen Sengun, who finished with 25 points and 11-for-15 shooting, scored in the paint. Hart answered with a layup, but Sengun upped it to three again and Towns misfired from three-point range. Jalen Green then beat the 24-second clock with a three-pointer to push the lead to six.

Mikal Bridges hit a corner three-pointer with 3:03 to play and the gap was just 98-95. After a miss, Hart was called for a loose ball foul while chasing down a rebound. But Anunoby smothered Tari Eason’s drive and the Rockets were called for a 24-second violation, keeping it a one-possession game. The Knicks again could not take advantage, with Brunson misfiring on a jumper and Eason finishing a break on the other end to up the lead to five.

“When you’re not shooting well, you want to count on your defense and your rebounding. I like that we fought back,” Tom Thibodeau said. “I thought the third quarter, our defense was really good. And then I thought the big play was Josh’s foul. It looked like a clean steal to me. Sometimes it goes your way, sometimes it doesn’t.”

Hart cut the lead to three with a layup on a pretty feed from Brunson, but Amen Thompson grabbed a pass in the air, faked a pass and in the same motion slammed in an uncontested dunk with 1:34 left. Brunson missed a three and Green delivered the dagger, a three-pointer with 58.1 seconds left for a 105-97 Rockets lead.

While the Knicks became angered at the officiating — Hart got hit with a technical and a number of other players seemed to walk the tightrope and barely avoid one — Houston built up leads of as many as 15 points.

“Yeah, felt like games like this, we can’t just try to consistently chase the mismatch,” Hart said. “We’ve got to get more movement into it. Even when we got the mismatch we wanted, it was very stagnant. And then we’re just going against a loaded defense. Then it’s tough to offensive rebound, tough to do stuff like that. I think we were decent. We probably complained a little bit too much, let that take us out of the game. We’ve just got to learn from it and build off of it.”

Notes & quotes: Cam Payne was held out with a hamstring injury . . . The Knicks have not made it official, but sources confirmed that the team is converting rookie Ariel Hukporti from a two-way to a standard contract and signing free agent Matt Ryan.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME