Hi all
Can anyone help me to convert this format ?
Here are some samples.
<link removed due forum rules violation>
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Does anyone interested in webgl?
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Does anyone interested in webgl?
Just open it in a regular text editor. All they have here is the mesh defined in javascript array.
It's a lot easier if you just provide the link to the site cause you use plain HTML5 and javascript for webgl.
It's a lot easier if you just provide the link to the site cause you use plain HTML5 and javascript for webgl.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Does anyone interested in webgl?
No that is just jquery and some css.
Just post the link to the site.
Just post the link to the site.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Does anyone interested in webgl?
Oh, I didn't look at the rest of the javascript file lol I just saw the jquery and moved on.
Then again, I don't even want to look at it simply because it's minimized code.
It looks like they used features from MQO and miku miku dance in it.
All of the information required is stored in the array. It's quite a mess really, but straightforward. It even looks like they used an export script from MQO since every material has the name "mqo" somewhere.
Though, I'd rather use a javascript parser to first parse the file...
How did you download from the site? Do I have to log in?
Then again, I don't even want to look at it simply because it's minimized code.
It looks like they used features from MQO and miku miku dance in it.
All of the information required is stored in the array. It's quite a mess really, but straightforward. It even looks like they used an export script from MQO since every material has the name "mqo" somewhere.
Though, I'd rather use a javascript parser to first parse the file...
How did you download from the site? Do I have to log in?
-
- mega-veteran
- Posts: 163
- Joined: Mon Nov 29, 2010 10:38 am
- Has thanked: 32 times
- Been thanked: 2 times
Re: Does anyone interested in webgl?
Internet Explorer will not support WebGL, that is not correct
Open In Chrome and you don't need login.
Use a ChromeCacheView when it's finished loading.
It is gzip compressed.
Open In Chrome and you don't need login.
Use a ChromeCacheView when it's finished loading.
It is gzip compressed.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Does anyone interested in webgl?
Hmm, for the most part I am kind of lazy to find a library to parser javascript.
If anyone knows any that would make it easier.
On the other hand, I'd probably just take their viewer and write a noesis exporter and then you can load up whatever models you want on the web lol
If anyone knows any that would make it easier.
On the other hand, I'd probably just take their viewer and write a noesis exporter and then you can load up whatever models you want on the web lol
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Does anyone interested in webgl?
Here's the link to the model file
http://www.3dcg-arts.net/api/model/get/three_format/132
(just change the number at the end to look at a different model)
In chrome you can just hit ctrl+shift+j to open the debugger, go to resources and you should see all the images.
I don't really want to parse it directly though. Since the entire model is stored in a single variable m, and it is pretty much a dictionary in python, if you cut out all the other javascript stuff I can read that in and convert it into a dictionary, then parse it normally.
http://www.3dcg-arts.net/api/model/get/three_format/132
(just change the number at the end to look at a different model)
In chrome you can just hit ctrl+shift+j to open the debugger, go to resources and you should see all the images.
I don't really want to parse it directly though. Since the entire model is stored in a single variable m, and it is pretty much a dictionary in python, if you cut out all the other javascript stuff I can read that in and convert it into a dictionary, then parse it normally.
- 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?
Maybe I can lend a hand.finale00 wrote:How should I save the file?
My English is bad, as you probably understand.
Let me explain with a picture.
Here is a chromecacheview.http://www.nirsoft.net/utils/chromecacheview.zip
Last edited by dj082502 on Fri Mar 30, 2012 11:13 am, edited 1 time in total.
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Does anyone interested in webgl?
I figured out that I should just hit ctrl+s and I got the file lol
EDIT: wow I don't know how they store the faces. Some tri strip?
I can't follow it at all lol
It looks like the webgl viewer supports animation as well.
Here's the script I wrote. Just rename the file with ".webgl" extension and remove all of the unnecessary javascript and just have the array there.
Attached with script and sample
http://www.mediafire.com/?bb5zd6sj1p5crbw
I am pretty amazed at how quickly they rendered the thing...in javascript!
EDIT: wow I don't know how they store the faces. Some tri strip?
Code: Select all
for(w=t.length;x<w;x++)y=f[x],E=B+x,y instanceof THREE.Face3?(F=e(y.a,y.b),J=e(y.b,y.c),L=e(y.c,y.a),
c(E,v[F],y.b,v[J],y,["123","12","2","23"]),c(E,v[J],y.c,v[L],y,["123","23","3","31"]),c(E,v[L],y.a,v[F],y,["123","31","1","12"])):y instanceof THREE.Face4?(F=e(y.a,y.b),J=e(y.b,y.c),L=e(y.c,y.d),I=e(y.d,y.a),c(E,v[F],y.b,v[J],y,["1234","12","2","23"]),c(E,v[J],y.c,v[L],y,["1234","23","3","34"]),c(E,v[L],y.d,v[I],y,["1234","34","4","41"]),c(E,v[I],y.a,v[F],y,["1234","41","1","12"])):console.log("face should be a face!",y);var f=p,D={},Q={},p=function(b,c){void 0===D[b]&&(D[b]=[]);D[b].push(c)},v=function(b,
It looks like the webgl viewer supports animation as well.
Here's the script I wrote. Just rename the file with ".webgl" extension and remove all of the unnecessary javascript and just have the array there.
Attached with script and sample
http://www.mediafire.com/?bb5zd6sj1p5crbw
I am pretty amazed at how quickly they rendered the thing...in javascript!
-
- mega-veteran
- Posts: 163
- Joined: Mon Nov 29, 2010 10:38 am
- Has thanked: 32 times
- Been thanked: 2 times
Re: Does anyone interested in webgl?
Code: Select all
NOESIS_ERR_FILE
NOESIS_VER "3.865"
EXCEPTION_CODE "c0000005"
EXCEPTION_ADDR "100a1995"
EXCEPTION_EIP "100a1995"
EXCEPTION_LFL "F:\132.webgl"
EXCEPTION_LCF "F:\132.webgl"
ERR_LOG "Failed to open process."
But, 132.webgl failed to open error in Noessis.
What do you think the trouble is?
-
- M-M-M-Monster veteran
- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 307 times
Re: Does anyone interested in webgl?
Ya, it crashes when it tries to draw the faces.
The indices are weird.
If you load them as straight triangles, it'll fail.
I can't figure out what the indexing pattern is based on the code snippet I put up there, with the whole ["123","23","3","31"] etc.
The indices are weird.
Code: Select all
"faces":[[42,18,19,0,1,0,1,2,0,1,2,42 ...
I can't figure out what the indexing pattern is based on the code snippet I put up there, with the whole ["123","23","3","31"] etc.