READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/

## Does anyone interested in webgl?

Post questions about game models here, or help out others!
finale00
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 294 times

### Re: Does anyone interested in webgl?

A regular list of triangles didn't work for a lot of the models.

Ninja
veteran
Posts: 84
Joined: Sat Feb 26, 2011 3:44 am
Has thanked: 1 time
Been thanked: 20 times

### Re: Does anyone interested in webgl?

Look at the patterns at the start and further in

Code: Select all

``````
42, 18,19,0, 1  ,0,1,2,    0,1,2,
42, 1,18,0,  1  ,3,0,2,    3,0,2,
42, 8,18,1,  1  ,4,0,3,    4,0,3,
42, 2,8,1,   1  ,5,4,3,    5,4,3,
42, 3,8,2,   1  ,6,4,5,    6,7,5,
42, 3,10,8,  1  ,6,7,4,    6,8,7,
42, 14,15,4, 1  ,8,9,10,   9,10,11,
42, 5,14,4,  1  ,11,8,10,  12,9,11,

42, 1095,1093,980,  1  ,555,541,556,  2463,2465,2458,
42, 1084,1094,1082, 1  ,527,530,531,  2466,2462,2438,
42, 1084,1096,1094, 1  ,527,554,530,  2443,2467,2462,
42, 1094,1096,987,  1  ,530,554,557,  2462,2467,2460,
42, 1096,1084,1097, 1  ,554,527,513,  2467,2468,2469,
``````
42 followed by 3 numbers followed by a 1 followed by 3 numbers and 3 more numbers.
Guessing one of the sets of 3 numbers is the triangle list(referencing the vertices), one is the normals?, and one is the UV sets(pairs?)?

finale00
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 294 times

### Re: Does anyone interested in webgl?

The normals and UV's are stored as separate lists so I guess that would make sense.
It would be nice if the list is consistent, otherwise parsing it would end up being checking each value one at a time...

lol ok I went and parsed it as you said and here's something..

http://db.tt/6WIjjqPK

This one: http://www.3dcg-arts.net/art/132

dj082502
mega-veteran
Posts: 202
Joined: Wed Oct 13, 2010 3:47 am
Has thanked: 37 times
Been thanked: 21 times

### Re: Does anyone interested in webgl?

finale00
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 294 times

### Re: Does anyone interested in webgl?

It should.

alon
veteran
Posts: 158
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

### Re: Does anyone interested in webgl?

This is a great script! Thanks, finale00.
But, this script does not support all, and obj export is missing UVs.
http://www.mediafire.com/?phq3ja2hx56l5y5

finale00
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 294 times

### Re: Does anyone interested in webgl?

I never added materials normals or UV because UV's are per-face and not per-vertex.

If I brute-forced it by creating new vertices it will take too long to process all that data.

dj082502
mega-veteran
Posts: 202
Joined: Wed Oct 13, 2010 3:47 am
Has thanked: 37 times
Been thanked: 21 times

### Re: Does anyone interested in webgl?

finale00
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 294 times

### Re: Does anyone interested in webgl?

That one has even more indices.

Just look at the 43's and you'll see that there are 13 more values before the next 43.

The ones that start with 42 have only 10 values after.

They might even be quads.

Code: Select all

``````43: 7,8,33,9; 13: 0,1,2,3 ; 0,1,2,3,
``````

alon
veteran
Posts: 158
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

### Re: Does anyone interested in webgl?

An error has occurred while opening some *.webgl with Noesis.
http://www.3dcg-arts.net/api/model/get/ ... ormat/1067
Here is some information that will help you.
viewtopic.php?p=65628#p65628

finale00
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 294 times

### Re: Does anyone interested in webgl?

The file is too big I'm not going to bother going through it and seeing where it messes up.
I pretty much assume they use JSON-like structure to store the model data and convert that to a dictionary in python.

alon
veteran
Posts: 158
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

### Re: Does anyone interested in webgl?

https://github.com/mrdoob/three.js/
Is that site very different from 3dcg-arts?

finale00
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 294 times

### Re: Does anyone interested in webgl?

I don't know. I would assume 3dcg wrote their own parser/viewer as well.

EDIT: nvm LOL it looks like they're using his library, or at least something that looks like it. Could be coincidence though, since minimizers probably spit out the same sort of things...

Ares722
veteran
Posts: 154
Joined: Thu Jul 15, 2010 2:15 pm
Has thanked: 24 times
Been thanked: 9 times

### Re: Does anyone interested in webgl?

Unfortunately most of the models can't be converted with the script and some of them are really high poly.
Sorry for this stupid question,but is theorically possilble to create a offline opengl viewer form the informations we have and ripp the model with opengl ripper like 3dvia?
Or we need to know more about the format to create a viewer?
I tried to dump directly from the web viewer in firefox, but the browser crashes when 3dvia starts ripping .

o0DemonBoy0o
veteran
Posts: 106
Joined: Tue Apr 03, 2012 6:02 am
Has thanked: 11 times
Been thanked: 12 times

### Re: Does anyone interested in webgl?

how exactly did you get the model to show?
I tried but failed at getting these two
http://www.3dcg-arts.net/art/1222
http://www.3dcg-arts.net/art/317