Live data from Hacker News

Best way to display photorealistic 3D in the browser?

news.ycombinator.com

1–10 of 12 posts

Best way to display photorealistic 3D in the browser?

#1
I need to display an item that a user can rotate (left/right, up/down). I can pre-render these in Blender from every angle. Maybe if the renders are done just 10° rotated on every axis, that will do what I need.

Rather than doing it from scratch, I was thinking maybe some library already exists for this but I'm not sure what this is called, so I'm not able to find anything relevant. I am not looking for a STL renderer or some WebGL thing but just some JavaScript trickery.

Re: Best way to display photorealistic 3D in the browser?

#7
post #4

Seems like you’re looking for something to scrub rendered frames. Otherwise, just upload to Sketchfab and embed their viewer. It’s very capable and purpose built for what you’re looking to do.

This. No need to reinvent the wheel. If you're prerendering frames, you can just use a 360 viewer like https://www.npmjs.com/package/js-cloudimage-360-view

If it's real 3d, the Sketchfab viewer is nice indeed. Might not be photorealistic but close enough. There's also https://www.npmjs.com/package/@google/model-viewer

There's probably a ton of libs for either approach, just try a few and pick the best one for your use case.

You can also tie it into scroll state and a narrative, like https://www.scanofthemonth.com/scans/coffee

Re: Best way to display photorealistic 3D in the browser?

#9
post #6

It’s quite state of the art, but Gaussian splatting can be considered. https://projects.markkellogg.org/threejs/demo_gaussian_splat...

These were terribly laggy for me on a Pixel 7

Strange. Were you running out of battery? This method is relatively lightweight and runs smoothly on my older iPhone.

Re: Best way to display photorealistic 3D in the browser?

#10
post #6

Earlier quoted context omitted.

These were terribly laggy for me on a Pixel 7

Strange. Were you running out of battery? This method is relatively lightweight and runs smoothly on my older iPhone.

Nah, plugged in. Maybe the Pixels just aren't very powerful? It feels like 15-20 fps to me. It was smooth on my laptop (M2 Max).
Post reply on HN