Kristaps Porzingis sprung up off the bench after a couple of Robin Lopez’s blocked shots Friday night in Philadelphia, including one that he slammed against the backboard.

Lopez’s defense was why the Knicks signed him, but he’s given them much more. He has been the Knicks’ second-most- consistent player behind Carmelo Anthony. Lopez has given the team an inside presence on both ends of the floor and has proved to be a better offensive player than expected. He led the Knicks with 24 points and 15 rebounds in the win over the 76ers.

“I’m in a different role than I was on previous teams,” Lopez said. “I don’t like patting myself on the back, but I think I’m doing well in a different role.”

The 7-footer’s play has gone largely unnoticed because of another lost Knicks season. The Knicks (32-48) will play their final home game Sunday night against the Raptors and close out the schedule Tuesday night in Indiana. There won’t be any playoff basketball inside Madison Square Garden for the third straight year.

The Knicks gave Lopez a four-year, $54-million contract last summer. In his stops in Phoenix, New Orleans and Portland, Lopez had a reputation for being a defensive anchor, an elite offensive rebounder and a selfless teammate who never worries about his touches. He been that with the Knicks, but they also have utilized him in the post more and given him more opportunities to score.

Lopez said he’s never gotten the ball and been asked to score this much in his career. He has shown he can hit hook shots with either hand as his offensive game continues to improve.

“It’s a new challenge,” Lopez said. “I’m enjoying it immensely. It’s fun to stretch your wings in a difference facet of the game.”

advertisement | advertise on newsday

Lopez had career averages of 8.2 points, 5.0 rebounds and 1.2 blocks coming into the season. For the Knicks, Lopez is averaging 10.3 points, 7.4 rebounds and 1.6 blocks.

While Lopez spoke about his play after the game against the 76ers, Porzingis — seated nearby in the locker room — said, “Monster game.” Lopez has had a few since Kurt Rambis replaced Derek Fisher as coach.

In 54 games playing for Fisher, Lopez had six double-doubles. He’s had nine double-doubles in 26 games under Rambis, including a 23-point, 20-rebound night against the Kings and a 20-point, 19-rebound night against the Clippers.

Under Fisher, Lopez averaged 9.2 points, 6.4 rebounds and 1.4 blocks per game. Since Rambis took over, he is averaging 12.5 points, 9.5 rebounds and 2.0 blocks.

Rambis is giving Lopez the ball more, especially deep in the post. He’s playing five more minutes and averaging 2.9 more shots with Rambis at the helm.

Knicks videos

“He’s growing as a ballplayer,” Rambis said. “He’s gaining confidence in his offensive game and we’re encouraging him to explore those avenues so he can be a real value to us.”

All of these numbers mean little to Lopez, though, because the Knicks aren’t winning.

“That’s the ultimate goal,” Lopez said. “We want to be winning. I’m just trying to do my part to go out and play hard to do whatever I can to help that.”