Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*Statement* Wow! #3

Open
Shadowfita opened this issue Aug 28, 2018 · 16 comments
Open

*Statement* Wow! #3

Shadowfita opened this issue Aug 28, 2018 · 16 comments

Comments

@Shadowfita
Copy link

This is something I have been thinking about attempting for the last couple of weeks and now after a bit of research I've stumbled across this. Amazing work! Have you got any future plans for this? Or was it just a "what the hell lets do it" sort of thing?

@Shadowfita
Copy link
Author

I have an actual question now! Haha.

My SWBF2 Mod tools dont seem to have normal maps that the plugin searches for. "Could not find Textures/kam_bldg_antenna_normal" as an example. Is that something wrong with my install or is something extra needed for those textures?

Thanks!

@NDRWhun
Copy link
Contributor

NDRWhun commented Aug 29, 2018

I've made a pull request. It's called Bump Map and it can be normal map. :) You'll see the update soon. I hope :D

@Ben1138
Copy link
Owner

Ben1138 commented Aug 29, 2018

@Shadowfita A bit from both. I'm currently working on a C++ version of LibSWBF2 (if I find the time), which should replace the C# version in the long term (with an appropriate wrapper).
This warning you're getting can be ignored (and actually be discarded from code). Any texture ending with the given NORMAL_MAP_SUFFIX will be used by Unity's material as normal map if it exists, thats all.

@NDRWhun Battlefront's bump maps consist of one channel, but unity expects normal maps with 3 channels. I batch generated a normal map for every texture with gimp, so this is kind of a leftover from that attempt. I merged you request anyway, feel free to contribute and improve ;)

@NDRWhun
Copy link
Contributor

NDRWhun commented Aug 30, 2018

I'm trying to understand the importer and the layer files. I don't know why some objects are missing. Zero editor can load maps like Coruscant properly, but in the importer it's messed up :/ I'll try to improve.

@Shadowfita
Copy link
Author

@NDRWhun I noticed that too. I'll be focusing on terrain things first (loading textures, fixing clipping through objects) and was planning on looking at that afterwards. Let me know how you go.

@NDRWhun
Copy link
Contributor

NDRWhun commented Aug 30, 2018

Maybe I should check out the placement coords in the parser. Maybe a simple thing :D If you export models one by one and import it to the engine you will face the same issue.

@Ben1138
Copy link
Owner

Ben1138 commented Aug 30, 2018

@NDRWhun The .wld and .lyr file parser is just a huge regular expression, which was just the quick and dirty way to get the information I wanted. So it's not perfect at all (might be the cause of this).

@NDRWhun
Copy link
Contributor

NDRWhun commented Aug 31, 2018

@Ben1138 I'll try to adjust it. Not shure how to start yet. Maybe I should use some third party program to reverse the Zero editor wld/lyr infos. That would be the best way. But I cannot reverse it as I wanted. It's hard. Maybe with hexeditor. It's a good practice for me :D

@Ben1138
Copy link
Owner

Ben1138 commented Aug 31, 2018

@NDRWhun The best thing would be a proper parser/interpreter. But I wont integrate this in the old C# version, but in the C++ version when it's hitting a useable state. IIRC the .wld and .lyr files just consist of lua functions. So integrating lua in LibSWBF2 would be a good idea anyway since all scripts are written in lua.

@NDRWhun and @Shadowfita I really appreciate your participation guys! You would help the progression alot if you guys could help porting LibSWBF2 to C++ first. There are some problems with the C# implementation anyway that I want to eradicate, besides speed.

@NDRWhun
Copy link
Contributor

NDRWhun commented Aug 31, 2018

I'm doing my best. But I have to learn programming and understanding things. It's a lot different than FreePascal.. :'D I've learnt that a long time ago on a very very basic level. But in Unity it needs a C# wrapper?

@Ben1138
Copy link
Owner

Ben1138 commented Aug 31, 2018

@NDRWhun a .NET wrapper (in C#) is part of the new LibSWBF2 :)

@Shadowfita
Copy link
Author

@Ben1138 I'm certainly happy to help out where I can but I'm not very confident in C++. Might be a good learning opportunity though! Is there any way I can contact you outside of this? Discord etc?

@Ben1138
Copy link
Owner

Ben1138 commented Aug 31, 2018

I created a discord group, so we can meet there:
https://discord.com/invite/nNUapcU

@Fallenleader
Copy link

Discord link has expired, and I would really like to communicate with you.
I personally have a single request of adding in the option to import the terrain as a mesh rather than a native Unity terrain. Unity terrain does no support "cave" like edging, which makes maps like Geonosis break in specific areas where the terrain is gouged in or cut in game, however they handle it. I tried ticking the option "terrain cut" which I would have thought would do what I am after, but it changed nothing unfortunately.
I am working on a project right now where your tool is a literal godsend.

@Shadowfita
Copy link
Author

@Fallenleader your name looks super familiar! I swear I know you from somewhere. Here's a link (hope Ben doesnt mind) https://discord.gg/GnPN65e . Yes we spoke about that and had the exact same idea but Ben is focusing on moving his library to C++ before doing any major changes like that as far as I am aware. We spoke about the possibility of the library that already exists to convert terrain to mesh.

@Fallenleader
Copy link

I will parrot this comment in the discord, but the issue with going BF2 -> terrain -> mesh using Unity's option is it will not resolve cutouts and holes if the source (BF2) has such. Going directly from BF2 -> mesh can be made to preserve anything that isn't preserved as a terrain, including texture references (as currently they have to be repainted) and cut/deformed polys for props (currently unsupported by Unity terrain).
You might recognize me once I share pictures of my progress of my own project in the discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants