Hi! I extracted files from Acura Mobile Racing Game, 3d models in .json, textures in .ktx. I looking converter from json to obj but I didn't find. Textrures can't open using PVRTexTool.
Here is all files of this game: https://mega.nz/#!GkF12a6b!yOftbmzcS9kl ... yYVhUnSZTU
The Forum is up for sale: XeNTaX Forum looking for new owner
Acura Mobile Racing Game .json .ktx
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Acura Mobile Racing Game .json .ktx
wheel and arx body:
. Some preparations required: remove "position": [, ']' etc from the json file, replace commas by blanks
then conversion to .obj is simple in case you can code (stream1: input file, .json; stream: output file: .obj):(Added automatic created face indices to the obj file.)
Files need to be opened/closed, of course.
. Some preparations required: remove "position": [, ']' etc from the json file, replace commas by blanks
then conversion to .obj is simple in case you can code (stream1: input file, .json; stream: output file: .obj):
Code: Select all
float x, y, z ;
FILE *stream, *stream1 ;
[...]
while (fscanf( stream1, "%f", &x) != EOF) {
fscanf( stream1, "%f %f", &y, &z) ;
fprintf(stream, "v %f %f %f\n", x*10.0,y*10.0,z*10.0) ;
}
[...]Files need to be opened/closed, of course.
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Sun Mar 22, 2020 8:36 am, edited 1 time in total.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
zimex25
- veteran
- Posts: 142
- Joined: Thu Feb 04, 2016 9:20 pm
- Has thanked: 19 times
- Been thanked: 13 times
Re: Acura Mobile Racing Game .json .ktx
Probably I'm stupid but where I need replace all "," or ['] to blanks and what next? I need past this code?shakotay2 wrote: ↑Fri Mar 20, 2020 11:53 pm wheel and arx body:
.
wheel.png
Some preparations required: remove "position": [, ']' etc from the json file, replace commas by blanks
then conversion to .obj is simple in case you can code (stream1: input file, .json; stream: output file: .obj):(Added automatic created face indices to the obj file.)Code: Select all
float x, y, z ; FILE *stream1, *stream1 ; [...] while (fscanf( stream1, "%f", &x) != EOF) { fscanf( stream1, "%f %f", &y, &z) ; fprintf(stream, "v %f %f %f\n", x*10.0,y*10.0,z*10.0) ; } [...]
Files need to be opened/closed, of course.
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Acura Mobile Racing Game .json .ktx
You need to be a coder to understand what to do. (The replacement of commas by blanks has to be done in the .json file.)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- reh
- veteran
- Posts: 101
- Joined: Mon Nov 16, 2015 11:18 pm
- Has thanked: 57 times
- Been thanked: 91 times
Re: Acura Mobile Racing Game .json .ktx
Maybe this will help:
It contains three bms scripts for use with Quickbms.
The first "delete-1.bms" script deletes "{.." position ": [ ";
The second script "delete-2.bms" replaces "," with "white space";
The last script "delete-3.bms" should delete " ].} ", But it is not working, I recommend deleting it manually, from what I saw, it only appears at the end of the file.
When you run the scripts with quickbms and see "the following output file already exists: ..." press "y" and "enter" to replace the file or "r" to rename it automatically.
The first "delete-1.bms" script deletes "{.." position ": [ ";
The second script "delete-2.bms" replaces "," with "white space";
The last script "delete-3.bms" should delete " ].} ", But it is not working, I recommend deleting it manually, from what I saw, it only appears at the end of the file.
When you run the scripts with quickbms and see "the following output file already exists: ..." press "y" and "enter" to replace the file or "r" to rename it automatically.
You do not have the required permissions to view the files attached to this post.
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Acura Mobile Racing Game .json .ktx
There's some ], and I'd suggest to split the json.
Load it into notepad (whatever), replace all commas by blanks
and save the block up to "uv": [ as vertices.txt.
Then save the the block behind "uv": [ up to "normal": [ as uvs.txt.
(Be sure not to have any [, ] or : in them. Also don't leave the strings "uv" and "normal".)
Copy those .txt files into the folder where json2obj.exe resides and start it.
I've appended a codeblocks project json2obj with a 9kB exe and source code.
.
Load it into notepad (whatever), replace all commas by blanks
and save the block up to "uv": [ as vertices.txt.
Then save the the block behind "uv": [ up to "normal": [ as uvs.txt.
(Be sure not to have any [, ] or : in them. Also don't leave the strings "uv" and "normal".)
Copy those .txt files into the folder where json2obj.exe resides and start it.
I've appended a codeblocks project json2obj with a 9kB exe and source code.
.
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Acura Mobile Racing Game .json .ktx
.
Important:No commas allowed in vertices.txt and uvs.txt. The exe will produces a giga bytes file otherwise!
.
Don't forget to "remove doubles" in blender for example. There's plenty of them.
Try out submeshes and look how the devs built the meshes:
Important:No commas allowed in vertices.txt and uvs.txt. The exe will produces a giga bytes file otherwise!
.
Don't forget to "remove doubles" in blender for example. There's plenty of them.
Try out submeshes and look how the devs built the meshes:
Code: Select all
void lin_faceind_3(FILE *stream, DWORD cnt)
{
DWORD i, sm=0 ; //
for (i=1; i< (cnt - 3);i++) {
if ( (i%2000) ==0) {
fprintf( stream, "g sm_%d\n", sm) ; sm++ ;
}
fprintf( stream, "f %ld/%ld %ld/%ld %ld/%ld\n", i,i, i+1,i+1, i+2,i+2) ;
i += 2 ;
}
}You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
