ConverterPIX - Game formats to middle formats

Post any tutorial and tools you might find it useful for other creators.
User avatar
50keda
SCS Software
Posts: 1699
Joined: 07 Dec 2012 11:59

Re: ConverterPIX - Game formats to middle formats

#191 Post by 50keda » 22 Oct 2017 18:06

I wouldn't if you can assure that indexes of exported bones will be the same :D

Since BT can not do that, it doesn't know what was imported first and it can not thus none can guarantee that export order of all stream and bone indieces will be the same ;)
User avatar
mwl4
Posts: 86
Joined: 25 Dec 2012 16:06
Location: Poland
Contact:

Re: ConverterPIX - Game formats to middle formats

#192 Post by mwl4 » 14 Nov 2017 21:21

New version of ConverterPIX has been released. https://github.com/mwl4/ConverterPIX

Changelog:
- Added support for ppd version 0x16 (22). Still old version is supported (0x15 - 21)
User avatar
AlexeyP
Posts: 441
Joined: 06 May 2015 12:35
Location: Saint-Petersburg, Russia

Re: ConverterPIX - Game formats to middle formats

#193 Post by AlexeyP » 15 Nov 2017 12:51

Thanks for the update, mwl4! ;)
Retired modder
User avatar
davidzoli
Posts: 2245
Joined: 22 Jun 2014 10:08
Location: Budapest, Hungary

Re: ConverterPIX - Game formats to middle formats

#194 Post by davidzoli » 16 Nov 2017 01:34

Thanks for the update!
What should I do if I use it with BT? Does BT update this automatically?
User avatar
50keda
SCS Software
Posts: 1699
Joined: 07 Dec 2012 11:59

Re: ConverterPIX - Game formats to middle formats

#195 Post by 50keda » 16 Nov 2017 14:03

@davidzoli: yep it updates it automatically 1 per day.

But if you want to force update it then go to User Preferences where you enable addons, search for ConverterPIXWrapper and hit Update ConverterPIX button.
User avatar
davidzoli
Posts: 2245
Joined: 22 Jun 2014 10:08
Location: Budapest, Hungary

Re: ConverterPIX - Game formats to middle formats

#196 Post by davidzoli » 16 Nov 2017 14:34

Thank you!
User avatar
SimulatorSam
Posts: 4902
Joined: 05 Mar 2014 17:52
Location: United Kingdom
Contact:

Re: ConverterPIX - Game formats to middle formats

#197 Post by SimulatorSam » 18 Nov 2017 19:03

mwl4,

While finding an issue with map points (BT issue) I found an issue with ConverterPIX too. In the latest version of ConverterPIX dlc_fr prefabs look different now.

On the left is converted with the latest version, and on the right is my UK adapted version, originally converted with an older version. :)

[ external image ]
User avatar
mwl4
Posts: 86
Joined: 25 Dec 2012 16:06
Location: Poland
Contact:

Re: ConverterPIX - Game formats to middle formats

#198 Post by mwl4 » 18 Nov 2017 20:05

@SimulatorSam After short investigation I can only say that this is SCS Blender Tools issue.

Here is what I found:
I converted: /prefab/cross/r2xr2_t_sw_roundabout_uk

Let's take map point with index 0 and it's two neighbours:

Code: Select all

MapPoint {
     Index: 0
     MapVisualFlags: 4608
     MapNavFlags: 257
     Position: ( &c26a7dbb  &00000000  &00000000 )
     Neighbours: ( 24 23 -1 -1 -1 -1 )
}
MapPoint {
     Index: 23
     MapVisualFlags: 4111
     MapNavFlags: 14
     Position: ( &c223dbd9  &00000000  &c0b7c492 )
     Neighbours: ( 0 26 -1 -1 -1 -1 )
}
MapPoint {
     Index: 24
     MapVisualFlags: 4111
     MapNavFlags: 0
     Position: ( &c227d857  &00000000  &40b2054d )
     Neighbours: ( 25 0 -1 -1 -1 -1 )
}
After exporting from Blender, it looks a bit different though. Of course after exporting from SCS Blender Tools you can not expect the same order of map points in .pip file, but in this case we can use their positions to make sure that they are the same map points.

Code: Select all

MapPoint {
    Index: 0
    MapVisualFlags: 4608
    MapNavFlags: 257
    Position: ( &c26a7dbb  &00000000  &00000000 )
    Neighbours: ( 1 2 -1 -1 -1 -1 )
}
MapPoint {
    Index: 1
    MapVisualFlags: 4096
    MapNavFlags: 0
    Position: ( &c227d857  &00000000  &40b2054d )
    Neighbours: ( 0 23 -1 -1 -1 -1 )
}
MapPoint {
    Index: 2
    MapVisualFlags: 4096
    MapNavFlags: 14
    Position: ( &c223dbd9  &00000000  &c0b7c492 )
    Neighbours: ( 0 20 -1 -1 -1 -1 )
}
So, new order is:
From ConverterPIX | From SCS Blender Tools
0 | 0
23 | 2
24 | 1

ConverterPIX result for MapVisualFlags in 23 index: 4111
SCS Blender Tools result for MapVisualFlags in 2 index: 4096

That means, that SCS Blender Tools does not export some flags that were available on import.

Constants stored in BlenderTools-1.10/addon/io_scs_tools/consts.py look as follows:

Code: Select all

    class MPVF:
        """Constants represeting map point visual flags.
        """
        ROAD_SIZE_ONE_WAY = 0x00000000
        ROAD_SIZE_1_LANE = 0x00000100
        ROAD_SIZE_2_LANE = 0x00000200
        ROAD_SIZE_3_LANE = 0x00000300
        ROAD_SIZE_4_LANE = 0x00000400
        ROAD_SIZE_2_LANE_SPLIT = 0x00000500
        ROAD_SIZE_3_LANE_SPLIT = 0x00000600
        ROAD_SIZE_4_LANE_SPLIT = 0x00000700
        ROAD_SIZE_3_LANE_ONE_WAY = 0x00000800
        ROAD_SIZE_MANUAL = 0x00000D00
        ROAD_SIZE_AUTO = 0x00000E00
        ROAD_SIZE_MASK = 0x00000F00
        ROAD_OFFSET_0 = 0x00000000
        ROAD_OFFSET_1 = 0x00001000
        ROAD_OFFSET_2 = 0x00002000
        ROAD_OFFSET_5 = 0x00003000
        ROAD_OFFSET_10 = 0x00004000
        ROAD_OFFSET_15 = 0x00005000
        ROAD_OFFSET_20 = 0x00006000
        ROAD_OFFSET_25 = 0x00007000
        ROAD_OFFSET_LANE = 0x00008000
        ROAD_OFFSET_MASK = 0x0000F000
        ROAD_EXT_VALUE_MASK = 0x000000FF
        ROAD_OVER = 0x00010000
        CUSTOM_COLOR1 = 0x00020000
        CUSTOM_COLOR2 = 0x00040000
        CUSTOM_COLOR3 = 0x00080000
        NO_OUTLINE = 0x00100000
        NO_ARROW = 0x00200000
4111 is equivalent to 0x100F, and 4096 to 0x1000, what means that 0xF flag was skipped by SCS Blender Tools. Only constant that describes low octet is: ROAD_EXT_VALUE_MASK = 0x000000FF. That probably means, that Blender Tools does not export values under that mask. I do not know why, probably this is bug. @50keda may say more.

Flags in binaries and middle formats are the same, error also occurs in .ppd after conversion in same form:
[ external image ]

[ external image ]

If you convert via conversion_tools results from ConverterPIX directly then problem does not occurs (flags are fine).

Cheers
User avatar
SimulatorSam
Posts: 4902
Joined: 05 Mar 2014 17:52
Location: United Kingdom
Contact:

Re: ConverterPIX - Game formats to middle formats

#199 Post by SimulatorSam » 18 Nov 2017 20:37

I knew the map points are a Blender Tools error, I meant in this example the prefab looks visually different. ;)
User avatar
mwl4
Posts: 86
Joined: 25 Dec 2012 16:06
Location: Poland
Contact:

Re: ConverterPIX - Game formats to middle formats

#200 Post by mwl4 » 19 Nov 2017 00:27

@SimulatorSam I investigated a bit, and found issue. Aux values were converted to linear color space when it is not neccessary (and incorrect). Only aux[2] and aux[3] are now converted in case of water shader.
New version is available on github, just update ConverterPIX version through Blender settings.

Cheers
Post Reply

Return to “User Tutorials & Tools”

Who is online

Users browsing this forum: No registered users and 1 guest