Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Cyberpunk 2077 Noesis script

Post questions about game models here, or help out others!
pox911
beginner
Posts: 22
Joined: Thu Mar 08, 2018 4:55 am
Been thanked: 6 times

Re: Cyberpunk 2077 Noesis script

Post by pox911 »

At least for the iguana, it seems that the weight to bone index is off by one? All the bones i select show a weight of the next one in line.

Image
Loomy
advanced
Posts: 41
Joined: Sat Sep 12, 2015 2:16 am
Location: South Africa
Has thanked: 20 times
Been thanked: 6 times

Re: Cyberpunk 2077 Noesis script

Post by Loomy »

Big thanks for all your amazing work to bring us this script,

Noticed that quite a few of the meshes once extracted with cp77tools have their textures sharing same name, not all though, but added few lines to script to load up texture for these cases.. (wont work for all)

Code: Select all

def LoadModel(data, mdlList):
	
	matList = []
	texList = []
	
	###just above commitTriangles in vertLoop
	fName = os.path.basename(rapi.getInputName())
	meshName = fName.split(".")[0]
	texPath = dir +"\\textures\\"+meshName+"_d01.dds"

	material = NoeMaterial("submesh"+str(i), "")
	rapi.rpgSetMaterial("submesh"+str(i))
	material.setTexture(texPath)
	matList.append(material)
	###rapi.rpgCommitTriangles***

mdl.setModelMaterials(NoeModelMaterials(texList, matList))
###mdlList.append(mdl)***
Not sure how to load normal maps in noe, but it will usually follow same naming convention and end with *_n01".*

Image
MaloneXI
ultra-n00b
Posts: 1
Joined: Thu Jan 07, 2021 1:48 pm

Re: Cyberpunk 2077 Noesis script

Post by MaloneXI »

Hi all ,

Does anyone know in what archive I could find the map of night city ? Not the game map , just the map , in map menu, the one that show the objectives etc.

Thanx a lot.
Loomy
advanced
Posts: 41
Joined: Sat Sep 12, 2015 2:16 am
Location: South Africa
Has thanked: 20 times
Been thanked: 6 times

Re: Cyberpunk 2077 Noesis script

Post by Loomy »

Ive have modified the script to recursively parse all material instances (.mi) & textures info from main .mesh & .buffer, & referenced external files (*.mi, *.mt, *.ml*, etc)

End up with a list of all linked texture files, and material info. Not sure how to link specific material to which meshpart, but so far it would seem that the first few material instances found in mesh.0.buffer would correspond to the same mesh part(s) index-wise.

Would really appreciate any help to clean it up and try and link up these textures & setup materials for noesis to be able to load & export as much of it as possible. Still a WIP, needs alot of polishing. Note: change the cp77_path variable at top of file to the folder where you have extracted game data.

Some of the info it dumps from Kojimas Head Mesh as example:

Textures List:

Code: Select all

[
  "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_d01.xbm",
  "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_n01.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_tyger_d04.xbm",
  "base\\characters\\common\\skin\\face\\h0_000_ma_c__base_nd.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_rm01.xbm",
  "base\\characters\\common\\skin\\face\\h0_000_base__tintcolormask.xbm",
  "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_stretch_n.xbm",
  "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_squash_n.xbm",
  "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_blood_mask_u.xbm",
  "base\\characters\\main_npc\\kojima\\h0_001_ma_a__kojima\\textures\\h0_001_ma_a__kojima_d01.xbm",
  "base\\characters\\main_npc\\kojima\\h0_001_ma_a__kojima\\textures\\h0_001_ma_a__kojima_n01.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_valentino_d04.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_d04.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_n01.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_d01.xbm",
  "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_b__basehead_d03.xbm",
  "base\\characters\\head\\mba\\h0_000_mba_c__basehead\\textures\\h0_000_mba_c__basehead_d01.xbm",
  "base\\characters\\common\\character_customisation_items\\tattoos\\face\\textures\\head_tattoo__tygerclaw_01_d01.xbm",
  "base\\characters\\common\\character_customisation_items\\tattoos\\face\\textures\\head_tattoo__tygerclaw_01_e01.xbm",
  "base\\characters\\common\\character_customisation_items\\tattoos\\face\\textures\\head_tattoo__valentino_01_d01.xbm",
  "engine\\textures\\small_white.xbm"
]

Code: Select all

{
    "CMaterialInstance": {
          "Normal": "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_n01.xbm",
          "baseMaterial": "base\\characters\\common\\skin\\character_mat_instance\\male\\head\\male_head_02_ca_limestone.mi",
          "Albedo": "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_d01.xbm",
      },
      "CMaterialInstance": {
          "CavityIntensity": 0.25,
          "DetailRoughnessBiasMin": 1,
          "MicroDetailInfluence": 1,
          "MicroDetailUVScale02": 8,
          "Normal": "base\\characters\\head\\ma\\h0_732_ma_c__middle\\textures\\h0_732_ma_c__middle_n01.xbm",
          "BloodColor": {
            "Blue": 0,
            "Alpha": 0,
            "Green": 0,
            "Red": 0
          },
          "DetailRoughnessBiasMax": 0.8500000238418579,
          "TintColorMask": "base\\characters\\common\\skin\\face\\h0_000_base__tintcolormask.xbm",
          "Detailmap_Squash": "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_squash_n.xbm",
          "Roughness": "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_rm01.xbm",
          "Detailmap_Stretch": "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_stretch_n.xbm",
          "TintColor": {
            "Blue": 83,
            "Alpha": 255,
            "Green": 149,
            "Red": 131
          },
          "DetailNormalInfluence": 1,
          "MicroDetailUVScale01": 20,
          "DetailNormal": "base\\characters\\common\\skin\\face\\h0_000_ma_c__base_nd.xbm",
          "TintScale": 0.379,
          "baseMaterial": "base\\characters\\common\\skin\\character_mat_instance\\male\\head\\male_head_npc_06_limestone_tyger.mi",
          "Albedo": "base\\characters\\head\\ma\\h0_001_ma_c__basehead\\textures\\h0_001_ma_c__basehead_tyger_d04.xbm",
          "Bloodflow": "base\\characters\\common\\skin\\face\\h0_001_ma__wrnkl_blood_mask_u.xbm",
          "SkinProfile": "skip"
        }
      }
    
}
Last edited by Loomy on Mon Jan 11, 2021 11:36 pm, edited 1 time in total.
Loomy
advanced
Posts: 41
Joined: Sat Sep 12, 2015 2:16 am
Location: South Africa
Has thanked: 20 times
Been thanked: 6 times

Re: Cyberpunk 2077 Noesis script

Post by Loomy »

Here is WIP script as mentioned above, check class CR2WFile, info is output to cr2w_list, cr2w_textures, cr2w_external_data variables. Make sure to edit your cp77_path to your own extracted archives location

https://pastebin.com/kGUQL1gG
Last edited by Loomy on Tue Jan 12, 2021 12:08 am, edited 2 times in total.
Loomy
advanced
Posts: 41
Joined: Sat Sep 12, 2015 2:16 am
Location: South Africa
Has thanked: 20 times
Been thanked: 6 times

Re: Cyberpunk 2077 Noesis script

Post by Loomy »

MaloneXI wrote: Thu Jan 07, 2021 4:20 pm Hi all ,

Does anyone know in what archive I could find the map of night city ? Not the game map , just the map , in map menu, the one that show the objectives etc.

Thanx a lot.
I believe this is it:- base\entities\cameras\3dmap\3dmap_* (found in gamedata archive)
Thumpist
ultra-n00b
Posts: 1
Joined: Wed Jan 13, 2021 8:51 am

Re: Cyberpunk 2077 Noesis script

Post by Thumpist »

Hi Everyone,

I am very new to this, I basically love the vehicles in CP2077 and I have already printed a Quadra from a file I found on thingiverse but I was hoping to do some more of the CP cars. I have extracted the archive and I can view the meshs via Noesis but every mesh I open is just really low on the poly count and barely has the vehicle shape. I am sure there is something I am missing or I am over estimating what the program can do? Is what I am trying to do possible?
Piranjak
ultra-n00b
Posts: 3
Joined: Thu Jan 14, 2021 9:56 pm
Has thanked: 2 times

Re: Cyberpunk 2077 Noesis script

Post by Piranjak »

Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
micro777
beginner
Posts: 30
Joined: Sun Sep 30, 2018 10:57 pm
Location: Russia
Has thanked: 51 times
Been thanked: 15 times

Re: Cyberpunk 2077 Noesis script

Post by micro777 »

Piranjak wrote: Fri Jan 15, 2021 2:43 am Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
Попытаться изменить значение nameToIndex,0 в строке 328 скрипта на nameToIndex,1.
Try changing the nameToIndex,0 value in script line 328 to nameToIndex,1.
indOffFlag = buildFlagFromNames(["teOffset","Uint32"],nameToIndex,1)
Image
Piranjak
ultra-n00b
Posts: 3
Joined: Thu Jan 14, 2021 9:56 pm
Has thanked: 2 times

Re: Cyberpunk 2077 Noesis script

Post by Piranjak »

micro777 wrote: Fri Jan 15, 2021 9:19 am
Piranjak wrote: Fri Jan 15, 2021 2:43 am Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
Попытаться изменить значение nameToIndex,0 в строке 328 скрипта на nameToIndex,1.
Try changing the nameToIndex,0 value in script line 328 to nameToIndex,1.
indOffFlag = buildFlagFromNames(["teOffset","Uint32"],nameToIndex,1)
Image
Sadly still having the same issue, but thank you for taking the time.
nekoboinick
ultra-n00b
Posts: 1
Joined: Sat Jan 16, 2021 12:46 am

Re: Cyberpunk 2077 Noesis script

Post by nekoboinick »

micro777 wrote: Fri Jan 15, 2021 9:19 am
Piranjak wrote: Fri Jan 15, 2021 2:43 am Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
Попытаться изменить значение nameToIndex,0 в строке 328 скрипта на nameToIndex,1.
Try changing the nameToIndex,0 value in script line 328 to nameToIndex,1.
indOffFlag = buildFlagFromNames(["teOffset","Uint32"],nameToIndex,1)
Image
I am having the same issue, and your fix is sadly not working. I tried creating the file, just in case if it wasn't able to initially create the file, but it doesn't seem to work.
lndrx
ultra-n00b
Posts: 4
Joined: Sat Jan 16, 2021 2:39 am
Been thanked: 1 time

Re: Cyberpunk 2077 Noesis script

Post by lndrx »

nekoboinick wrote: Sat Jan 16, 2021 2:13 am
micro777 wrote: Fri Jan 15, 2021 9:19 am
Piranjak wrote: Fri Jan 15, 2021 2:43 am Hi all, I'm having a problem which I assume is probably caused by something small and obvious, but I know basically nothing about this. I mean, really.
I got the mesh files I want with CP77Tools and put the python script in Noesis so it's all set, but when I try to open the mesh files it tells me they cannot be previewed. If I try to extract them I get the error "couldn't find a suitable buffer file". Any advice?
Попытаться изменить значение nameToIndex,0 в строке 328 скрипта на nameToIndex,1.
Try changing the nameToIndex,0 value in script line 328 to nameToIndex,1.
indOffFlag = buildFlagFromNames(["teOffset","Uint32"],nameToIndex,1)
Image
I am having the same issue, and your fix is sadly not working. I tried creating the file, just in case if it wasn't able to initially create the file, but it doesn't seem to work.
Same here. Noesis asks for the .rig file, but even selecting what appears to be the correct file, nothing happens. Says that the rig file is invalid and keeps asking for it. If you cancel the selection, nothing is exported nor previewed.
lndrx
ultra-n00b
Posts: 4
Joined: Sat Jan 16, 2021 2:39 am
Been thanked: 1 time

Re: Cyberpunk 2077 Noesis script

Post by lndrx »

Extracted the archive again using CP77Tools version 0.2.0.1. Now this works! Thank you!
Piranjak
ultra-n00b
Posts: 3
Joined: Thu Jan 14, 2021 9:56 pm
Has thanked: 2 times

Re: Cyberpunk 2077 Noesis script

Post by Piranjak »

lndrx wrote: Sat Jan 16, 2021 4:44 am Extracted the archive again using CP77Tools version 0.2.0.1. Now this works! Thank you!
Using version 0.2.0.1 fixed it for me too! Thank you! <3
lndrx
ultra-n00b
Posts: 4
Joined: Sat Jan 16, 2021 2:39 am
Been thanked: 1 time

Re: Cyberpunk 2077 Noesis script

Post by lndrx »

Ok, I'm not a great programmer, but I kinda sorted what is "wrong". The new version of CP77Tools (v1.0 at this time) doesn't have any buffer files. It cleans everything leaving only the mesh file. Joschka's script 1.2.1 needs these buffer files to work. I'm trying to update the python code to point the original file "as also the buffer file".
Post Reply