Editing locations in Blender

Exporting locations to Blender

Summary

The original exporter was based on some posts by @123321 in the Discord #mapeditor channel back in May, so all credit to him for working it out in the first place.

Theres a video which outlines this process Here.

Versions and requirements

This guide was initially written with game version 1.6 of Cyberpunk 2077.

Exporting Streaming Sectors to Blender

To export a location, you need to know its files — you can either pick them from our list or go and find them (and add them to the list, please).

  1. Open Export_Sector.wscript by double-clicking on the file name

    • You may get a pop-up: "Trying to open a system file. Should a local copy be created?" If so, click Yes.

  2. Optional: Check below if you want to get fancy.

  3. Click "Run" (it's on the top left of the script editor)

This will export all your .streamingsector files to glb/json for the later import into Blender.

Depending on your computer and the number of sectors, this script takes time. Wolvenkit will be mostly unresponsive while it's exporting.

Don't worry, it's normal.

You might see a bunch of error messages about files that couldn't be found in the Wolvenkit log. Those usually only affect materials, your mesh should still show up in Blender.

What else the script can do for you

If you add entries to the sectors block in line 14, the script will export only those sectors, rather than all the files in your project. You can use this to add files to your project, or to filter existing entries.

// You can add sectors to the list, or add them to the project 
// list of sector files (paths need double slashes) you can leave empty if in project
// can use just filenames if their in the _compiled\default folder
const sectors=[
    "interior_-48-31_2_0",
    "interior_-24-16_1_1",
]

Importing to Blender

The script will find and import all streamingsector .json files under your project's raw directory. Make sure to delete those that you don't want, or change their extension from .streamingsector.json to .bkp.

Depending on your hardware, the script can take a long time – from minutes to hours. During this time, Blender will be unresponsive. If you can't cope with that, check Step 2 in the list below.

  1. Import your streamingsector with the Cyberpunk Blender IO Suite. For full instructions, check the corresponding wiki page - the documentation below might be outdated.

    1. Open Blender

    2. Optional: Turn on the Blender console so you can watch the pot boil (unnecessary, but psychologically reassuring). It's under Window -> Toggle System Console

    3. Select File -> Import -> Cyberpunk Streaming Sector

    4. Open the .cdmodproj file in the root of your Wolvenkit project directory

    5. Optional: Check the "With Materials" box in the side panel This will make the process take four times longer!

    6. Wait (see the orange warning box below)

  2. Optional: As the meshes will be scaled and positioned according to the map coordinates, they're probably off-screen. You can center the camera by completing the following steps:

    1. One or more meshes should still be selected. If not, do that now.

    2. Move the cursor to your selection (Hotkey: SHIFT+S)

    3. Select View → Align View → Center View to Cursor

Importing back into Cyberpunk

With ArchiveXL >= 1.8.0, this process is outdated. Check the other guides in this section for how to generate .xl files to add, edit or delete objects in sectors.

I get it, show me the docs
  • Download this script (raw link) from Sim's github

  • Switch to Blender's scripting perspective and paste the code there

  • Adjust line 30 and change the path assigned to 'project' to the path of your cyberpunk project. Make sure to double the backslashes. Example: before: project = 'F:\\CPmod\\meshdecal_parralax' after: project = 'D:\\Cyberpunk_Modding\\world_editing\\myproject'

  • In your Wolvenkit project's root folder, create the folder output

  • Run the script by clicking the ▷ button If the script throws errors and you can't resolve them on your own or with the help of ChatGPT, find us on Discord!

  • Via Windows Explorer, copy the json file from the output directory in your Wolvenkit project over the file with the same name in the raw directory.

  • In Wolvenkit, right-click on the file you just copied and select "Import from json"

  • You're done!

Last updated