The Forum is up for sale: XeNTaX Forum looking for new owner

NFS No Limits

Post questions about game models here, or help out others!
User avatar
Bigchillghost
double-veteran
double-veteran
Posts: 1002
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 31 times
Been thanked: 1171 times

Re: NFS No Limits

Post by Bigchillghost »

shakotay2 wrote: Fri May 21, 2021 12:01 pm I couldn't get better results
Well, I couldn't see the images posted by GreenTrafficLight earlier. But from that screenshot where AMR interpretated the data as "char", you can clearly see that the square sum (the value on the right of the arrow) of every vector approximately equals to 1.0 within the acceptable error range. That's the most convincing evidence that the data type must be "char", or signed byte.

The error between using the formula

Code: Select all

n1 = vertexBuffer.readByte() / 127;
and

Code: Select all

n1 = vertexBuffer.readByte() * 2 / 255; // == vertexBuffer.readByte() / (255 / 2) == vertexBuffer.readByte() / 127.5
is really insignificant and you can even use 128 as the divisor if you'd like to. So from my point of view this problem isn't actually related to the convertion.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)
User avatar
GreenTrafficLight
beginner
Posts: 28
Joined: Sun Apr 25, 2021 11:54 pm
Has thanked: 10 times
Been thanked: 37 times

Re: NFS No Limits

Post by GreenTrafficLight »

I wrote the script using the BMesh functions this time (well, to be honest, I copy-pasted since DGIorio did already something perfect), but i'm getting the error "Found the same (BMVert) used multiple times" (which can be fixed with a try/except). This error concern some mesh like mesh_glass_windows_a_lod01 (bmw_m3_gtr), but the mesh is still generated and doesn't have any problems. So I don't know if it's really a big issue.

Image

The problem is, I feel that using these functions has more chance for blender to crash (like sometimes, using the script more than 3 times will crash, and sometimes, it will be fine). but the good news is, the normals are actually applied.
(Top is from Advanced Mesh Reaper, Bottom is from the script)

Image

I think it's a problem related to Blender and not the convertion itself.
(Auto-smooth gives a different result, so It doesn't work as a fix)

Image

P.S : The script is not finished at 100%
Last edited by GreenTrafficLight on Sun May 23, 2021 1:51 pm, edited 1 time in total.
Image
Fiammanera628
veteran
Posts: 96
Joined: Sun Jan 07, 2018 6:51 pm
Has thanked: 10 times

Re: NFS No Limits

Post by Fiammanera628 »

And for the UV coordinates? There are any news?
User avatar
GreenTrafficLight
beginner
Posts: 28
Joined: Sun Apr 25, 2021 11:54 pm
Has thanked: 10 times
Been thanked: 37 times

Re: NFS No Limits

Post by GreenTrafficLight »

Fiammanera628 wrote: Fri May 21, 2021 6:00 pm And for the UV coordinates? There are any news?
Some vertex buffer have different format, for example, at stride 24, some start at 12 and others start at 20.

And sadly turn out that the normals is kind of right, but also broken, the traffic_dodge_charger has a broken normal on the right side and selecting it in edit mode fix it, but also break all the other normals (that apply to all model)

(left is Advanced Mesh Reaper, right is from the script)
Image

(It seems that normal are the right one, it must be something to fix in the blender script)
Image

(Entering a mesh in edit mode break all the normals)
Image

Man, Blender is so weird to work it, I kinda wish there was a way to attach the zstandard module to a noesis script (which I tried but didn't work)
You do not have the required permissions to view the files attached to this post.
Image
zimex25
veteran
Posts: 142
Joined: Thu Feb 04, 2016 9:20 pm
Has thanked: 19 times
Been thanked: 13 times

Re: NFS No Limits

Post by zimex25 »

GreenTrafficLight wrote: Fri May 21, 2021 1:38 pm I wrote the script using the BMesh functions this time (well, to be honest, I copy-pasted since DGIorio did already something perfect), but i'm getting the error "Found the same (BMVert) used multiple times" (which can be fixed with a try/except). This error concern some mesh like mesh_glass_windows_a_lod01 (bmw_m3_gtr), but the mesh is still generated and doesn't have any problems. So I don't know if it's really a big issue.

Image

The problem is, I feel that using these functions has more chance for blender to crash (like sometimes, using the script more than 3 times will crash, and sometimes, it will be fine). but the good news is, the normals are actually applied.
(Top is from Advanced Mesh Reaper, Bottom is from the script)

Image

I think it's a problem related to Blender and not the convertion itself.
(Auto-smooth gives a different result, so It doesn't work as a fix)

Image

P.S : The script is not finished at 100%
Isn't too much normals? AE86 rear fenders doesn't look good.
Edit:
F355 also looking "plastic". Rear bumper of E46 looking nice but not perfect. Idk maybe it's problem only in my.
https://ibb.co/RQLgdVv
https://ibb.co/TbMmb9r
You do not have the required permissions to view the files attached to this post.
Last edited by zimex25 on Fri May 21, 2021 6:37 pm, edited 1 time in total.
Fiammanera628
veteran
Posts: 96
Joined: Sun Jan 07, 2018 6:51 pm
Has thanked: 10 times

Re: NFS No Limits

Post by Fiammanera628 »

GreenTrafficLight wrote: Fri May 21, 2021 6:16 pm
Fiammanera628 wrote: Fri May 21, 2021 6:00 pm And for the UV coordinates? There are any news?
Some vertex buffer have different format, for example, at stride 24, some start at 12 and others start at 20.

And sadly turn out that the normals is kind of right, but also broken, the traffic_dodge_charger has a broken normal on the right side and selecting it in edit mode fix it, but also break all the other normals (that apply to all model)

(left is Advanced Mesh Reaper, right is from the script)
Image

(It seems that normal are the right one, it must be something to fix in the blender script)
Image

(Entering a mesh in edit mode break all the normals)
Image

Man, Blender is so weird to work it, I kinda wish there was a way to attach the zstandard module to a noesis script (which I tried but didn't work)
I extracted the whole game, if is needed, I can paste the links
User avatar
shakotay2
MEGAVETERAN
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: NFS No Limits

Post by shakotay2 »

GreenTrafficLight wrote: Fri May 21, 2021 6:16 pmthe traffic_dodge_charger has a broken normal on the right side and selecting it in edit mode fix it, but also break all the other normals (that apply to all model)
well, I know you like it "perfect", so dunno if this helps: I exported the lod00 selection only as a wavefront obj file, deleted all meshes then re-imported the obj.

For me it looks fine (not perfect, though (: ).

(But I have to admit that I didn't understand what you meant exactly with: "(Entering a mesh in edit mode break all the normals)"
for your latest picture. The surface not to be perfectly smooth? Or those darker and brighter Areas?)

edit: well, I see, when rotating the reimported lod00 model around and around, it doesn't look perfect. (But for me it's ok.)
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?"
User avatar
GreenTrafficLight
beginner
Posts: 28
Joined: Sun Apr 25, 2021 11:54 pm
Has thanked: 10 times
Been thanked: 37 times

Re: NFS No Limits

Post by GreenTrafficLight »

shakotay2 wrote: Fri May 21, 2021 8:48 pm well, I know you like it "perfect"
Yeah, but the reason why I think normals are important is because people will probably use these models in mods, and I think broken normals will change a lot how the model will look like in-game. :mrgreen: (But I admit I would have liked to ignore this problem :P )
shakotay2 wrote: Fri May 21, 2021 8:48 pm (But I have to admit that I didn't understand what you meant exactly with: "(Entering a mesh in edit mode break all the normals)"
for your latest picture. The surface not to be perfectly smooth?)
Yep, the surface isn't smooth since it's changed when you enter the selected object in edit mode.

(What the mesh look like before you enter in edit mode)
Image

(What the mesh look like after you enter in edit mode, notice the darker faces that appeared)
Image

I think it related to the fact that the mesh have duplicate vertex that aren't connected (which makes Blender to recalculate the normals). Sadly, merging the vertices doesn't solve the problem.

Image
Image
User avatar
shakotay2
MEGAVETERAN
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: NFS No Limits

Post by shakotay2 »

GreenTrafficLight wrote: Fri May 21, 2021 9:19 pmthe mesh have duplicate vertex that aren't connected (which makes Blender to recalculate the normals).
Oh, well. I totally forgot about that! I can't believe that there were 2556 doubles in the lod00 I mentioned before, so removing doubles leads to 5431 -2556 = 2875 remaining vertices. Unbelievable. :roll:

Even better, newer blender version have the merging by distance feature now, surprise.
Last edited by shakotay2 on Fri May 21, 2021 10:34 pm, 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?"
User avatar
GreenTrafficLight
beginner
Posts: 28
Joined: Sun Apr 25, 2021 11:54 pm
Has thanked: 10 times
Been thanked: 37 times

Re: NFS No Limits

Post by GreenTrafficLight »

Welp, I hate myself, turn out that fixing this problem is really simple (man, I've been on this for three days and tested everything except this), thank to this code

I just had to remplace

Code: Select all

normals.append([n1,n2,n3])
with

Code: Select all

normals.append(Vector((n1,n2,n3)).normalized())
And now, there isn't any problem, also the normals aren't reset when you go into edit mode.

(the left is the one from Advanced Mesh Reaper, just saying)
Image

Image

(I hope I'm not wrong this time :] , this is probably the only best solution that I have found)

Still, there are problems like, sometimes the car_decal_placement_shell crash Blender when you edit it. And plenty of things that I still need to add.
You do not have the required permissions to view the files attached to this post.
Image
Fiammanera628
veteran
Posts: 96
Joined: Sun Jan 07, 2018 6:51 pm
Has thanked: 10 times

Re: NFS No Limits

Post by Fiammanera628 »

Hello,

I noticed that there are also many .sb files, in seperate folders (like Bodykits), I think there are prefabs, but prefabs for what? Idk if there fits into the 3d models but my guess is of yes.

In chase, I attached an example here.
You do not have the required permissions to view the files attached to this post.
zimex25
veteran
Posts: 142
Joined: Thu Feb 04, 2016 9:20 pm
Has thanked: 19 times
Been thanked: 13 times

Re: NFS No Limits

Post by zimex25 »

Fiammanera628 wrote: Sat May 22, 2021 10:04 am Hello,

I noticed that there are also many .sb files, in seperate folders (like Bodykits), I think there are prefabs, but prefabs for what? Idk if there fits into the 3d models but my guess is of yes.

In chase, I attached an example here.
.sb files is scripts in game like gamemodes, physcic, customize info etc. In my view is unnecessary files. The most importat with models and textures is sb3d and sba.
zimex25
veteran
Posts: 142
Joined: Thu Feb 04, 2016 9:20 pm
Has thanked: 19 times
Been thanked: 13 times

Re: NFS No Limits

Post by zimex25 »

Need For Speed No Limits have different textures in different devices. Using script by Bigchillghost I can ONLY (from my version in mobile phone) extract textures with alpha channel but textures from Iphone looking like diffrent format.
Here is samples from Porsche 911 (991) GT3 R.S:
https://www.mediafire.com/file/6rtnl5ah ... 1.rar/file
You do not have the required permissions to view the files attached to this post.
Fiammanera628
veteran
Posts: 96
Joined: Sun Jan 07, 2018 6:51 pm
Has thanked: 10 times

Re: NFS No Limits

Post by Fiammanera628 »

zimex25 wrote: Sat May 22, 2021 12:17 pm .sb files is scripts in game like gamemodes, physcic, customize info etc. In my view is unnecessary files. The most importat with models and textures is sb3d and sba.
Ah ok, thank you for the clarifications :wink:
zimex25
veteran
Posts: 142
Joined: Thu Feb 04, 2016 9:20 pm
Has thanked: 19 times
Been thanked: 13 times

Re: NFS No Limits

Post by zimex25 »

GreenTrafficLight wrote: Fri May 21, 2021 10:33 pm Welp, I hate myself, turn out that fixing this problem is really simple (man, I've been on this for three days and tested everything except this), thank to this code

I just had to remplace

Code: Select all

normals.append([n1,n2,n3])
with

Code: Select all

normals.append(Vector((n1,n2,n3)).normalized())
And now, there isn't any problem, also the normals aren't reset when you go into edit mode.

(the left is the one from Advanced Mesh Reaper, just saying)
Image

Image

(I hope I'm not wrong this time :] , this is probably the only best solution that I have found)

Still, there are problems like, sometimes the car_decal_placement_shell crash Blender when you edit it. And plenty of things that I still need to add.
Any progress of UV Mapping?
Post Reply