Is this Unity Asset Pack compatible with Needle JS

Hi! Relatively new to unity and needle JS so wanted to ask before I bought this asset pack. Interested in purchasing one of these https://assetstore.unity.com/packages/3d/environments/urban/tokyo-street-228474
- https://assetstore.unity.com/packages/3d/environments/urban/tokyo-street-228474and wanted to make sure if they are compatible with Needle JS. I watched the first youtube tutorial Needle posted and it showed an importing of a Llama GlTF into Needle JS so I wanted to ask if I can import these as GLTF also?

Or does it work that as long as I can import the project into Unity, it can show in Needle JS website?

Original Post on Discord

by user 534547469992853534

It doesnt really matter how the model is imported or in what format as long as Unity can read it (or in case of glTF there are packages that are able to import it such as gltFast or UnityGLTF which we use (and maintain) for exporting)

The same goes for export. If it has a Renderer and fairly standard materials it should work (e.g. if a model has custom shaders they might not work out of the box and might need either some manual conversion). From looking at the content on AS it looks like they use standard URP, HDRP, BiRP materials but I dont see it mentioned. Maybe the author also has free version of the asset to try first too if you’re unsure?

I also see decal materials - someone recently started creating a URP decal projector component (Discord) but I havent tried it yet.

You should also be aware of performance and download size. 3.3gb Assetsize is a lot - depending on how much you put in a scene at once it might get too big (and performance heavy) for a web experience quickly. There are a bunch of things that could help there tho:

For performance we have LODGroup support - the asset says it does provide LODs so if they’re setup with LODGroups that would automatically work.

For filesize we apply compression when doing a production build to both textures as well as meshes. This often times reduces filesize significantly (depending on the types of textures and compression settings) but is of course no magic so there’s always a tradeoff in quality loss. It’s just something to be aware off. We also have progressive loading to split up an exported asset into multiple files (currently it can split highres textures into separate files and then make the initial loading use lower-res textures and only load the highres version once it gets into view).
Also you could dynamically load sections of the city by putting them into prefabs that you load via a script and instantiate.

Wow thanks for the comprehensive answer! does Needle JS automatically apply compression or how does that work?

by user 534547469992853534

And if I wanted to go the LODGroup path instead (assuming that its either compression or LODGroup) is support relatively staightforward?

by user 534547469992853534

When you make a production build we apply compression as a post build step. That is the main difference between a production and a development build. and that’s what you need toktx for. There are some ways to control that via AssetLabels and specific components too (for example if specific images should be compressed using a specific algo because by default the compression loss is too noticeable etc - i can tell you more there when necessary ;))

LodGroup: just add the component in unity and set it up. We dont support cross fading, but switching meshes or culling by screensize (what you setup in Unity) is supported

Oh i see so compression is done automatically

by user 534547469992853534

With compression do you think the 3.3 gb could be compressed enough ? Whats the ideal file size

by user 534547469992853534

Or do you think I need Lodgroup as well to compress it

by user 534547469992853534

by user 534547469992853534

ah i see max 50 mb uncompressed

by user 534547469992853534

Lods will not reduce filesize. They just improve performance by displaying lower resolution meshes for objects at a certain distance.

Filesize is not capped, its just a recommendation. You can export as many mb as you like but export time will take longer and of course people who visit the website will also have to download that.

Oh I see

by user 534547469992853534

so 3.3 gb uncompressed would take longer to load? I’m okay with a 10 second loading time if its higher quality

by user 534547469992853534

Thats what i meant with: you can also structure your content so it doesnt have to be loaded at once. So you can split up your scene into prefabs that can be loaded later while the main part is already loaded. That way you can display some content and “stream in” additional stuff. We do that on our website for example and we only load the “room” that you see and preload up to two sections before and after that

3.3gb will take way longer than 10 sec to load.

Ah okay is this difficult to do ? Do you guys have docs on this already?

by user 534547469992853534

ahh i see

by user 534547469992853534

I dont think i ever saw a website that was close to that size. I would say 50 mb(!) Is already pretty big - usually content should be visible in max 3 seconds otherwise its perceived as long and people might just leave.

Its not difficult. You can find a sample in Needle Engine Samples (the multiple scenes sample)

Ah I see the github

by user 534547469992853534