question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UV Mapping on Portal 1 maps is broken

See original GitHub issue

Describe the bug UVs for Portal 1 maps import in a very broken state, being way too large (100-500x too big), and misaligned between surfaces

To Reproduce Steps to reproduce the behavior:

  1. Export a Portal 1 BSP using BSPSource (testchmb_a_00.bsp) in this case, using “original/split faces” option to avoid geometry holes
  2. Import using this addon (UV mapping is wrong regardless of scale setting)
  3. See error once you apply textures to the materials in blender

Expected behavior UVs should match what is seen in-engine

Related files testchmb_a_00_d.zip

Logs

Indexing game files...
Indexing done in 0.08779215812683105 s
Indexing map files...
Started importing VMF 'G:\Steam\steamapps\common\Portal\portal\maps\decompiled\testchmb_a_00_d.vmf'
[1/12] Parsing map...
[2/12] Determining required game files...
[WARNING] MATERIAL concrete/concrete_modular_wall001e NOT FOUND
[WARNING] MATERIAL plastic/plasticwall004a NOT FOUND
[WARNING] MATERIAL signage/hazard_orange_03b NOT FOUND
[WARNING] MATERIAL concrete/concrete_modular_floor001a NOT FOUND
[WARNING] MATERIAL metal/metalgrate018 NOT FOUND
[WARNING] MATERIAL metal/metalgrate018b NOT FOUND
[WARNING] MATERIAL plastic/plasticwall001a NOT FOUND
[WARNING] MATERIAL concrete/concrete_modular_wall001a NOT FOUND
[WARNING] MATERIAL plastic/plasticwall003a NOT FOUND
[WARNING] MATERIAL metal/metalwall048c NOT FOUND
[WARNING] MATERIAL signage/signage_arrow NOT FOUND
[WARNING] MATERIAL signage/signage_exit NOT FOUND
[WARNING] MATERIAL plastic/plasticwall001b NOT FOUND
[WARNING] MATERIAL metal/metalhull013a NOT FOUND
[WARNING] MATERIAL concrete/concrete_modular_ceiling001a NOT FOUND
[WARNING] MATERIAL plastic/plastic_light002a NOT FOUND
[WARNING] MATERIAL concrete/concrete_modular_floor001c NOT FOUND
[WARNING] MATERIAL metal/metalhull003a NOT FOUND
[WARNING] MATERIAL signage/signage_border NOT FOUND
[WARNING] MATERIAL signage/clock/clock_dots NOT FOUND
[WARNING] MATERIAL metal/metalwall060a NOT FOUND
[WARNING] MATERIAL metal/metal_lift001 NOT FOUND
[WARNING] MATERIAL metal/metal_lift001_gradient NOT FOUND
[WARNING] MATERIAL metal/metalwall061f NOT FOUND
[WARNING] MATERIAL plastic/plastic_light002c NOT FOUND
[WARNING] MATERIAL metal/metalwall048b NOT FOUND
[WARNING] MATERIAL concrete/concrete_modular_wall001f NOT FOUND
[WARNING] MATERIAL concrete/concrete_modular_floor001b NOT FOUND
[WARNING] MATERIAL lights/white009 NOT FOUND
[WARNING] MATERIAL lights/white008 NOT FOUND
[WARNING] MATERIAL lights/light_recessedcool002 NOT FOUND
[WARNING] MATERIAL concrete/concrete_modular_wall001c NOT FOUND
[WARNING] MATERIAL concrete/concrete_modular_wall001d NOT FOUND
[WARNING] MATERIAL metal/metalwall_bts_006b_gradient NOT FOUND
[WARNING] MATERIAL lights/light_orange001 NOT FOUND
[WARNING] MATERIAL concrete/observationwall_001a NOT FOUND
[WARNING] MATERIAL metal/metalwall_bts_006a NOT FOUND
[WARNING] MATERIAL plastic/plasticwall002a NOT FOUND
[WARNING] MATERIAL tile/observation_tilefloor001a NOT FOUND
[WARNING] MATERIAL concrete/observationwall_001b NOT FOUND
[WARNING] MATERIAL metal/metaldoor028a NOT FOUND
[WARNING] MATERIAL glass/glasswindow_refract01 NOT FOUND
[WARNING] MATERIAL signage/signage_doorstate NOT FOUND
[WARNING] MATERIAL dev/reflectivity_40 NOT FOUND
[WARNING] MATERIAL signage/clock/clock_minutes NOT FOUND
[WARNING] MATERIAL signage/clock/clock_seconds NOT FOUND
[WARNING] MATERIAL signage/clock/clock_centiseconds NOT FOUND
[WARNING] MATERIAL signage/clock/clock_milliseconds NOT FOUND
[WARNING] MATERIAL glass/glasswindow_frosted NOT FOUND
[WARNING] MATERIAL glass/glasswindow_frosted_002 NOT FOUND
[WARNING] MATERIAL models/props_trainstation/trainstation_clock_glass001 NOT FOUND
[WARNING] MATERIAL glass/glasswindow_frosted_003 NOT FOUND
[3/12] Importing 38 models (reusing 0 existing)...
[ERROR]: MODEL models/props/bed_body_reference LOADING FAILED: models/props
[ERROR]: MODEL models/blackin LOADING FAILED: models
[ERROR]: MODEL models/props_c17/lamp_standard_off01 LOADING FAILED: models/props_c17
[ERROR]: MODEL models/props/button_top_reference LOADING FAILED: models/props
[ERROR]: MODEL models/props/door_01_lftdoor_reference LOADING FAILED: models/props
[3/12] Importing models... 13.1579 %
[ERROR]: MODEL models/props/door_01_rtdoor_reference LOADING FAILED: models/props
[ERROR]: MODEL models/props/metal_box LOADING FAILED: models/props
[ERROR]: MODEL models/props/box_dropper_cover LOADING FAILED: models/props
[ERROR]: MODEL models/props/box_dropper LOADING FAILED: models/props
[ERROR]: MODEL models/props/bed_cover_reference LOADING FAILED: models/props
[3/12] Importing models... 26.3158 %
[ERROR]: MODEL models/props/clock LOADING FAILED: models/props
[ERROR]: MODEL models/props/toilet_body_reference LOADING FAILED: models/props
[ERROR]: MODEL models/props/radio_reference LOADING FAILED: models/props
[ERROR]: MODEL models/props_junk/garbage_coffeemug001a_forevergibs LOADING FAILED: models/props_junk
[ERROR]: MODEL models/props/table_reference LOADING FAILED: models/props
[3/12] Importing models... 39.4737 %
[ERROR]: MODEL models/props/round_elevator_body LOADING FAILED: models/props
[ERROR]: MODEL models/props/round_elevator_doors LOADING FAILED: models/props
[ERROR]: MODEL models/props_animsigns/signage_num00 LOADING FAILED: models/props_animsigns
[ERROR]: MODEL models/props_animsigns/signage_num01 LOADING FAILED: models/props_animsigns
[ERROR]: MODEL models/props/lab_chair/lab_chair LOADING FAILED: models/props/lab_chair
[3/12] Importing models... 52.6316 %
[ERROR]: MODEL models/props_bts/bts_clipboard LOADING FAILED: models/props_bts
[ERROR]: MODEL models/props/toilet_lid_reference LOADING FAILED: models/props
[ERROR]: MODEL models/props/button_base_reference LOADING FAILED: models/props
[ERROR]: MODEL models/props/door_01_frame_wide_reference LOADING FAILED: models/props
[ERROR]: MODEL models/props/portal_cleanser_1 LOADING FAILED: models/props
[3/12] Importing models... 65.7895 %
[ERROR]: MODEL models/props/elevatorshaft_wall/elevatorshaft_wall LOADING FAILED: models/props/elevatorshaft_wall
[ERROR]: MODEL models/props_lab/walllight001a LOADING FAILED: models/props_lab
[ERROR]: MODEL models/props_bts/bts_stool_static LOADING FAILED: models/props_bts
[ERROR]: MODEL models/props/lab_desk03/lab_desk03 LOADING FAILED: models/props/lab_desk03
[ERROR]: MODEL models/props/lab_desk04/lab_desk04 LOADING FAILED: models/props/lab_desk04
[3/12] Importing models... 78.9474 %
[ERROR]: MODEL models/props/lab_desk05/lab_desk05 LOADING FAILED: models/props/lab_desk05
[ERROR]: MODEL models/props/lab_desk01/lab_desk01 LOADING FAILED: models/props/lab_desk01
[ERROR]: MODEL models/props_wasteland/tram_leverbase01 LOADING FAILED: models/props_wasteland
[ERROR]: MODEL models/props/elevator_caps/elevator_caps LOADING FAILED: models/props/elevator_caps
[ERROR]: MODEL models/props/autoportal_frame/autoportal_frame LOADING FAILED: models/props/autoportal_frame
[3/12] Importing models... 92.1053 %
[ERROR]: MODEL models/props/sign_frame01/sign_frame01 LOADING FAILED: models/props/sign_frame01
[ERROR]: MODEL models/props/sign_frame02/sign_frame02 LOADING FAILED: models/props/sign_frame02
[ERROR]: MODEL models/props/lab_monitor_pose01/lab_monitor_pose01 LOADING FAILED: models/props/lab_monitor_pose01
[3/12] Importing models... 100.0000 %
[4/12] Importing 0 textures (reusing 0 existing) and 0 materials (reusing 0 existing, 52 cannot be imported)...
[5/12] Importing materials... 100.0000 %
[6/12] Building geometry...
[6/12] Building geometry... 10.9409 %
[6/12] Building geometry... 21.8818 %
[6/12] Building geometry... 32.8228 %
[6/12] Building geometry... 43.7637 %
[6/12] Building geometry... 54.7046 %
[6/12] Building geometry... 65.6455 %
[6/12] Building geometry... 76.5864 %
[6/12] Building geometry... 87.5274 %
[6/12] Building geometry... 91.9037 %
[WARNING] MATERIAL tools/toolstrigger NOT FOUND
[6/12] Building geometry... 96.2801 %
[6/12] Building geometry... 100.0000 %
[7/12] Building overlays...
[8/12] Placing props...
[ERROR] LOADING PROP FAILED: model models/props/bed_body_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/blackin hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_c17/lamp_standard_off01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/button_top_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/button_top_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_lftdoor_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_rtdoor_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_lftdoor_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_rtdoor_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_rtdoor_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_lftdoor_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/metal_box hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/box_dropper_cover hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/box_dropper hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/bed_cover_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/clock hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/toilet_body_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/radio_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_junk/garbage_coffeemug001a_forevergibs hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/table_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/round_elevator_body hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/round_elevator_doors hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/round_elevator_body hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/round_elevator_doors hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_animsigns/signage_num00 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_animsigns/signage_num01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_chair/lab_chair hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_chair/lab_chair hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_chair/lab_chair hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_chair/lab_chair hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_chair/lab_chair hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_chair/lab_chair hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_chair/lab_chair hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_chair/lab_chair hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/clock hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_bts/bts_clipboard hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/toilet_lid_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/button_base_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/button_base_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_frame_wide_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_frame_wide_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/door_01_frame_wide_reference hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/portal_cleanser_1 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/elevatorshaft_wall/elevatorshaft_wall hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/elevatorshaft_wall/elevatorshaft_wall hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/elevatorshaft_wall/elevatorshaft_wall hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/elevatorshaft_wall/elevatorshaft_wall hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/portal_cleanser_1 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/portal_cleanser_1 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/portal_cleanser_1 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_lab/walllight001a hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_lab/walllight001a hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_lab/walllight001a hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_bts/bts_stool_static hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_desk03/lab_desk03 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_desk04/lab_desk04 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_desk05/lab_desk05 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_desk01/lab_desk01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props_wasteland/tram_leverbase01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/elevator_caps/elevator_caps hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/autoportal_frame/autoportal_frame hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/sign_frame01/sign_frame01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/elevator_caps/elevator_caps hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/elevator_caps/elevator_caps hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/elevator_caps/elevator_caps hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/autoportal_frame/autoportal_frame hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/autoportal_frame/autoportal_frame hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/autoportal_frame/autoportal_frame hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/autoportal_frame/autoportal_frame hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/autoportal_frame/autoportal_frame hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/sign_frame01/sign_frame01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/sign_frame02/sign_frame02 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_monitor_pose01/lab_monitor_pose01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_monitor_pose01/lab_monitor_pose01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_monitor_pose01/lab_monitor_pose01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_monitor_pose01/lab_monitor_pose01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/sign_frame02/sign_frame02 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_monitor_pose01/lab_monitor_pose01 hasn't been imported
[ERROR] LOADING PROP FAILED: model models/props/lab_monitor_pose01/lab_monitor_pose01 hasn't been imported
[8/12] Placing props... 100.0000 %
[9/12] Optimizing props...
[10/12] Placing lights...
[10/12] Placing lights... 100.0000 %
[11/12] Importing skybox...
[ERROR] FAILED LOADING SKYBOX: materials/skybox/sky_wasteland02lf.vmt
[12/12] Skipped sky origin
Done in 2.4438 s
Imported 2285 solids (0 failed)
Imported 0 overlays (0 failed)
Imported 0 props (90 failed)
Imported 18 lights (0 failed)

Screenshots Example of issue (textures are applied here, but UV scaling is so large it can barely be seen) image

UVs for one face (you cant even see the small “normal” UV space at the origin in the image): image

UVs scaled down by 0.005: image

Example of misaligned UVs: image image

Details:

  • OS: Windows
  • Blender Version: 3.3
  • Addon Version: 0.6.9
  • Did you download a release or build the addon yourself: Downloaded release
  • Related Game: Portal 1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Pepper-Mancommented, Oct 2, 2022

Haha was just about to write, I figured that it is that option thats breaking things. I was using it because that option + the old version of your addon caused a lot of issues with the imported geometry (I need the geo to follow sealed world rules as closely as possible). However this version seems to work perfectly with “brushes and planes”, so problem solved! Thanks for the assistance 😃 image image

0reactions
lasa01commented, Oct 2, 2022

Tried this myself and seems like using “original/split faces” option causes issues. I’m not having any issues with the default “brushes and planes” option. Could be that the other options create vmfs that don’t work with my current import algorithm. I could look into if it would be possible to support the other options too sometime, but this would be a very low priority issue since I haven’t heard of anyone else having any issues with using the default options of bspsource.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems with nether portals and treasure maps (Is my world ...
So I'm having some inusual problems in my survival game... 1) Treasure maps: At the begining the treasure maps were working properly but...
Read more >
Pepper-Man (Jake Boraman) · GitHub
UV Mapping on Portal 1 maps is broken. Describe the bug UVs for Portal 1 maps import in a very broken state, being...
Read more >
One single portal 2 prop has a broken texture everything else ...
One single portal 2 prop has a broken texture everything else is fine. media poster ... Does anyone know the map in these...
Read more >
Creating a Normal Map Texture (Portal Block) - YouTube
Try Leshiy's Portal Mod here!http://steamcommunity.com/sharedfiles/filedetails/?id=1289276857More quick tutorials are on the way!
Read more >
Leak - Valve Developer Community
VBSP will always report any leaks it finds, but spending hours of full compile time and game execution just to find out that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found