OpenNFS / OpenNFS

An attempt to recreate the classic Need for Speed Games (1-6), unpacking their original data files into a modern, scratch built engine.
http://opennfs.com
MIT License
540 stars 27 forks source link

Not an issue! Couldn't find a better way to correspond. #2

Open Fallenleader opened 6 years ago

Fallenleader commented 6 years ago

Just wanted to say I was surprised when I saw this repo! I really hope to see it progress in the future!

You are not the only one who has a love for this game. I am currently working on an open source version myself using Unity. https://snag.gy/A8C5kE.jpg

Looking forward to testing this out as it progresses, and would love to see some nice additions like conversion to more editable formats using this engine. Currently trying to resolve the car models right now. I am not far enough along in my coding knowledge to contribute, but I hope to be able to in the future!

AmrikSadhra commented 6 years ago

Hey! Really appreciate the support man, that unity level is looking brilliant. I'll add some file conversion tasks to the trello board, funnily enough, this project started as a simple car.viv to .obj converter. Track export should easily be possible, but all my work is going into a Vulkan renderer at the moment and progress is slow (Vulkan is haaaaaard).

Thanks for stopping by, and I look forward to the possibility of future collaboration when you're ready.

Amrik

AmrikSadhra commented 6 years ago

Just thought I'd let you know, I saw a thread where you were interested in getting the NFS PU CRP format loaded into something. I'm on the case, but it's not on the project roadmap for at least a month or two ✌️

Fallenleader commented 6 years ago

I was looking into getting the format RE'd. Being honest, that is beyond my skill level. At minimal, the ability to convert NFS 2-5 tracks and cars into OBJ or FBX (later preferred because of animation/ Unity support) is what I am after. If I had the know how to do it, it would have been done or at least in the works by my own hands. Ideally, I can take these conversions and make a modern title using Unity that sports these tracks and cars. Basically on par with your concept of being able to play it on modern hardware, age be damned, but with the bonus of having fine grain control to add better assets if necessary. Player can actually pick which assets they desire, be it retro or modern ;)

The maps though are honestly a bit critical as even a veteran modeler will have a heck of a time making a close to 1:1 clone. Having them converted would translate to a template than one can improve on, such as replacing billboard textures with actual meshes (like I did with the tree and lightpole), adding in grass, improving textures, anything is possible, and having the original tracks means that even with these modifications, the feeling should still remain 1:1 or at minimal extremely close.

That IMO would be true justice for these classic titles that helped pave the way to my love for gaming today.

All I know is unless I missed something somewhere, I am limited to ripping NFS3 maps only, they sometimes rip broken, and require dual conversion to a format I can import into Unity.

AmrikSadhra commented 6 years ago

Looks like our projects are fairly aligned in our goals! I want to achieve what you describe but in an automated manner (automatic substitution of assets from an asset library using parsed track metadata not appropriate for OBJ/FBX), alongside a classic/modern graphics toggle that switches between pre-baked per vertex shading data used in the original, and a real-time shadow mapped solution with dynamic time of day.

You may have some luck modifying nfs3_loader.cpp TRK/COL parsing functions to export to an external file, I do this regularly during bringup of a new parser. This would avoid the issues you're experiencing right now with ripping. Good luck.

Right now I'm working on RE'ing the NFS3 PSX car format, and a High Stakes car parser. Following completion of NFSHS and NFS1 asset parsing, my attention will turn to NFS5, keep checking back :)

Fallenleader commented 6 years ago

I will certainly keep track. Currently at this time, I am only able to code to a limited degree in C# and Unity (and am admittedly too dependent on the language and engine) to be able to modify C++ code or even begin to understand how to implement an OBJ/DAE/FBX export option, but once I have more formal education in programming (C++ and binary manipulation), I will certainly try to modify any code you comment for me is able to parse the models from the original assets, as it could be used to spit out a converted model format theoretically.

HansJK commented 6 years ago

@Fallenleader your screenshot of the game looked amazing!

melroy89 commented 4 years ago

@Fallenleader any repo for your project publicly available?

Fallenleader commented 4 years ago

@danger89 unfortunately no. If you have a hacked Vita, I had a preliminary build using some quick assets for the driving portion I released a while back that has a very rough build of Hometown. https://twitter.com/N00b_B1scu1t/status/1257619009580793856

@HansJK Thanks!

@AmrikSadhra There was a tool released written in delphi that can convert FRD to LWO models, albeit with some issues. I doln't think NFS4 was supported, there are missing pieces/polygons, and LWO is not exactly a common format. I would love to shoot you the tool and source if you think you could whip up a FRD2OBJ (or FBX) version, as it might also aid you on understanding NFS3/4 track formats. the PU CRP seems to be compressed, and a tool called CRP2DRP was made as well, but no further progress was done. Beyond my skills for certain.

Fallenleader commented 4 years ago

An image of what I meant by updating. Shaders not final, as I have a better solution available that I plan to use, but it will give an idea. Yes, it is just one faking tree. But it is a sexy tree. EEF-b1zW4AAK8c0

AmrikSadhra commented 4 years ago

Looks great. Just a heads up that I have an understanding of the NFS5 track format now and the parser is spitting out vertices for it. 2 years late but, got there in the end hey. Will land some of the functionality sometime this year.

Fallenleader commented 4 years ago

Never too late IMO. Side request if you feel inclined to do so would be to not only reverse and spit out usable meshes, but potentially a write up, and if you would love to help out the NFS PU community with the ability to mod tracks, that would make a LOT of people happy. IPL IIRC is the name of the chat/game launching program. If you do check it out, let Jmac know [RS]Razr sent ya. That has been an itch for them for a while, especially if NFS 3/4 tracks eventually end up converted to PU.

I digress though, that is super epic! I have been working on the project off and on for a bit, so this news is highly welcome! NFS3 tracks convert with issues, and I haven't had luck with NFS4 tracks so far. If a complete NFS5 track can be converted, that would be a really cool visual upgrade project for me, and a massive nostalgia trip.

AmrikSadhra commented 4 years ago

Would love to bring a track editor out! It's just so much tougher getting to that point as it almost requires a 100% understanding of all involved formats rather than a ~30% understanding of just where geometry is, a ton more work unfortunately :( I do however think that converting any track into NFS3/4 will be doable, as I'm at ~100% with those games.

None of this is to say an editor isn't possible though - I'll be refactoring the parsers out into their own repository with simple functions for the community to use as a base for their own editors/converters/blender plugins. Thanks though! I'll keep trucking until I have full NFS5 geometry, standing on the shoulders of giants with this work, format document attached, and pic of Autobahn verts. NFS5_Track NFSPUCrp.txt

TheBorn commented 3 years ago

Wow, even in 2020 NFS5 still has their supporters. Has there been anything new since then? It's been about a years since the last post and I am super eager for a converter to put it into blender or something. 😄

Fallenleader commented 3 years ago

On my end, I reached out to the author of FRD2LWO regarding fixing an oversight in his code, which is Delphi basic, a language I am 110% unfamiliar with, but was able to read enough to gather he didn't account for tris and just quads, causing missing geometry in conversion. the source is available, and I will attach it, but he recommends redoing the conversion tool rather than editing this source, since it was "super messy". I can't attest to this myself, since I don't know the language, but at the minimum it might be useful to someone to update a conversion tool to account for tris and not simply quads, and possibly even change the conversion from LWO to FBX. FRD 2 LWO.zip

Another qualm I found with this tool are that it assigns excessive materials of arbitrary color, which makes texturing a pain, since there is no naming nomenclature on what textures go where, causing the end user to be on point to avoid duplicate materials as they texture the track.

FSchiepers commented 2 years ago

TRK2Blender.zip

I let you discover my work and then we can discuss futher on how we want to continue bringing old stuff back to life.

Fallenleader commented 2 years ago

This was a surprise to be sure, but a welcome one! I cannot answer these questions as to where in the source format, but I can answer them from a development standpoint.

FSchiepers commented 2 years ago

has anyone got a frd file specification document like the one for .trk from denis auroux? I already downloaded the .crp file formatcdocument for NFS5 Porsche from AmrikSadhra, which will be really helpful.

AmrikSadhra commented 2 years ago

@FSchiepers Yes absolutely! Denis Auroux has complete documentation for the FRD format inside T3ED. IIRC it is embedded in the "Help" window of the program here.

Fallenleader commented 2 years ago

TRK2Blender.zip

I let you discover my work and then we can discuss futher on how we want to continue bringing old stuff back to life.

Just a small update, I had to track a LWO plugin, and wasn't super clear how to get mat references working right (misunderstood it supposedly automating it?) While this doesn't currently seem to support the PC version (at a glance, the PS1 version is indeed slightly lower poly, but this can be mitigated since there will be a lot of modifications done over time), it does indeed honor the correct geometry, and as such is very much an improvement over the original tool! image

FSchiepers commented 2 years ago

Which PC Version do you mean, it supports only NFS II PC version, NFS3 and HS PC Version have the frd format which will be my next project to improve the existing trk2lwo converter.

Fallenleader commented 2 years ago

Which PC Version do you mean, it supports only NFS II PC version, NFS3 and HS PC Version have the frd format which will be my next project to improve the existing trk2lwo converter.

NFS3 was specifically what I meant by that, though PSX version is a good testing ground since it is still the full track, just lower poly at a glance, unless they actually managed to get the PC LOD0 meshes in there just at a really close render range. Played through the PS3 version on duckstation and noted their LODs are super aggressive, and this tool already discards the lower LODs for me (which is a GOOD thing since modern hardware has no issues whatsoever with the poly count).

Consider the following statements to be more thoughts and not negative feedback or demands, if anything it's just me grumbling and venting. Recently had someone mention they would rather have a clear list of what a user would expect from a tool, so if it's useful, cool. If not, please don't take it negatively.

What I personally hope to see is things blend together in due time to support source to intermediary format from NFS 3/4/5. For NFS 1/2, there are a host of options available from direct source to conversions for NFS 3/4 as well, so plenty of options to port them once 3/4 are supported.

Another personal gripe I have had over the years is split tools for handling tracks and textures separately, Being able to parse the textures in the same tool even to make dumping more simplified is a welcome feature. For the time being I will attempt to dump them using older tools if I can track them down again.

Finally, older and less common intermediary formats like LWO or another format I forgot as it's been ages is a tad aggravating, though blender does have a reasonable LWO plugin available. FBX or OBJ are currently industry standard, so it would be super cool if future tools support this as the intermediary instead

I kinda touched on this in another "issue", so it might also be useful to outlay what my goals as a user are. Like most of these projects, the core idea is bringing the old to the modern, but where I differ is I am attempting further modifications. The most notable aside from effectively rewriting the game logic from scratch is to start with a dirty conversion to PBR rendering standards, followed by high poly model replacements. The goal by the time I am done is the only original meshes left will be the base track itself, all the fences, trees, buildings, etc will be replaced with modern mesh assets to remove that old blocky look and replace it with a remasted look. I also plan to preserve some of the old nostalgia by attempting a specialized PSX like shader that supports PBR lighting but retains that texture wobble and poly jitter from the PSX era. Ultimately the end result will be left freely open for someone with better coding skills to come along and potentially turn it into a truly open networked game, as coding is quite frankly my weakest link to the extreme (wouldn't be reliant on tools from someone else otherwise)

FSchiepers commented 2 years ago

Hi, me again, thanks for the feedback. I get your request to have one program that can do everything and be able to convert everything directly in a more common format. But my coding skills are lacky and I don't have so much free time atm. I now improved the existing frd2lwo tool because I need to start from something and it would take me a lot of time to change the converter to a more common format. As I changed the name of the program to lwo2blender, my goal is rather to help people to be able to export the old tracks into a modern program so that they have something they can start with and from blender you can export to every file format you want, even if using the program needs some more conversion tools. I now declare my work on this program done as I can't improve it further with my skills. Only if you can find a little miss or bug here and there, I will fix it of course. I will now try to improve the trk2blender tool to find some missing polygons as I have now a better understanding of the file formats. Then, finally, I will try my best to write the same program for NFS Porsche. I hope some talented 3D designers can start from the basic geometry this tool can provide and make those tracks shine in other racing engines. So here you go: Improved frd2lwo: frd2blender. The description, improvements and how-to can be found in the readme. https://www.nfsaddons.com/downloads/nfshs/tools/6912/frd2blender.html

TheBorn commented 2 years ago

Hi, me again, thanks for the feedback. I get your request to have one program that can do everything and be able to convert everything directly in a more common format. But my coding skills are lacky and I don't have so much free time atm. I now improved the existing frd2lwo tool because I need to start from something and it would take me a lot of time to change the converter to a more common format. As I changed the name of the program to lwo2blender, my goal is rather to help people to be able to export the old tracks into a modern program so that they have something they can start with and from blender you can export to every file format you want, even if using the program needs some more conversion tools. I now declare my work on this program done as I can't improve it further with my skills. Only if you can find a little miss or bug here and there, I will fix it of course. I will now try to improve the trk2blender tool to find some missing polygons as I have now a better understanding of the file formats. Then, finally, I will try my best to write the same program for NFS Porsche. I hope some talented 3D designers can start from the basic geometry this tool can provide and make those tracks shine in other racing engines. So here you go: Improved frd2lwo: frd2blender. The description, improvements and how-to can be found in the readme. https://www.nfsaddons.com/downloads/nfshs/tools/6912/frd2blender.html

That's amazing. I cant wait for the Porsche one personally. It will be a dream come true to have these maps in 3D format.

TheBorn commented 1 year ago

https://discord.gg/5GECDjUAmS

We finally managed to port track CRP files from NFS5 to blender.

You may join this server to download the tools and guide. If you have any information or knowledge to further develop the tool we would love to hear it! Such as animations.