Git Product home page Git Product logo

mwl4 / converterpix Goto Github PK

View Code? Open in Web Editor NEW
64.0 64.0 26.0 10.76 MB

Conversion tool that is able to convert from the game binary formats (.pmx) to the middle formats (.pix) in Euro Truck Simulator 2 & American Truck Simulator.

Home Page: https://truckersmp.com/

License: GNU Lesser General Public License v3.0

C++ 84.70% Makefile 0.29% CMake 0.89% HTML 0.14% Python 0.99% Batchfile 0.03% C 8.92% Roff 0.08% DIGITAL Command Language 0.45% Perl 0.07% QMake 0.02% Less 3.43% Shell 0.01%

converterpix's People

Contributors

mwl4 avatar shawnczek avatar theharven avatar vojtamolda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

converterpix's Issues

"Invalid parameters" when only -b specified on Linux

Hello,
I have extracted the base.scs into my base directory inside ETS2 root directory. I placed the converter_pix linux executable into the ETS2 root folder to make it as simple as possible. Yet it still does not work.

My ETS2 root dir looks like this:
base/ base.scs* controller.vdf* core.scs* def.scs* licenses/ readme.rtf* base_cfg.scs* bin/ converter_pix* def/ effect.scs* locale.scs* tools/

When I run .../Euro Truck Simulator 2$ ./converter_pix -b ./base I get

******************************************
** Converter PMX to PIX **
** Copyright (C) 2017 mwl4 **
******************************************
Invalid parameters

I was trying to convert just one model, but file not found error kept occurring, so I decided to try this first. Your tool should be able to do this like this (as of help and README.md).

What could be the problem? I am running Xubuntu 17.04. Should I try to compile it on my machine and see if it fixes it? Or are the any differences between using your tool on Windows and Linux?

Thanks.

Error when trying to extract/convert DDS "format R16G16_UNORM(35) is not supported"

Hi,

Program seems to be unable to convert DAF XF euro6 interior model with the /vehicle/truck/daf_xf_euro6/carpaint_n.dds file being the issue due to the dds file being in an unsupported format.

> ./converter_pix.exe -b ./base_vehicle.scs -e ./out -t /vehicle/truck/daf_xf_euro6/carpaint_n.tobj

 ******************************************
 **        Converter PMX to PIX          **
 **       Copyright (C) 2024 mwl4        **
 ******************************************

<error> [dds] /vehicle/truck/daf_xf_euro6/carpaint_n.dds: File cannot be converted, as format R16G16_UNORM(35) is not supported!
<error> [tobj] /vehicle/truck/daf_xf_euro6/carpaint_n.tobj: Unable to convert DDS '/vehicle/truck/daf_xf_euro6/carpaint_n.dds' to non-DXT10 format.
Unable to convert tobj to old formats: /vehicle/truck/daf_xf_euro6/carpaint_n.tobj

Would it be possible to add support for the R16G16_UNORM format?
Thanks.

I cant get converterpix to show up in the list

hi all i cant get converterpix to show up in the list after he did say it installed it.. i have tried from blender version 2.9 until 3.3 and none of them gets the converterpix to show up after installing

Broken Linux and macOS Build

When trying to build the project on macOS (10.12.4, clang 8.1.0) or Linux (Ubuntu 16.04, gcc 5.4.0) the project fails to build with the following error message:

$ make
...
g++ -c -g -w -O2 -Wall -std=c++14 -msse -msse2 -fpermissive -I./ -I./libs/glm -I./libs/fmt file.cpp -o file.o
In file included from file.cpp:10:0:
file.h:85:17: error: conflicting declaration ‘typedef class FileStd File’
 typedef FileStd File;
                 ^
In file included from file.h:12:0,
                 from file.cpp:10:
./prerequisites.h:91:7: note: previous declaration as ‘class File’
 class File;
       ^
file.cpp: In member function ‘virtual bool FileStd::open(const string&, const char*)’:
file.cpp:36:43: error: ‘directoryExists’ was not declared in this scope
   if (!directoryExists(directory(filepath)) && strchr(attr, 'w') != nullptr)
                                           ^
file.cpp:38:43: error: ‘createDirectory’ was not declared in this scope
    if (createDirectory(directory(filepath)))
                                           ^
file.cpp: In function ‘bool createDirectory(const string&)’:
file.cpp:118:34: error: ‘directoryExists’ was not declared in this scope
  if (directoryExists(dirr.c_str())) {
                                  ^
file.cpp:124:51: error: ‘directoryExists’ was not declared in this scope
   if (!directoryExists(dirr.substr(0, pos).c_str()))
                                                   ^
file.cpp: In function ‘bool copyFile(const char*, const char*)’:
file.cpp:212:8: error: aggregate ‘File fw’ has incomplete type and cannot be defined
   File fw;
        ^
file.cpp: In function ‘std::vector<std::__cxx11::basic_string<char> > listFilesInDirectory(const string&, bool)’:
file.cpp:294:54: error: too few arguments to function ‘std::vector<std::__cxx11::basic_string<char> > listFilesInDirectory(const string&, bool)’
     auto subdir = listFilesInDirectory(full_file_name);
                                                      ^
file.cpp:244:26: note: declared here
 std::vector<std::string> listFilesInDirectory(const std::string &directory, boo
                          ^
makefile:28: recipe for target 'file.o' failed
...

I didn't check Windows, but I think it wouldn't build as well. These look like legitimate C++ errors. There's probably a few functions missing inside of the src/file.h that are needed in src/file.c or something like that.

The converter does not work correctly if metadata table not compressed

If metadata table not compressed, the code below does not work properly.
/src/fs/hashfs_v2.cpp:376
if( !m_root->blockRead( m_metadataTable.data(), m_header.m_metadata_table_offset, m_metadataTable.size() ) )
maybe you meant
if( !m_root->blockRead( m_metadataTable.data(), m_header.m_metadata_table_offset, metadataTableSize) ) ?

Errors when extracting tobj/dds files from hashfs v1 files.

Hi,

Thanks for all the work getting it updated to support hashfs v2, it seems though that it broke extracting tobj/dds files from hashfs v1 files.

Output when extracting a tobj from 1.49 base.scs:

> ./converter_pix.exe -b ./base.scs -e ./out -t /vehicle/wheel/cartrans/cartrans.tobj

 ******************************************
 **        Converter PMX to PIX          **
 **       Copyright (C) 2017 mwl4        **
 ******************************************

<error> [dds] /vehicle/wheel/cartrans/cartrans.dds: File is corrupted
<error> [tobj] /vehicle/wheel/cartrans/cartrans.tobj: Unable to get basic information about DDS '/vehicle/wheel/cartrans/cartrans.dds'!
Unable to convert tobj to old formats: /vehicle/wheel/cartrans/cartrans.tobj

Same when trying to extract a model:

> ./converter_pix.exe -b ./base.scs -e ./out -m /vehicle/wheel/cartrans/cartrans

 ******************************************
 **        Converter PMX to PIX          **
 **       Copyright (C) 2017 mwl4        **
 ******************************************

<error> [dds] /vehicle/wheel/cartrans/cartrans.dds: File is corrupted
<error> [tobj] /vehicle/wheel/cartrans/cartrans.tobj: Unable to get basic information about DDS '/vehicle/wheel/cartrans/cartrans.dds'!
Unable to convert tobj to old formats: /vehicle/wheel/cartrans/cartrans.tobj
<warning> [tobj] /vehicle/wheel/cartrans/cartrans.tobj: Unable to load!
<warning> [material] /automat/d0/d07feb4c16dce97a.mat: Error in material!
<error> [dds] /vehicle/wheel/cartrans/cartrans.dds: File is corrupted
<error> [tobj] /vehicle/wheel/cartrans/cartrans.tobj: Unable to get basic information about DDS '/vehicle/wheel/cartrans/cartrans.dds'!
Unable to convert tobj to old formats: /vehicle/wheel/cartrans/cartrans.tobj
<warning> [tobj] /vehicle/wheel/cartrans/cartrans.tobj: Unable to load!
<warning> [material] /automat/ff/ff8ee3b98a0a545c.mat: Error in material!
<error> [dds] /material/environment/vehicle_reflection_s.dds: File is corrupted
<error> [tobj] /material/environment/vehicle_reflection.tobj: Unable to get basic information about DDS '/material/environment/vehicle_reflection_s.dds'!
Unable to convert tobj to old formats: /material/environment/vehicle_reflection.tobj
<warning> [tobj] /material/environment/vehicle_reflection.tobj: Unable to load!
<warning> [material] /automat/ff/ff8ee3b98a0a545c.mat: Error in material!
[model] cartrans: pim:yes pit:yes pis:no pic:no pip:no vertices:1622 indices:2182 materials:4

Error when opening prefab v24 files

Hey,

When trying to convert new prefabs added with v1.50 (ATS) the converter crashes with the following error:
image

Is it possible to add support for the new prefab files?
Thanks.

Won't import

ConverterPIX crashed or encountered error! Standard output returned:


** Converter PMX to PIX **
** Copyright (C) 2017 mwl4 **


[tobj] /material/environment/vehicle_reflection.tobj: Invalid version of tobj file! (have: 544235885, expected: 1890650625)

Skipping folders?

I'm trying to convert the Ai Traffic Pack by Jazzycat, but the exported version contains less folders than the original. What happened?

Program finishing in the middle

So, I'm getting what I think is an error, where the program stop in some tobj and close, I think that is an error, but also not sure if I'm doing someting wrong.

image

Need a update for 1.50 beta

Hi. im using the 1.50 experimental beta and SCS launched the new extractor and blender files etc... But converterPIX isn`t working more, the browser keep empty when imports the scs models... I think needs a compatbility update. Do you have some intention to update before the official 1.50 version? For beta users like me? If not no problem... but would be nice hehe :) ...Thx.

Stream for Color2 not processed

Color2 processing code supposed to be there in /src/model/model.cpp:1294 (right after "if (currentPiece->m_color)" block) but missing. This is causing a .pmg file containing Color2 attribute producing the output .pim with missing stream for "_FACTOR" tag. SCS Binary Converter gives error regarding to mismatch "StreamCount" in Piece block due of missing one stream. Hope this is fixed, thank you.

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.