[Fixed] OpenGL texture problems

This is where fixed bugs are moved into
LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

25 Aug 2014 23:08

Alright since the last thread was so confusing it got locked I'll create a new proper one.

NOTE: OpenGL mode is the only one available on Image.
Image users can use DirectX mode instead:
Boeing73FLY wrote:navigate to C:\Program Files (x86)\Euro Truck Simulator 2\bin\win_x86 and run troubleshoot_dx9.cmd. After running the .CMD file, you can now start ETS2 as normal in the future.
Special thanks to papanebo for the solution.

List of known problems
  • 1. Wrong textures on signs, on the road, on trucks or general world:
    Image
    Image
    Image
    Image
    Image
    Image
  • 2. Missing number plates:
    Image
  • 3. Route advisor colors are messed up:
    Image
  • 4. Mismatched or missing map markers:
    Image
    (changes when zooming)
    Image
    (changes when zooming)
    Image
    (gone altogether)
  • 5. Broken fonts (after checking job market):
    Image
Last edited by Nathan_A_RF on 02 Oct 2017 16:14, edited 1 time in total.

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

25 Aug 2014 23:09

1. Some DDS textures cannot be opened with GIMP (usually 'Unexpected EOF')

Code: Select all

find . -name '*.dds' > full-list
split -dl200 full-list list
gimp &
cat list0 | while read f; do gimp "$f"; done;    # etc
NOTE: gimp-dds needs to be installed

2. Some DDS textures have wrong format
ScuL wrote:have DDS 8-8-8 32-bit format which is probably why it could crash the game
ScuL wrote:the textures are saved in DDS DXT5 (Nvidia spec). However some files may be in DDS but not necessarily DXT5 (8-bit for instance).
Notice the absence of 'DXT5' in the output of file:

Code: Select all

$ file bad.dds
bad.dds: Microsoft DirectDraw Surface (DDS), 128 x 128, 
$ file good.dds
good.dds: Microsoft DirectDraw Surface (DDS), 1024 x 512, DXT5
Find non-DXT5:

Code: Select all

find . -name '*.dds' | while read f; do file "$f" | grep -q DXT5 || file "$f" | sed -r 's|(.+): Microsoft DirectDraw Surface \(DDS\), [0-9]+ x [0-9]+, (.*)|\2\t\1|'; done;
NOTE: some files are recognized as 'x86 boot sector' for some reason.
NOTE2: original SCS content actually includes ATI2, DXT1, DXT3, uncompressed and unrecognized files.

Convert DDS files:

Code: Select all

nvcompress [-options,..] in.dds out.dds
-rgb no compression
-bc1 DXT1 (no alpha!)
-bc1a DXT1 (binary alpha)
-bc2 DXT3
-bc3 DXT5
-bc5 ATI2 (alpha unsupported?)

3. Incorrect TOBJ files
ScuL wrote:As far as I know the correct TOBJ format for ETS2 works as following:

Header:
01 0A B1 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 03 03 03 00 02 02 00 00 00 00 00 01 00 00 2A 00 00 00 00 00 00 00
where 2A equals the length of the path to the file following;
in this case:
/model/sign/traffic/traffic_signs_se_2.dds
is 42 characters long which equals 2A in hex.

So the total file then becomes:
01 0A B1 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 03 03 03 00 02 02 00 00 00 00 00 01 00 00 2A 00 00 00 00 00 00 00 2F 6D 6F 64 65 6C 2F 73 69 67 6E 2F 74 72 61 66 66 69 63 2F 74 72 61 66 66 69 63 5F 73 69 67 6E 73 5F 73 65 5F 32 2E 64 64 73


The older TOBJ format can have a different header:
01 0A B1 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 03 03 03 00 02 02 00 00 00 00 00 88 39 00 28 00 00 00 00 00 00 00
(here 28 is the length)

The main difference here are the bits with 88 39. So basically if you can identify TOBJ files that have faulty headers you could track them down.
I found that varying bytes are (from 0): 20, 22, 24, 26-28, 30-33, 37-38.

Export all headers:

Code: Select all

find . -name '*.tobj' | while read f; do echo "$(hexdump -ve '/1 "%02x "' -n 40 "$f")" >> headers.txt; done;
so far only bytes 37-38 are the culprits so might as well use '-s 37 -n 2'
might also add $f at the end of echo to print the path on each line

Look for specific bytes:

Code: Select all

find . -name '*.tobj' | while read f; do grep -UaPl "\xc4\x42" "$f"; done;
note the lowercase 'c' in '\xc4'

Replace bytes:

Code: Select all

sed -i -e 's|\xC4\x42|\x01\x00|' "$file"
'-i' changes the file, skipping it would print the output to STDOUT instead
Last edited by LA-MJ on 26 Aug 2014 11:05, edited 1 time in total.

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

25 Aug 2014 23:19

Broken TOBJ:

Code: Select all

model/sign/signs2/sign1.tobj
List of broken dds files:

Code: Select all

font/license_plate/romania_0.dds
model/finland/helsinki/helsinki_cathedral/helsinki_cathedral.dds
model/sign/traffic/border_ro.dds
model/sign/traffic/oradea_enter.dds
model/sign/traffic/traffic_signs_hu.dds
model/sign/traffic/traffic_signs_ro.dds
model/sign/signs2/sign1.dds
List of unrecognized dds files:

Code: Select all

model/general/rail/main_fa_01-main_fa_01.dds
model/sign/navigation/dk_sr_hw13.dds
model/sign/navigation/dk_sr_hw15.dds
model/sign/navigation/dk_sr_hw16.dds
model/village/village_cz/house_23a.dds
model/warehouse/warehouse_02a.dds
prefab/port/hirtshals/amsterdam_port.dds
List of uncompressed dds files:

Code: Select all

font/license_plate/romania_0.dds
material/decal/bra_spot_lights_2.dds
material/overlay/city_fr_fortruck.dds
material/overlay/city_fr_pau_br.dds
material/road/trans0.dds
material/road/trans1.dds
material/road/trans2.dds
material/ui/lp/denmark/rear.dds
material/ui/lp/denmark/truck.dds
material/ui/lp/estonia/rear.dds
material/ui/lp/hungary_hw/bt.dds
material/ui/lp/hungary_hw/front.dds
material/ui/lp/hungary_hw/frontb.dds
material/ui/lp/hungary_hw/rear.dds
material/ui/lp/hungary_hw/rearb.dds
material/ui/lp/ireland/rear.dds
material/ui/lp/latvia/rear.dds
material/ui/lp/liecht/rear.dds
material/ui/lp/norway/rear.dds
material/ui/lp/romania/front.dds
material/ui/lp/romania_hw/front.dds
material/ui/lp/russia/rear.dds
material/ui/lp/spain/rear.dds
material/ui/lp/sweden/rear.dds
model/denmark/oresund/textures/oresund_cable.dds
model/denmark/viborg/kraftvarmeverk/kraftvarmeverk.dds
model/finland/helsinki/helsinki_cathedral/helsinki_cathedral.dds
model/lamp/textures/bra_spot_lights.dds
model/lamp/textures/lights.dds
model/norway/bryggen/bryggen.dds
model/norway/stave_church/stave_church.dds
model/pillar/ptnorma.dds
model/ship/maersk_line.dds
model/sign/navigation/textures/bra_spot_lights.dds
model/sign/navigation/textures/bra_spot_lights_2.dds
model/sign/panorama/textures/bra_spot_lights_2.dds
model/sign/signs2/sign1.dds
model/sign/traffic/border_ro.dds
model/sign/traffic/border_speed_ro.dds
model/sign/traffic/ee/dangerous_turn_ee.dds
model/sign/traffic/oradea_enter.dds
model/sign/traffic/se/dangerous_turn_se.dds
model/sign/traffic/traffic_signs_be.dds
model/sign/traffic/traffic_signs_hu.dds
model/sign/traffic/traffic_signs_ro.dds
prefab/tollgate/denmark/lightmap.dds
prefab/tollgate/denmark/shadowmap.dds
prefab/tollgate/france/Saint-Arnoult/shadowmap.dds
prefab/tollgate/norway/shadowmap.dds
List of non-DXT5 dds files:

Code: Select all

ATI2    vehicle/trailer_eu/transporter/fh/hc-alpha_n.dds
ATI2    vehicle/trailer_eu/transporter/fh/hc-grill_n.dds
ATI2    vehicle/trailer_eu/transporter/fh/hc-matte_normal.dds
ATI2    vehicle/trailer_eu/transporter/fh/hc-metal_n.dds
ATI2    vehicle/trailer_eu/transporter/fh/hc-plast_n.dds
DXT1    material/environment/building_reflection/demo_building_ref01.dds
DXT1    material/environment/vehicle_reflection.dds
DXT1    material/terrain/grass_02.dds
DXT1    material/terrain/grass_03.dds
DXT1    model/airport/parking/concrete01.dds
DXT1    model/bridge/big/bridge1.dds
DXT1    model/bridge/big/bridge2.dds
DXT1    model/bridge/big/bridge3.dds
DXT1    model/bridge/pillar/concretebare0098_4_s.dds
DXT1    model/bridge/pillar/op-m.dds
DXT1    model/bridge/pillar/op2.dds
DXT1    model/bridge/pillar/op3.dds
DXT1    model/bridge/small/belkagorna.dds
DXT1    model/bridge/small/beton.dds
DXT1    model/bridge/small/m28.dds
DXT1    model/bridge/small/m29.dds
DXT1    model/bridge/small/metal.dds
DXT1    model/bridge/small/perila.dds
DXT1    model/bridge/small/plat2.dds
DXT1    model/bridge/small/plyty.dds
DXT1    model/bridge/small/span.dds
DXT1    model/bridge/small/textures.dds
DXT1    model/bridge/storebelt_concrete.dds
DXT1    model/bridge/storebelt_sm.dds
DXT1    model/east/apartement/admin01.dds
DXT1    model/east/apartement/apartmentbuilding04_big.dds
DXT1    model/east/apartement/apartmentbuilding04_roof02.dds
DXT1    model/east/big_house/blok18_rog.dds
DXT1    model/factory/electric2.dds
DXT1    model/france/tourist_signs/tourist06.dds
DXT1    model/gas_station/gas_01_eurooil.dds
DXT1    model/general/food/tex1.dds
DXT1    model/general/garage/d_depo_uzd2.dds
DXT1    model/general/garage/te2.dds
DXT1    model/general/garage/tex.dds
DXT1    model/general/graveyard/krzyz2.dds
DXT1    model/general/graveyard/smirci kriz.dds
DXT1    model/general/graveyard/te2.dds
DXT1    model/general/graveyard/tex.dds
DXT1    model/general/house/far/12-et.dds
DXT1    model/general/house/far/d_dom_3et_12.dds
DXT1    model/general/house/far/d_dom_3et_12_2.dds
DXT1    model/general/house/far/d_dom_3et_12_krisha.dds
DXT1    model/general/house/far/d_dom_3et_5_krisha.dds
DXT1    model/general/house/far/d_dom_3et_5_steni.dds
DXT1    model/general/house/far/d_dom_5et_11.dds
DXT1    model/general/house/far/d_dom_9et_3.dds
DXT1    model/general/house/far/d_dom_9et_3_2.dds
DXT1    model/general/house/far/d_dom_9et_3_3.dds
DXT1    model/general/house/far/d_dom_9et_3_4.dds
DXT1    model/general/house/far/d_dom_9et_3_5.dds
DXT1    model/general/house/far/d_dom_9et_3_6.dds
DXT1    model/general/house/far/d_dom_9et_3b.dds
DXT1    model/general/house/far/d_dom_9et_3b_2.dds
DXT1    model/general/house/far/d_dom_9et_3b_3.dds
DXT1    model/general/house/far/d_dom_9et_3b_4.dds
DXT1    model/general/house/far/d_dom_9et_3b_5.dds
DXT1    model/general/house/far/d_dom_9et_3b_6.dds
DXT1    model/general/house/far/dev.dds
DXT1    model/general/house/far/k_body01.dds
DXT1    model/general/house/far/roof.dds
DXT1    model/general/house/normal/andrian.dds
DXT1    model/general/house/normal/bbg.dds
DXT1    model/general/house/normal/c3ef43ec.dds
DXT1    model/general/house/normal/d_poliklinika.dds
DXT1    model/general/house/normal/d_poz_ch_2.dds
DXT1    model/general/house/normal/d_put_budka_45.dds
DXT1    model/general/house/normal/d_put_budka_50.dds
DXT1    model/general/house/normal/shool_1024.dds
DXT1    model/general/house/normal/texture5.dds
DXT1    model/general/house/small/tex.dds
DXT1    model/general/house/small/tex2.dds
DXT1    model/general/rail/tex ii_stos.dds
DXT1    model/houses/office.dds
DXT1    model/lamp/textures/lamp_mask.dds
DXT1    model/power_line/added_power/bok.dds
DXT1    model/power_line/added_power/gora.dds
DXT1    model/power_line/added_power/hv_concrete3a.dds
DXT1    model/power_line/added_power/izolator.dds
DXT1    model/power_line/added_power/ks_concrete6.dds
DXT1    model/power_line/added_power/lep_metal1.dds
DXT1    model/power_line/added_power/shd-20.dds
DXT1    model/power_line/added_power/wa-tm_ks_lep.dds
DXT1    model/power_line/added_power/wire.dds
DXT1    model/power_line/added_power/wire_ks_3.dds
DXT1    model/scania_competition/scania_board01_adv01.dds
DXT1    model/scania_competition/scania_board01_adv02.dds
DXT1    model/scania_competition/scania_board01_adv04.dds
DXT1    model/scania_competition/scania_board01_adv05.dds
DXT1    model/scania_competition/scania_board01_adv06.dds
DXT1    model/scania_competition/scania_board01_adv07.dds
DXT1    model/scania_competition/scania_board01_adv09.dds
DXT1    model/scania_competition/scania_board01_adv10.dds
DXT1    model/sign/navigation/textures/lamp_mask.dds
DXT1    model/sweden/lamp/textures/lamp_mask.dds
DXT1    model/warehouse/new/detail.dds
DXT1    model/warehouse/services/service_l.dds
DXT1    model/warehouse/warehouse_20a.dds
DXT1    model/warehouse/warehouse_20b.dds
DXT1    model/warehouse/warehouse_22a.dds
DXT1    prefab/europe/warehouse_small_roof.dds
DXT1    prefab/padborg/warehouse_small_roof.dds
DXT1    vehicle/trailer_eu/company/benbecker.dds
DXT1    vehicle/trailer_eu/company/bichof.dds
DXT1    vehicle/trailer_eu/company/buyl.dds
DXT1    vehicle/trailer_eu/company/currie.dds
DXT1    vehicle/trailer_eu/company/fernandez.dds
DXT1    vehicle/trailer_eu/company/fournie.dds
DXT1    vehicle/trailer_eu/company/klg.dds
DXT1    vehicle/trailer_eu/company/mathieu.dds
DXT1    vehicle/trailer_eu/company/mpnord.dds
DXT1    vehicle/trailer_eu/company/plater.dds
DXT1    vehicle/trailer_eu/company/rouillon.dds
DXT1    vehicle/trailer_eu/company/superu.dds
DXT1    vehicle/trailer_eu/company/vogel.dds
DXT1    vehicle/trailer_eu/company/whites.dds
DXT1    vehicle/trailer_eu/transporter/fh/hc-reflection.dds
DXT1    vehicle/trailer_eu/transporter/scania/hc-reflection.dds
DXT3    model/gas_station/gas_01_agip.dds
DXT3    model/gas_station/gas_01_total.dds
DXT3    model/gas_station/gas_02_esso.dds
DXT3    model/gas_station/gas_03_aral.dds
DXT3    model/gas_station/gas_03_esso.dds
DXT3    model/gas_station/gas_03_lukoil.dds
DXT3    model/gas_station/price_stand_01_lukoil.dds
DXT3    model/general/mall/shopping_center_10.dds
DXT3    model/general/mall/shopping_center_10_alfa.dds

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

25 Aug 2014 23:21

Now I've flipped the tobj file myself but the problems remain therefore the issue must lie elsewhere (DDS?)

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

26 Aug 2014 11:00

I ran the EOF textures through nvcompress (without compression). That 'fixes' them but the problem is unaffected if not worse. I'll try DXT5 instead but hopes are not high.

Suggestions are welcome :D

P. S. the font glitch seems to be rather reproducible by activating Antwerp in Job Market. Perhaps new stuff in v.1.7* is the problem.

User avatar
ScuL
Founder
Posts: 8302
Joined: 31 Jul 2013 23:51
Location: Auckland, New Zealand

26 Aug 2014 21:20

Thanks for your suggestions we will try to look into this when time allows
I am Image Dutch living in Image New Zealand and I speak Image EN Image DE Image SE Image FR
Image

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

27 Aug 2014 00:26

DXT5 did not solve anything...

I've created a new profile for testing around Antverp area and beyond. At first the font problem could not be reproduced easily. Instead I noticed black company logos in the job list of Antwerp and Rouen:
Image

Later on clicking on those two cities (but not other nearby cities!) led to the font mess instead hence I decided to investigate the map.
I noticed that only those two cities have 'flipping' company logos. Those work like this:
Image
After scrolling to the right:
Image

The 'coupled' logos might be very close or hundreds of miles apart. This makes them not always easy to find.

Anyway, I did 'my best' and scanned the whole map. Broken company locations: http://www35.zippyshare.com/v/50884127/file.html

I checked 5 locations or so and it seems they are all occupied by the new 'fancy' company prefabs.

TL; DR I think there is something wrong with the new company prefabs and/or their definitions. This probably causes problems 3-5.

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

28 Aug 2014 13:16

I'm trying to read up on all this 3D modelling stuff and it seems DDS textures should always have resolution of 2^n?

I only found 2 different instances in CSS content:
material/editor/europe_bgn.dds 7088 x 5952
material/ui/loading/corner.dds 720 x 256

in Promods:

Code: Select all

material/overlay/city_fr_pau_br.dds 257 x 64
material/ui/loading/bar_pics/pic01.dds 1440 x 512
material/ui/loading/bar_pics/pic02.dds 1440 x 512
material/ui/loading/bar_pics/pic03.dds 1440 x 512
material/ui/loading/bar_pics/pic04.dds 1440 x 512
material/ui/loading/bar_pics/pic05.dds 1440 x 512
material/ui/loading/bar_pics/pic06.dds 1440 x 512
material/ui/loading/bar_pics/pic07.dds 1440 x 512
material/ui/loading/bar_pics/pic08.dds 1440 x 512
material/ui/loading/ferry/pic01.dds 1440 x 512
material/ui/loading/ferry/pic02.dds 1440 x 512
material/ui/loading/ferry/pic03.dds 1440 x 512
material/ui/loading/ferry/pic04.dds 1440 x 512
I'd say material/overlay/city_fr_pau_br.dds is the odd one out ;)

User avatar
MandelSoft
Lead Developer
Posts: 3781
Joined: 08 Aug 2013 10:48
Location: Zoetermeer [NL]

28 Aug 2014 13:22

I think that's right; it is one pixel off being a power of two in one dimension. I think that one does need resizing...
Your daily dose of wisdom!
╔═══╗────╔═╗╔═╗────╔╗
║╔═╗║────║║╚╝║║────║║
║╚═╝╠═╦══╣╔╗╔╗╠══╦═╝╠══╗
║╔══╣╔╣╔╗║║║║║║╔╗║╔╗║══╣
║║──║║║╚╝║║║║║║╚╝║╚╝╠══║
╚╝──╚╝╚══╩╝╚╝╚╩══╩══╩══╝
Don't ask us for a release date; we don't know either.

LA-MJ
Posts: 776
Joined: 20 Dec 2013 16:07
Donation rank:

28 Aug 2014 20:25

I wish I'd seen this earlier: http://forum.scssoft.com/viewtopic.php? ... 63#p208765

Anyway, I installed blender and scs plugin (had to fix some bugs there as well:P) and opened ikea prefabs for testing. ikea_sc.pmd gave me this wierd look in texture mode:
Image

Other ikea prefabs looked normal

I assume that is the cause of the problem. That face glitches/changes when rotating the scene. Also I don't like the pink color :DD
It seems to have no texture, only material, is that intended? :?:

Anyway, I've re-exported the model and looked it up in Tours. It still displayed fine, although the problem was not fixed either. I've out of ideas now: I think you guys need to take over as it's out of my hands and way beyond my comfort zone.

/3D noob reporting



Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests