Convert openscad renders to jpeg or webp #240

Open
opened 2021-03-12 21:13:20 +01:00 by Irev-Dev · 2 comments
Irev-Dev commented 2021-03-12 21:13:20 +01:00 (Migrated from github.com)

Images are being sent as png which is not the best web format. jpg should be much smaller, and if we can detect if they're browser supports webp that would be even better.
https://stackoverflow.com/questions/5573096/detecting-webp-support#27232658

We'll need to figure a good way of doing this in node.

There's a possibility that compressing the image then sending will take longer than just sending, but I doubt it 🤷

Images are being sent as png which is not the best web format. jpg should be much smaller, and if we can detect if they're browser supports webp that would be even better. https://stackoverflow.com/questions/5573096/detecting-webp-support#27232658 We'll need to figure a good way of doing this in node. There's a possibility that compressing the image then sending will take longer than just sending, but I doubt it 🤷
toddmedema commented 2022-01-14 00:15:18 +01:00 (Migrated from github.com)

I noticed that it has to re-render each time you rotate the camera - why are the renders being sent as an image? Couldn't they be sent as a 3D model so that you can play around with them in the browser directly via web.gl? e.g. https://threejs.org/examples/webgl_loader_stl.html

I noticed that it has to re-render each time you rotate the camera - why are the renders being sent as an image? Couldn't they be sent as a 3D model so that you can play around with them in the browser directly via web.gl? e.g. https://threejs.org/examples/webgl_loader_stl.html
Irev-Dev commented 2022-01-14 01:10:45 +01:00 (Migrated from github.com)

This is why.

https://learn.cadhub.xyz/docs/general-cadhub/openscad-previews

It comes up often enough which is why the link has been added to the viewer
image

Could the explanation be better?

With the backend changes, we'll store artifacts which get around the time it take to make the stl by doing it out of band, so that when viewing other's project it will download the 3d artifact and only go back to images when the code starts being edited again as a live preview.

This is why. https://learn.cadhub.xyz/docs/general-cadhub/openscad-previews It comes up often enough which is why the link has been added to the viewer ![image](https://user-images.githubusercontent.com/29681384/149428948-0ac3167a-8e55-46c9-929a-a7c55716790a.png) Could the explanation be better? With the backend changes, we'll store artifacts which get around the time it take to make the stl by doing it out of band, so that when viewing other's project it will download the 3d artifact and only go back to images when the code starts being edited again as a live preview.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#240