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

Render OBJ and other 3D models directly #123

Open
vednig opened this issue Oct 4, 2024 · 4 comments
Open

Render OBJ and other 3D models directly #123

vednig opened this issue Oct 4, 2024 · 4 comments

Comments

@vednig
Copy link

vednig commented Oct 4, 2024

Hi there, we are building @doshareme, and were looking to add 3d object support for models, with least possible visible model render to preview 3d objects. I had come across zdog, around 6 years ago, I wanted to check in if it is possible at this stage?

If not I would like to implement support for that. Please advise.

@vednig
Copy link
Author

vednig commented Oct 6, 2024

@desandro seems some PR are also pending... What is the status at @metafizzy nowadays?

@different55
Copy link

Not a contributor or anything, but from what I know of Zdog, it probably isn't the project for that. The fundamental way it works is at odds with how traditional 3D works. You could build a loader, but it probably wouldn't be very performant and the flat, unlit shading wouldn't be a great preview compared to what you get out of other projects.

@vednig
Copy link
Author

vednig commented Jan 4, 2025

I was hoping to use a lightweight 3D rendering for preview of models, this is the most performant and efficient one I've worked with.

@different55
Copy link

Hey, if you've got a vision, I won't stop you.

Ultimately you need to take the triangles defined in the 3D file and draw a Zdog triangle with matching coordinates for each one. That bit's relatively straightforward.

Hard part is getting at those triangles. It's hard to find what all exists out there already because Three.js just dominates the discussion online, but you may be able to take advantage of that. Three.js seems to have some extensive file loading capabilities, maybe those could be tapped into to get at the mesh data.

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

No branches or pull requests

3 participants
@different55 @vednig and others