LDraw.org Discussion Forums
3D Part Preview added to Parts Tracker - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: General (https://forums.ldraw.org/forum-12.html)
+--- Forum: LDraw.org Announcements (https://forums.ldraw.org/forum-1.html)
+--- Thread: 3D Part Preview added to Parts Tracker (/thread-23540.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11


RE: 3D Part Preview added to Parts Tracker - Orion Pobursky - 2019-09-08

(2019-09-08, 15:31)Magnus Forsberg Wrote: The 3D part preview seem to be case sensitive.

I made three new files, 3815bpw1c01 - 3815bpw3c01.
They all had code like this:
Code:
1 16 0 0 0 1 0 0 0 1 0 0 0 1 3815b.DAT
1 16 0 12 0 1 0 0 0 1 0 0 0 1 3816bpw3.DAT
1 16 0 12 0 1 0 0 0 1 0 0 0 1 3817bpw3.DAT
None of them showed up in the 3D viewer.

Then I changed two files: 3815bpw1c01 - 3815bpw2c01
Code:
1 1 0 0 0 1 0 0 0 1 0 0 0 1 3815b.dat
1 16 0 12 0 1 0 0 0 1 0 0 0 1 3816bpw2.dat
1 16 0 12 0 1 0 0 0 1 0 0 0 1 3817bpw2.dat
and now they are visible in the 3D viewer.

I left the third file 3815bpw3c01 unchanged.

The server is case sensitive so I probably just need to lower case my url search code.


RE: 3D Part Preview added to Parts Tracker - Orion Pobursky - 2019-09-08

(2019-09-08, 15:31)Magnus Forsberg Wrote: The 3D part preview seem to be case sensitive.

I made three new files, 3815bpw1c01 - 3815bpw3c01.
They all had code like this:
Code:
1 16 0 0 0 1 0 0 0 1 0 0 0 1 3815b.DAT
1 16 0 12 0 1 0 0 0 1 0 0 0 1 3816bpw3.DAT
1 16 0 12 0 1 0 0 0 1 0 0 0 1 3817bpw3.DAT
None of them showed up in the 3D viewer.

Then I changed two files: 3815bpw1c01 - 3815bpw2c01
Code:
1 1 0 0 0 1 0 0 0 1 0 0 0 1 3815b.dat
1 16 0 12 0 1 0 0 0 1 0 0 0 1 3816bpw2.dat
1 16 0 12 0 1 0 0 0 1 0 0 0 1 3817bpw2.dat
and now they are visible in the 3D viewer.

I left the third file 3815bpw3c01 unchanged.

Should be fixed now.


RE: 3D Part Preview added to Parts Tracker - Magnus Forsberg - 2019-09-09

It looks like something is wrong in the viewer. The random colour button also randomize some of the vertices and break the model geometry.


RE: 3D Part Preview added to Parts Tracker - Lasse Deleuran - 2019-09-09

(2019-09-09, 9:15)Magnus Forsberg Wrote: It looks like something is wrong in the viewer. The random colour button also randomize some of the vertices and break the model geometry.
That sounds bad. Do you have a sample file where this is observed?


RE: 3D Part Preview added to Parts Tracker - Magnus Forsberg - 2019-09-09

(2019-09-09, 10:01)Lasse Deleuran Wrote: That sounds bad. Do you have a sample file where this is observed?
I've seen it on two different pc's, on two different parts, 44301a.dat and 93575.dat. These are recently updated parts on the PT.


RE: 3D Part Preview added to Parts Tracker - Orion Pobursky - 2019-09-09

(2019-09-09, 10:01)Lasse Deleuran Wrote: That sounds bad. Do you have a sample file where this is observed?

Can confirm. Just use any part on the tracker. The more triangles, the better.


RE: 3D Part Preview added to Parts Tracker - Philippe Hurbain - 2019-09-09

(2019-09-09, 11:55)Magnus Forsberg Wrote: I've seen it on two different pc's, on two different parts, 44301a.dat and 93575.dat. These are recently updated parts on the PT.
Here too. Especially impressive for https://www.ldraw.org/cgi-bin/ptdetail.cgi?f=parts/u9479.dat


RE: 3D Part Preview added to Parts Tracker - Lasse Deleuran - 2019-09-09

Excellent. Thanks. I see it now too. I will make a local copy and start debugging this evening.

Edit: It seems to be due to poor vertex attribute construction. Unfortunately the bug only appears intermittendly once I reduce the input :S


[.WebGL-0x7fbd710dd000]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 0


RE: 3D Part Preview added to Parts Tracker - Lasse Deleuran - 2019-09-09

Bug identified and fixed in latest push to master branch.

I made the mistake of using the same markers for line vertices and triangle vertices, resulting in triangle vertices being marked as already being in use when they were not. This sometimes resulted in fancy gradient colors, and sometimes complete failures of texture loading.

Thanks for the bus report. This error would otherwise have affected all multi-colored parts.


RE: 3D Part Preview added to Parts Tracker - Orion Pobursky - 2019-09-09

(2019-09-09, 21:22)Lasse Deleuran Wrote: Bug identified and fixed in latest push to master branch.

I made the mistake of using the same markers for line vertices and triangle vertices, resulting in triangle vertices being marked as already being in use when they were not. This sometimes resulted in fancy gradient colors, and sometimes complete failures of texture loading.

Thanks for the bus report. This error would otherwise have affected all multi-colored parts.

Update pulled to server. Everything appears to be fixed.