Coder Social home page Coder Social logo

Comments (29)

mauserzjeh avatar mauserzjeh commented on July 18, 2024

Hi @vrpixel!

Please make sure you extract all the required files from the .iwds into a folder and have the proper folder structure as mentioned in the readme.

Your folder structure should look like this:
.
├── images
├── maps
├── materials
├── xanim
├── xmodel
├── xmodelalias
├── xmodelparts
└── xmodelsurfs

The easiest way is to achieve this is to extract directly these folders from every single .iwd and merge their contents. Furthermore if you open the console in blender you should see error messages that are probably related to the plugin not being able to find the models and images due to path error.

Let me know if you managed to solve this.

from cod-asset-importer.

vrpixel avatar vrpixel commented on July 18, 2024

I actually had to put all these folders inside maps folder, now it loads it. I guess it's a plugin bug?

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

Not sure, the plugin always searches for stuff in the "asset path" which should be the root folder where you have all these folders. Probably you selected the folder of the map as the "asset path" and thats why it finds it now. I would advise you to have the same folder structure as shown above. If you want to import a map select the map from the maps folder and set the root folder as "asset path" and it will properly find everything. Same goes for other assets.

I will try to make a tutorial video soon when i will have time.

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 as I said in the previous comment, assets don't and shouldn't be in the maps folder. You should follow the folder structure stated in the readme. When you import a map it will find the assets only if you have the correct folder structure.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

Ops, I deleted my comment, I understand how it should work now, but as you said, a video would be amazing!

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@vrpixel @GoldenBlack4 The assets should have this folder structure as seen in the following image:
image

When you want to import a map select a map from the maps folder. If you want to import an xmodel select an xmodel from the xmodel folder. Lastly if you want to import a single texture select an image from the images folder. The tool heavily relies on having the correct folder structure. If you can attach some console logs with the error and also how your assets are structured I will gladly look at them

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

Right, that's what I have. Inside the maps folder I have the mp folder too. I was able to extract the mp_toujane map with textures and stuff. Trying now to extract a solo map :) but it takes so much time for some reasons.

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 then that will be the problem. You should not have any subfolders inside these main folders which you can see on the picture I posted before. Just have all maps in the maps folder without any subfolders, because the tool will look for the root asset path 2 folders up in the folder tree from where you import the map.

The tool works with relative paths compared to the asset you are importing for importing additional assets which are required for the map/xmodel.

For example.:

  • If you have subfolders inside the maps, then the asset path the tool sets will be ../../maps and tries to find everything in there ie.: it will look for images in ../../maps/images related to the map ❌ WRONG
  • If you have only the maps inside the maps folder without any subfolders then the asset path the tool sets will be ../../ and tries to find everything in there ie.: it will look for images in ../../images related to the map ✔️ GOOD

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

Ok thank you. I gave a try for the rhine map, but no luck, it is 200% slower than your old plugin for some reasons. After 8 hours of extracting I gave up because it was stuck.

I have the same folder tree as you, mp maps work great and are textures. I got an high end pc so I don't really know what I am doing wrong?

Where you able to extract a solo map too?

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 I did test sp maps as well, although I didn't test them all. An mp map imported for me in ~10-20 mins depending on map size with an i7 4790k and 24GB ram. If you open the console you can see the import logs during importing. Check if there is any errors.

The longest part of the import is reading in the textures and converting them to RGBA format. The plugin does not support .dds currently but I plan to make a feature which will allow to use .dds textures. So you can convert all your .iwi textures to .dds beforehand and just use those. Importing an image is much faster than converting and importing one, especially in python.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

image

I am using Blender via Steam and Call of Duty 2 with Steam too, I don't know if it's important I don't think so.

Here's the screenshot. It says 1.27 seconds for example but it tooks 10min or so. It's always stuck after the lin 407 (xmodel)

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 can you please tell me which map you are trying to import? Is it always the sp maps or mp maps get stuck too?

I'm using the Steam version of Blender as well, CoD2 version doesn't really matter since the plugin just works with files and not the game itself. The times in the logs should be alright, if an asset uses a texture that is already imported then it won't import it again, but just create a new instance.

In the picture you provided, does it always get stuck at this part or it continues and get stuck somewhere else ie.: printing of logs stop and Blender just hangs? If you have some time to make a little video that showcases the situation that could also help.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

I take this screenshot just now as an example, but it's totally random where it get stucks. But it's always the line with the number 407. I am trying to export the sp map : rhine

I can make a video in a few hours with the folder setup etc. and the import process for sure.

Note: I didn't extract ALL assets from the .iwd (sounds, ui, cfg etc), but only all files contained inside those:

├── images
├── maps
├── materials
├── xanim
├── xmodel
├── xmodelalias
├── xmodelparts
└── xmodelsurfs

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 Yes, sounds, ui and other files are not necessary. If you have missed something it would show up in the console as an error log. I will try to test out importing rhine as well and get back to you with the results.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

Thanks, I don't think that I forgot something because I almost put everything I can inside my folder.

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 I have tested sp rhine and it imported in about ~3 hours with an i7 4790k ~4.2Ghz CPU and 24GB memory on Windows 10 Pro 64bit + I was working meanwhile. My assets are on an old external HDD which is pretty slow, which can also make the whole process slower. It indeed stuck a few times for a few minutes, but eventually it did progress further.

I will try to investigate what can cause this. What specs does your PC have? Also where do you have your assets (HDD/SSD)?

image

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

Nice!
I have a i9-9900k with 32GB Ram, the assets folder is placed on my Desktop under /COD2Master/assets on a M2 SSD... Windows 11.

I noticed a little error message on the beggining of the process, I'll send you a screenshot.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

Do you mind sending 2 or 3 screenshots of your subfolder? Just to compare files in it.

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 Ye, specs shouldn't be a problem for you then.

Here are all the subfolders (basically I extracted everything as they were in the .iwd files):
image
image

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

Thank you, here's a screenshot of the error:
image

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 This error message is not really relevant. It just shows that the given texture has an invalid format that the tool doesn't support. Only DXT1, DXT3, DXT5 compression is supported for textures. It will simply just print the error and omit that texture.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

Okay! So the main problem now is just importing solo map :(
I'll try with another pc. I just cleaned everything and I tried again with a multiplayer map, 2 minutes only to import it with textures. But still infinite time with solo version...

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 try to import the smallest map from sp. Maybe decoytrenches or decoytown and see if those stuck as well.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

I confirm I was able to import beltot in 5084 seconds!

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 I will try to come up with a solution in the upcoming weeks to support .dds. Because I think the image decompression is the most resource intensive task in the whole process. Either by just supporting .dds import (probably will be the fastest solution) or I will try to use existing iwi to dds libraries as a .dll or develop my own in Go (future plan) and make the plugin use that for decompression.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

If I extract all the .iwi to .dds formats before importing the map in blender, would it work and save time?

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

@GoldenBlack4 currently .dds is not supported. But I plan to support it. The fastest way will be is that when I will develop .dds support is that you convert all the .iwi files to .dds with some tool like IWI_X_DDS or IWI DDS Fast converter

In the long run I want to make my own .iwi to .dds implementation that this plugin can use, so you won't need any third party tools which are not part of the plugin.

from cod-asset-importer.

GoldenBlack4 avatar GoldenBlack4 commented on July 18, 2024

from cod-asset-importer.

mauserzjeh avatar mauserzjeh commented on July 18, 2024

Just did a new release which should fix the errors mentioned above and added .dds support. Make sure to reextract the game files to have the exact same structure as they have in the .iwd files.

from cod-asset-importer.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.