Coder Social home page Coder Social logo

cyberpunk-blender-add-on's Introduction



GitHub Release Date GitHub Workflow Status GitHub milestone GitHub all releases GitHub issues GitHub commit activity

⚠️ This repository focuses on REDengine 4 for Cyberpunk 2077. For WolvenKit for The Witcher 3: Wild Hunt please see: https://github.com/WolvenKit/WolvenKit-7

WolvenKit is an open-source modding tool for Cyberpunk 2077. Our vision is to develop a standalone software which is capable of reading and writing all REDengine file formats. Additionally the WolvenKit application is designed to simplify and accelerate modding workflows. This repository was created to demonstrate how CDPR's proprietary REDengine reads and writes file formats.

This toolkit is being made solely for research and educational purposes, and the dev team is in no way responsible for any malfunctions that occur from its use. It's completely open source, licensed under the GPL-3.0, and in no way is it made to generate revenue.


Installation

Wolvenkit requires the latest .NET 8.0 runtime:

  1. Go to Microsoft's .NET download page
  2. Find the ".NET Desktop Runtime 8.0.x" section and download the installer for your architecture (x64)
  3. Run the downloaded installer

There are multiple ways to install Wolvenkit:

The WolvenKit.Installer app

The WolvenKit.Installer app is a simple program for managing (installing, updating, removing) different WolvenKit versions similar to the Visual Studio Installer app.

It is hosted on github and you can install it from there. Click here: GitHub release (latest by date)

Portable or Installer

Download either the latest stable version or the current nightly (beta) version from here:

Package Latest Release Checks
WolvenKit Nightly GitHub release (latest by date) GitHub Workflow Status
WolvenKit GitHub release (latest by date) GitHub Workflow Status

To install the app quickly download WolvenKitSetup-x.x.x.exe and double click to run the installer.

You can also simply download WolvenKit-x.x.x.x.zip and extract it to a location of your choice

Usage

📑 Check out the wiki: https://wiki.redmodding.org/wolvenkit

Build instructions

If you want to build the app from source yourself:

  1. Download and install Visual Studio 2022 Community Edition or a higher version.
  2. Clone this repository.
  3. Open the solution (All.sln)
  4. Build the projects.

Contributing

Do you want to contribute? Community feedback and contributions are highly appreciated! It's a good idea to create an issue when implementing a feature so people don't work on the same feature/issue in an asynchronous manner.

For general rules and guidelines see CONTRIBUTING.md.

For any questions:

Developer Role Email
Seberoth Project Lead / Core Development
Rfuzzo Project Lead / Core Development Email
Traderain Project Lead Email

Screenshots

WK 8 6 Home Page Example

WK 8 6 Editor Example

Credits

WolvenKit is a direct result of the hard work and continuous support, financial and otherwise, of the many researchers, programmers, artists, contributors, and companies that have helped with this project. Without their outstanding work and generous support, we never would have been able to create WolvenKit for Cyberpunk 2077. A very special thank you goes out to...

JetBrains Logo (Main) logo.

An ancestor to this tool was W3Edit, initially developed by Sarcen in 2015, around the time The Witcher 3 first came out. After Sarcen stopped working on it, a few of us picked it up and continued from there.

License

Copyright Disclaimer: Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favor of fair use.. This project is solely made for research and in no way made to generate any revenue.

cyberpunk-blender-add-on's People

Contributors

ametis81 avatar doctorpresto avatar dragonzkiller avatar engres01 avatar glitchered avatar holopointz avatar ja-to avatar kainotoa avatar kwekmaster avatar manavortex avatar philipl avatar rfuzzo avatar rudolph2109 avatar shotlastc avatar simarilius-uk avatar surasia avatar viele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cyberpunk-blender-add-on's Issues

Export changes back to mlsetup

Implement the ability to export some material changes back to the mlsetup. Initially should be walled behind experimental features toggle in plugin preferences. Should include an option in the glb exporter to do it while exporting the mesh and in the mesh tools panel.

MultiLayer Export Improvements

The basic functionality is already in the plugin but it needs polish, things identified so far:

  • Be able to change the mltemplate of the layers, preferably from a dropdown with the other ones in use prepopulated
  • repath the mt if modified?
  • Be able to save the mlmask layers with the mlsetup
  • Check the colors, things seem to be shifting slightly in round trip (purple straps on panams trousers for instance)

Implement RBF solver functions

should be added to bartmoss_functions.py

  • will allow much easier creation of animations
  • easier rigging
  • setup of drivers for face rig blend shapes
  • is needed for full implementation of animgraph editing as there are RBF functions in the animNodes

Collision Mesh Actors

Seb is enabling the meshes to be exported from the collision cache thing to json, need to implement import and add to the sectors import.
Have some initial code to bring in and convert to a mesh.

Streaming sector export

Generate streamingblock, streaming sector and .xl files for changes, additions and deletions to sectors.

  • allow custom naming of sectors
  • all changes to vanilla sectors handled by deleting the node with ArchiveXL and adding the item to a new sector
  • add to the export menu

Feature Request: warn about extra shapekeys

I had a user who followed the Netrunner refitting tutorial, and at some point, they "used sculpt" to smooth out their mesh edits. The tutorial they followed ended them up with this:

image
Naturally, this didn't import, and equally naturally, they had no idea what had even gone wrong.

It would be great if the plugin could check for the existence of any shapekeys that are not Basis and GarmentSupport, and either offer to apply them before export (if possible without fucking up something else), or link to this wiki page.

Sector import: numMeshChildren/numArmatureChildren

It would be great if collections could be given two additional properties on import:

numMeshChildren

How many meshes are in this collection? That way, we could set up a threshold in the export deletion script, e.g. "treat everything with one deleted submesh as a deletion"

numArmatureChildren

How many armature children are in this collection? That way, we could have a flag for the export to ignore armature deletions.

"Transfer Weights" fails if meshes in source armature are hidden

Blender 3.6.2 with 1.5.1 stable

Maybe you fixed this already, in this case, feel free to close it.

Traceback (most recent call last):
  File "C:\Users\manav\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\i_scene_cp77_gltf\__init__.py", line 752, in execute
    result = trans_weights(self, context)
  File "C:\Users\manav\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\i_scene_cp77_gltf\main\meshtools.py", line 102, in trans_weights
    bpy.ops.object.mode_set(mode='OBJECT')
  File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object
Error: Python: Traceback (most recent call last):
  File "C:\Users\manav\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\i_scene_cp77_gltf\__init__.py", line 752, in execute
    result = trans_weights(self, context)
  File "C:\Users\manav\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\i_scene_cp77_gltf\main\meshtools.py", line 102, in trans_weights
    bpy.ops.object.mode_set(mode='OBJECT')
  File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object

Implement a mesh tools panel for improved modding workflow

Add a panel which speeds up access to/ automates frequently used mesh tools.

-weight transfers
-mass export meshes imported ent import back to their individual glbs
-auto refit based on AllKnowingLions lattice approach
-parent all selected meshes to a specified armature
-rename all meshes to match Cyberpunk naming convention

Documentation Issue: Missing Entity Import wscript & linking to discord

This following section in the documentation mentions a wscript to automate the streaming sector mesh export, but it just points the user to go to a discord channel to find it.

There are several issues regarding this:

  1. A user that is not already knee deep in trying to figure out WolvenKit won't know WHICH discord
  2. There's no such #wolvenkit-scripts channel in the Cyberpunk 2077 Modding Community Discord that can be found through WolvenKit sites, neither it is in the archived channels
  3. Nothing in pinned in related discord channels or the Blender channel
  4. Searching in the discord doesn't yield any results

Please don't gate downloads behind a discord server, it's heavily susceptible to content drift, cannot be contributed to, and can't even be archived.

.xl node removal import with streaming sector import

Hide or don't import nodes which have been removed by .xl.

-ability to import .xl files separately from sectors and have them take effect?

-automatically import .xl files in the resources folder of the Wolvenkit project

Not sure if we should import the nodes, mark them as deleted and hide them or just not import them?

The problem of importing to Blender 3.6

Good afternoon. When I stream import through the plugin, the interior is not going to be assembled, all the meshes are collected at a central point in one pile, the plugin and the Top of the latest version. Blender 3,6!
Снимок экрана 2023-11-26 221244

Feature request: Create garment support from mesh

Current process of creating garment support:

  1. prepare mesh to create garment support from (e.g. body, merge and shrink)
  2. for each individual mesh,
  • create shrinkwrap modifier
  • target mesh from step 1
  • apply as shapekey
  • rename shapekey to GarmentSupport

I'm sure this can be automated? We'd just need a target picker.

Below are the settings I've had the best results with, we could use these as defaults

image

In a second iteration, the plugin could offer base bodies and arms via drop-down, but that would require more resources. Please do not implement this in the first iteration, Presto <3 :D

Refactor collision draw functions

Currently we have multiple separate functions drawing the same collision shapes.This means we currently have quite a bit of variation in how this is being done, what custom properties are being set etc... These should all eventually be combined into one function per shape that can be easily called from anywhere. Something like:
draw_boxcol(half_extents, physmat, type)
draw_convcol(vertices, physmat, type)
draw_capcol(radius, height, physmat, type)
draw_spherecol(radius, height, physmat, type)

If we keep the actual placement of the shapes in the world where it is and just do the basic drawing and applying of properties in these functions, it should be pretty simple to both standardize them, and account for the differences between import/generation and ents vs sectors vs .phys vs meshes

Implement more quest related nodes into sectors

Asked what other than the splines would be helpful for quest modding, got this response:
if you want to make something like a shop, you'll need an interior area nodes, community, population spawner nodes
if you're working on a quest, you'll need trigger areas, guard areas, and also communities and population spawners

believe they should be fairly simple to do, just boxes/points that could be done via empties.
Should consider how we export the info if modded/added for them

Someone else is welcome to pick this up, will do it myself at some point if no one does.

Feature Request: Transform

Right now, transformations (deltas) will be ignored. In the original plugin, there is an "apply transformations" checkbox, but the Cyberpunk plugin doesn't offer that option.

Instead of simply offering the option without explanation, it would be great to make that a little more idiotuser friendly: I had to learn the hard way that you need to "Apply All Transforms" by hand and it cost me several hours where I didn't understand why my prop wasn't scaling because IT LOOKED OKAY IN BLENDER!!!

Potential options:

Checkbox in the settings

Setting either of these could disable the check/prompt in the next section

  • Always include transforms
  • Always ignore transforms
    ... and will be mutually exclusive

Prompt

"You have transformations that you haven't applied yet. Do you want to include them in your export?"

  • Yes: Will set "include transforms" flag of export
  • No: Will export as-it-is

Fully skinned character .ent imports

Option to either import the matching rig+deforms from the plugin resources folder or to merge rigs exported with the meshes from wolvenkit during .ENT import to allow animation of fully skinned models in order to test refits/improve animation workflow

Normal map issues

Idk if this is just something on my end or if I'm even posting on the right github page, but I've found that recently normal maps (for layers as far as I'm aware atm) don't have their green channels inverted. It seems to be most noticeable on anything that uses leather materials. Say loudspeakers or the inside of a car (I'm currently using the villefort cortes). I don't paticuarly wanna go through hundreds of layers just to invert green channels properly.
Not sure if its just my end/doing or if its incorrect for other people too.

Tools for animators

Add a panel with various features and tools to assist in animation/rigging workflows

-create a cyberpunk anims panel - done

  • animset tab allowing more convenient access to all actions/nla strips in the .blend
    -asset shelf including full character fk/ik rigs
    -export rig changes to .json

Wrong entity appearance

Some entities have wrong appearance after importing them in Blender via entity import or sector import

How to reproduce:

  1. Import common_lift.ent.json with appearance neomilitary_a_hotel_1_door

In game:
image1

In Blender:
image2

2, Import activated_distraction_air_conditioner.ent.json with appearance air_conditioner_roof

In game:
image3

In Blender:
image4

Ability to have groups of meshes in entities when importing a sector

When importing a sector in Blender, we got ent_group_bla_bla_bla name with a bunch of meshes inside that group.

Is it possible to save groups of meshes like when we are importing a separate ent.json file?

Currently we have:

interior_a_b_c_d.streamingsector
|-ent_group_bla_bla_bla
|-submesh_00_LOD_1.000
|-submesh_00_LOD_1.001
|-submesh_00_LOD_1.002
|-submesh_01_LOD_1.000 ...

Here it's what it should be:

interior_a_b_c_d.streamingsector
|-ent_group_bla_bla_bla
|-ent_subgroup1_bla_bla_bla
|-submesh_00_LOD_1.000
|-submesh_01_LOD_1.000
|-ent_subgroup2_bla_bla_bla
|-submesh_00_LOD_1.001
|-submesh_01_LOD_1.001 ...

glb import issue

I'm having a problem when importing a mesh, I get an error message that says:

Python: Traceback (most recent call last):
File "C:\Users<BlenderLoc>\Blender Foundation\Blender\3.6\scripts\addons\i_scene_cp77_gltf_init_.py", line 358, in execute
bpymat = Builder.create(index)
File "C:\Users<BlenderLoc>\Blender Foundation\Blender\3.6\scripts\addons\i_scene_cp77_gltf\main\setup.py", line 48, in create
multilayered.create(rawMat["Data"],bpyMat)
File "C:\Users<BlenderLoc>\Blender Foundation\Blender\3.6\scripts\addons\i_scene_cp77_gltf\material_types\multilayered.py", line 334, in create
MBI = imageFromPath(self.BasePath+Microblend,self.image_format,True)
TypeError: can only concatenate str (not "dict") to str

The mesh itself imports correctly, but it's not applying any materials or textures. I've tried this with different meshes, and it works fine for things like transparent stickers and character skins. However, it's not working as expected for cyberwear and other objects.

I tried it with multiple blender and Wolvenkit versions but none seemed to solve the problem (B3.6.2 | B3.6 | WK10 | WK11).
I have also left every setting on default in both Wolvenkit and Blender.

I'm not sure if I'm doing something wrong during the import process or if there's a software issue. I've followed all the instructions in the presentation, and I haven't seen anyone else with this problem.

Sector import: Consider ep1/ part of sector name for export script

Some sector names are not unique (because why would they be?) Instead, they're unique by file path, for example those bad beans:
image

If the sector import plugin could keep the ep1/ part of the path in front of the sector file name, then the export script would Just Work:tm: :)

Add some nodes to sector_import.py

There are some nodes which are not included in sector_import.py:

'worldBakedDestructionNode' - imports some destructible props like 'worldPhysicalDestructionNode'

'worldFoliageNode' - I think it's optional, but it imports some foliage (except the whole instance with various types and amount)

worldBendedMesh Node and worldCableNode

Implement the bendy roads and bendy cables into the sector import

Have a proof of concept bit of code for the cable one working, just need to merge it into the plugin.

QA bot integration

Integrate QA bot to allow scanning for(and automatically fixing?) Errors in a scene

Feature suggestion: "Import Noesis FBX"

The plugin could have a custom option for Noesis FBX files that will rotate the armature and rename the submeshes so that it's glb-ready..

Here's the code snippet from my dirty repo that pretty much has all the logic (although for export):

    rotation = armature.rotation_quaternion
    if (isNoesisExport):
        armature.rotation_quaternion.w = 0.0
        armature.rotation_quaternion.z = -1.0
    else:
        armature.rotation_quaternion.w = 1.0
        armature.rotation_quaternion.z = 0.0   

    # rename submeshes
    try:         
        meshNumberMatch = re.search('[0-9]+', mesh.name).group()
        print(meshNumberMatch)
        if (isNoesisExport):
            mesh.name = "submesh{}".format(re.sub('^0', '', str(meshNumberMatch)))
        else:
            mesh.name = "submesh_{}_LOD_1".format(meshNumberMatch.zfill(2)) # prefix with leading zero
    except:
        print("couldn't find a numeric index for {}".format(mesh.name))

Import/export collisions

Already implemented:

  • .phys collision import
  • .phys collision export
    • edit existing .phys only
    • same number of colliders
    • same number of vertices for convex colliders
  • import entColliderComponent
  • import entSimpleColliderComponent

-edit and recalculate rigidbody parameters

  • physmat
  • mass
  • volume
  • moment of inertia

To do:

  • Import/export for query filtering data, selectable query presets via dropdown
  • fix .phys import
  • custom .phys export
  • export entColliderComponent
  • export entSimpleColliderComponent
  • export worldCollisionNode

Maybe:

  • collision bodies from mesh parameters?
    • these aren't really necessary but it's only a couple extra lines to add, would this be useful? Anyone have any input?

doesnt cope with bad references in mltemplates

Had someone having an issue importing the trauma team gloves ([g1_012_ma_gloves__trauma.mesh) and it not importing all the materials. Error was a Keyerror for line 518 of multilayer.py (see attached). Tracked it down to the mutlilayer on the stitching calling up the ml_g1_012_ma_gloves__black_tc.mlsetup which in turn uses the latex_neon_01_30.mltemplate but calls for roughLevelsOut to be as per override feaf5b. Only issue is that isn't in the list in the latex mltemplate, so when the plugin trys to use it we get an error.
Fixed it for the user by having him edit the json to be null instead on the latex call ups, but the plugin needs some kind of try except or check for validity.
image

Fix the material import on multimesh

Seems totally broken, looks like the materials are getting imported but assigned to the wrong submesh. Used to work, so need to work out what broke it.
Also need to do something to deal with the .mesh.json thing that the new exporter does, as it does it on multimesh exports.
Need to have a think about how to handle multimesh exports, as dont need/want to import the seperate meshes as well as the merged bits if they've been done that way.

ent materials import issue

Software: Blender 3.6
Add-on: Version 1.4.0 RC 1
Issue: Getting a TypeError issue on some materials when importing a character ent file. Not sure if the issue is only with ep1 models, but I got the issue when importing president Myers, Angie, and Songbird. I checked the discord for any solutions, but I thought I would ask here.
blender issue 1

[Suggestion] Preparation for Blender 4.0

Blender 4.0 changes the Principled BSDF node to the new v2 version of it, which'll require reworking all the material types. I'm going to try making a PR for the repo to edit some of the material type definitions, however the new Blender shader brings with it core rendering changes to it too, so maybe a github discussion on this repo to cover the topic would be of best use.

4.0 Blender API: https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Python_API

Refactor the Sector import

The whole match case with the node types should be broken out into files like the materials are, its a mess at the minute.
Theres a lot of duplication that could be refactored out too.

parallaxscreen not compatible with Blender 4.0

Any materials using the parallaxscreen mt will not import properly, with this error:

  File "C:\Users\\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\i_scene_cp77_gltf\importers
\import_with_materials.py", line 148, in CP77GLBimport
    bpymat = Builder.create(index)
  File "C:\Users\\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\i_scene_cp77_gltf\main\setup.py", line 168, in create
    meshDecalParallax.create(rawMat["Data"],bpyMat)
  File "C:\Users\\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\i_scene_cp77_gltf\material_types\parallaxscreen.py", line 214, in create
    scroll1Group.inputs.new('NodeSocketFloat','ScrollSpeed1')
AttributeError: 'ShaderNodeTree' object has no attribute 'inputs'

AKL Autofitter wrong outputs on Blender 4.02

Tested with Blender v4.02 and Cyberpunk Add On v1.52. Used a vanilla game file exported to GITF with Wolvenkit v8.11.0.

The AKL Autofitter refits to the wrong lattice modifier.

It either puts out a different preset (Hyst EBBP is exported as Solo Arms), applies no deformation at all (Flat Chest, doesn't even connect itself with the Mesh), or it delivers the wrong deformation (Hyst EEB RB for example)

image

image

Inkwidget import?

I'd love to be able to rig and animate the screens in vehicles. I imagine it might be possible by using the inkatlas as a UV map and importing each widget as a plane. Not sure how the animations are controlled though.

Animgraph view, editing and functionality

Import animgraphs as nodes connected to the rigs/anims/objects they describe. Allow editing both in the node graph and the 3d viewport.
Export back to .json for import into Wolvenkit

feature request: Switch armature body gender

It would be awesome if I could have a button that will parent the current selection to an armature of the other body gender under consideration of the bone offsets (maybe with automatic weights or so?). I'm still doing it manually and it's annoying.

If the feature already exists, tell me and I'll try to update the docs :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.