How are quads rendered in the wireframe?

viewer
3d

(Nexidian) #1

Hey!

First of all i apologize if this question does not belong here.

I'm pretty new to this community but have been using sketchfab for a while now. I am interested in becoming a graphics programmer and i thought for a good starter project i would look at creating my own model viewer for my portfolio, but ran into an issue that i wondered if any developer here would be able to assist me with?

I notice that the wireframe render mode in your viewer displays quads instead of tris and i was wondering how you achieved this? Are you using a shader to show this information, or are you using GL_TRIANGLE strips or something similar?

I would love to know more about how this is done. I understand that your viewer is built on the OSG.JS platform. Is that what is allowing this to be done?

Thanks for any light you can shed on this.

Luke


(Mrchlblng) #2

hey @Nexidian,

I can't give you details about the rendering itself but I can tell you that we actually keep specific data for wireframe; we compute the set of lines for the wireframe before triangulating all faces.
We overall try to "bake" everything we can server side to not clutter our client side code and not have performance issues on lower end devices.


(Ripvannik) #3

Hello. Sorry to jump in here with a related question.

I'm using a programme to generate vector models from scans, but the obj export only includes surfaces.
Does sketchfab generate its own wireframe based on the surface edges ?

Thanks in advance.

Stephen.


(Nexidian) #4

Hey,

Thank you for the response you've given me another area to look into!.

The library i am using triangulates the faces and then bases the wire-frame geometry off of that. So looks like i could hijack that area and do the same :slight_smile:

Thanks again


(Mrchlblng) #5

@ripvannik yes, we parse the faces from the uploaded model, compute the wireframe from those faces (so we keep the quad/polygon outline) and then triangulate all faces.

It may happen that for some formats we triangulate before computing the wireframe in which case the result may not be the intended one. However for OBJ you should be fine.


(Ripvannik) #6

Thanks for the swift reply !
I've had a few unsuccessful uploads recently, and was wondering if this was the issue.
Is there a way to set up an upload and get some feedback on the issue from you ? SF is reporting error code 60 when I upload the obj / mtl zip..

Kind Regards.
Stephen.


#7

Can you post a link to the failed upload page? Or send me the model file?


(Ripvannik) #8

Hi James.
Page is here: https://sketchfab.com/models/34c069ed854349749a116ceea4f1386a

If you need the model file let me know.
Cheers.
Stephen.

I have a bunch of these ready to go and will need to upgrade my account to handle the image files, so this is just the vector.

Cheers.
Stephen.


#9

Thanks, we'll investigate.

By the way, the OBJ file references an MTL file (and I guess some textures too?), but it wasn't included in the upload.


(Ripvannik) #10

Ok.
Yes, there is an image file and mtl associated but the combined file size exceeds the pro limit.

If this is the issue ? I'll get on with upgrading.

Thanks for the support.


#11

How big is the image file? The zipped OBJ is only 10MB, and only 6MB if you use a 7z archive. You should just zip the OBJ + MTL + texture together before uploading.

Still investigating the processing error.


(Ripvannik) #13

HI James.
Here the properties of the files and the zipped version.
I tried to upload them zipped but was knocked back.
I'll look at 7z archive today.

Cheers.
Stephen.


#14

Yep, we're investigating the error :confused:


#15

Also, your texture file is 300MB, which is waaaaaay too big


(Ripvannik) #16

Thanks James, i dont know my Mb from my Gb it seems !

Here are details from a previous upload that i can view.

Here is the details.

The software is generating vectors from pointclouds. http://pointfuse.com/

Any advice is greatly appreciated.

Cheers !