Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreeJS vs Three speed #47

Open
merco opened this issue Oct 15, 2024 · 8 comments
Open

ThreeJS vs Three speed #47

merco opened this issue Oct 15, 2024 · 8 comments

Comments

@merco
Copy link

merco commented Oct 15, 2024

Hi this is the same model loaded in ThreeJS (chrome)

2024-10-15-17-10-39.mp4

and this in windows forms opentk control

2024-10-15-17-13-06.mp4

rendering speed seems very different.

could something be optimized?

@hjoykim
Copy link
Owner

hjoykim commented Oct 16, 2024

hello
Please, could send your demo model file?

@merco
Copy link
Author

merco commented Oct 16, 2024

@hjoykim here we are!

SourceAndModels.zip

you should be able to create a solution like this, and open a *.s3d file. It contains vertex and positions like the original threejs file.

immagine

I can't include Javascrit version because it'a a legacy format and you need SAPUI5 frameowork runtime installed to get a working viewer. Do you think this part is necessary too?

this is the render time: without any user interaction

immagine

@merco
Copy link
Author

merco commented Oct 16, 2024

a little improvement can be here...
I'm duplicating materials because I want a selection to have the right instance hilighted
You can try using 2robi.S3D

immagine

2024-10-16-08-09-45.mp4

@merco
Copy link
Author

merco commented Oct 16, 2024

I can try also with InstancedMesh and that seems good.
But can I set InstancedMesh visbility, opacity and color each singolar "mesh at position" ?
@hjoykim

But the problem now is that I have some mesh with more than one material... and in this case how can mange only 1 color?

S3DFile.zip

immagine

This overload... shows multiple colors (However, they appear dull and not very bright.: probably a mistake in light positioning?)

immagine

immagine

@merco
Copy link
Author

merco commented Oct 16, 2024

https://medium.com/@pailhead011/instancing-with-three-js-part-2-3be34ae83c57

very interesting but too far from my skills

@hjoykim
Copy link
Owner

hjoykim commented Oct 19, 2024

Hello, I'm sorry too late reply

I've checked your demo projects.
additionally it's need to find the problem what caused this low performance.

Could you answer to below my requests of image?
image

@merco
Copy link
Author

merco commented Oct 19, 2024

the web source is SAPUI5 runtime https://tools.hana.ondemand.com/additional/sapui5-rt-1.127.3.zip
with sap.ui.vk.tutorial.VIT.01 example https://sapui5.hana.ondemand.com/#/entity/sap.ui.vk.tutorial.VIT/sample/sap.ui.vk.tutorial.VIT.01

The source file is a legacy file type that I'd like to migrate in Three C# with a new custom file format. So the web source 3D file isn't exacatly the same, but I'm going to get data from threejs in memory geometries , export them in a binary format and reload in a new c# project as "*.s3d"

This is another example file :
My goal is get geometries from legacy file and create a new file format, fast and light as the original, but in Three C#
1m001934_asm.zip

@hoainamtds
Copy link

I'm also having the same performance issue with the gltf file. Here is my file:
Link dropbox: https://www.dropbox.com/scl/fi/cp52hqxj6fhh4a2biukbe/Architecture_Sample_Revit.gltf?rlkey=4ns8wpg4gge542ihw0xm7wc41&st=48mgh4cl&dl=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants