In the needle.tools website, why do you need so many different scenes?

is it for optimization? How lightweight can a scene get?

Original Post on Discord

by user 263967078346653697

Exactly one reason is optimization. Being able to show content as fast as possible is very important in the web.

Scenes can be < 100 KB, it really depends on what you call a scene and put in there.

I was thinking of making a low poly city

by user 263967078346653697

In cas of the website: some scenes are 100kb, some are 400kb, some are a few MB

and the website experience would be moving with camera through it

by user 263967078346653697

i want to have a couple of 3d avatars

by user 263967078346653697

which are like 13k polygons each

by user 263967078346653697

is that doable?

by user 263967078346653697

i guess im looking at it wrong

by user 263967078346653697

are there any examples of heavy scenes made with needle as websites?

by user 263967078346653697

For heavy scenes you usually start to split it up into chunks (typical for games too) where you then load / unload content that’s needed / not needed, quite similar to what we do in the website

So yes, doable, and depending on how complex your world is you may not even need to do that for a start - our progressive texture tech ensures that everything only has low-res textures at the start and high-res textures are on loaded when objects come into view

thanks for a reply

by user 263967078346653697

would i really need to handle chunk loading?

by user 263967078346653697

isnt it like with regular unity

by user 263967078346653697

if you don’t look at somethinng, its turned off

by user 263967078346653697

from rendering

by user 263967078346653697

So there are mainly two things to think about.

  1. to answer your question about rendering: it’s the same, if you dont look at it threejs does cull it. BUT threejs has of course still to traverse all objects and figure out what’s visible. Same on native of course but there you can (as of now) more do stuff like culling on the gpu more efficiently. GPU and compute support are coming to the web too but it’s still early and not yet widely supported/the standard.

  2. Download size: it’s what Felix was talking about above. In a normal native app you have it already on your machine and people are used to/accept downloading huge apps and games. On the web it’s a different story. You want to show some content as fast as possible and if your website keeps loading even a few seconds people tend to leave. That’s when one option is to structure your app/game in a way to allow loading content dynamically (which you can easily do with Needle Engine and our e.g. Unity or Blender integrations). Then you have a relatively lightweight base scene and you can load heavier stuff in the background (we also provide some optimization for that out of the box already, for example by high-resolution loading textures progressively when they become visible and only load lower-res textures when the file is loaded for the first time)

aaaaa

by user 263967078346653697

thanks so much

by user 263967078346653697