RPG Developer Bakin

RPG Developer Bakin

评价数不足
VRM VRoid Models in RPG Developer Bakin - Full Guide
由 Meringue Rouge 制作
A full guide on importing and utilizing VRM models to their fullest for use in RPG Developer Bakin.
Also goes through importing animations, using special addons to expedite specific tasks, and improving model visuals in RPG Developer Bakin.
   
奖励
收藏
已收藏
取消收藏
Introduction
Have you been struggling with using VRM models in RPG Developer Bakin, or simply want to get started making your very own waifu game in full 3D with little coding experience? Items aren't being held by your character, or you couldn't get your custom animation working?

This quick guide will cover as many aspects of getting a VRM character to not only import with additional features, such as eye tracking, and head tilting, but also get some fundamentals working properly, since there is a lack of proper documentation around the subject.



ℹ️ We make use of Blender and addons throughout this tutorial, but don’t let that scare you! I’ve optimized the entire procedure so that the majority of the functionality can be obtained without any blender experience required.



This is the English guide. For the Japanese guide, see here.これは英語のガイドです。 日本語ガイドはこちらをご覧ください。
Software Required
Blender Addons for Bakin
Installing Blender Addons
To install the following blender addons, download the zip files and do not extract them, then open Blender, and in Edit -> Preferences -> Add-ons, click on the top right arrow and install from disk each zip file.



VRM for Blender Addon
This is a required addon to get VRM models loaded into Blender, and to export VRM models.
https://vrm-addon-for-blender.info/en/

VRoid for Bakin (Blender Addon)
An addon that adds new functionality / features to VRM models that were specifically designed with utility in RPG Developer Bakin in mind:
  • Add Item Hooks Bones: Automatically add item hook bones so that the model can hold items in either the left or right hand, without having to manually configure a subgraphic.
  • Iris Look: Automatically adds blend shapes that can move the eyes around.
  • Alternate Irises: Allows you to add up to 4 blend shapes that can change the texture of the irises. You must supply your own texture, and a template is available.
  • Blushing Layers: Allows you to add up to 4 blend shapes that can add a texture overlay over the face, for emotions like blushing or sorrow. You must supply your own texture, and a template is available.
  • Head Direction: Automatically adds blend shapes that allow you to control the head's rotation through Blend Shape Events, regardless of the current model's animation. This significantly increases the file size of the VRM file.
  • Eyewear / Glasses Seperator: Seperately export the glasses from a VRoid model into it's own file, and removes it from the VRM model, so that you can export the model without glasses easily, and then add the glasses as a subgraphic to the model, so that you can toggle it on/off in game.
  • Animation Export Helper: Retarget an animation onto a bakin generated model quickly to avoid issues when used in Bakin.
https://meringue-rouge.itch.io/vroid-for-rpg-developer-bakin

Blender Animation Retargeting
Update: With Blender 5.0, the original plugin might be out of date. I've made a fork of the program that should work with Blender 5.0.

Seperate addon required to use the Animation Export Helper properly in the VRoid for Bakin addon. Allows you to retarget an animation from one model to another, even if they aren't exact matches in terms of bone structure / name.

Blender 5.0: https://github.com/Meringue-Rouge/blender-animation-retargeting
Older versions: https://github.com/Mwni/blender-animation-retargeting

VRM Spacing Animation Baking
Optional utility for animation that allows you to adjust the spacing on arms, legs, head, and more, on already baked animations. Great for fine tuning the posture of Mixamo animations and generic animations that weren't designed with the "proportions" of anime characters in mind.

https://meringue-rouge.itch.io/vrm-spacing-animation-baking

VRoid VRM Normal Map Generator
Optional utility to quickly generate and assign normal maps to your VRM model.

https://meringue-rouge.itch.io/vroid-vrm-normal-map-generator

VRM Physics Enhancer
Optional utility to enhance various physics settings on the VRoid model that aren't normally easily edited. Offers breast physics tweaker, breast colliders, long hair penetration prevention, colliders of hands, long dress physics fixer, and a way to add rudementary, quite broken, jiggle physics onto thighs, hips, etc...

https://meringue-rouge.itch.io/vrm-physics-enhancer
I - Exporting your VRoid Model from VRoid Studio


Before even exporting the model, it's important to turn off the "Prevent excessive shaking during movement" option if you want your character's hair to move freely. If it's turned on, the hair's movement is locked in the axis of your player movement in an unnatural way. This will change how things like the bust will bounce as well, so adjust the Outfit and Body values accordingly after testing.



All models from VRoid Studio should work.
However, I'd strongly recommend exporting your model in the VRM 1.0 format. Most of the addons I've made were designed with that in mind, and it supports functionality like

Optimization Considerations

Assume you're making a large-scale RPG for just a second: filling a city full of unoptimized VRM models will put a dent on most PCs, and even if you have a great PC, it's important that others can play your game.

On the VRoid export screen, you can reduce the polycount, material quantity, and even reduce the amount of bones used in the hair.

Not every model must have their materials reduced, bone count lessened, or even lowered poly count, but nobody is going to notice too much if you reduce the quality on NPC models for example. The texture quality of the entire model will drop with material reduction, so keep that in mind. Reducing the vertices can also help, as well as reducing the bone count on the hair.
II - Modifying the VRM in Blender
In this section, we're going to create an enhanced version of the VRM model using the VRoid of Bakin Blender addon.

From startup, in a new Blender scene, get a clean slate by pressing the A key to select all the objects in the scene, then press the DELETE key to delete all the objects in the scene.

You can open the add-ons side panel by pressing the N key. Scroll down the tabs with mouse wheel over the tabs until you find the VRoid for Bakin tab, and open it.
The usage of this add-on is as follows, in order:

  1. Press "Import VRM" and navigate to the VRM model you just exported from VRoid Studio.
  2. Press the buttons for the features you want to add:
  • [Add Item Hooks]: This adds two bones for Bakin to immediately recognize as item hook bones, letting the model hold objects in their hands through events and equipment.
  • [Add Eye Shape Keys]: This adds "facial expressions" that Bakin will recognize for the eyes, simulating the eyes being able to "look" at things. Adds a bit of weight to the final file size when exporting.
  • [Create Alternate Irises]: This adds multiple irises that can be swapped around using Bakin's facial expressions in game, similar to a MikuMikuDance model. You'll need to select a texture for it in a special format! Download the template from here.[github.com] Then, press "Create Alternate Irises" and select the template (you can change the texture later inside of Bakin).
  • [Create Blushing Layer]: This adds multiple face paint layers that can be swapped around using Bakin's facial expressions in game, similar to a MikuMikuDance model, designed for facial expressions like blushing. You'll need to select a texture for it in a special format! Download the template from here.[github.com] Then, press "Create Blushing Layer" and select the template (you can change the texture later inside of Bakin).
  • [Add Head + Body Shape Keys]: This adds "facial expressions" that Bakin will recognize for the head, simulating the head's ability to turn up/down/left/right. This adds significant weight to final export (100MB final exports aren't uncommon). If you're using this, you must also press [Fusion Meshes and Hair/Head Keys], otherwise the model will have a big void in their neck while turning.
Once you've selected your options, you'll need to save the blender project. The location of your saved blender project (a blend file) is important, as this will determine where the addon will not only export your model (into it's own folder), but you'll also use this blend file as a starting to point to add animations, and automatically retrieve the files that Bakin generates on import.

Exporting
After saving the project, the addon will unlock the ability to export the new VRM model.
Press VRM Export, and it'll create a new folder in the same directory as your saved Blender project, named after your model's VRM name followed by BakinVRM. This is the new model with the modifications done in the VRoid for Bakin addon.

(Advanced) Bonus Model Features
In the Blender addons section, I've listed two additional addons, the VRM Normal Map Generator and the VRM Physics Enhancer. These are far from essential, but can enhance the look and feel of the model. You can use them later on, but keep in mind that while you can "reload" the model in Bakin to reflect the updates to the model (in the Models section of the Resources, not 3D Stamps), it tends to have issues if new textures are suddenly added (that goes for the multiples irises/blushes as well. In those scenarios, it's unfortunately a requirement to completely remove the model from the game first, then re-import it.

Just be extremely careful when deleting assets with the "Delete All" button, if said model is tied to existing systems, resources, or more, as this can cause unplanned file deletion. Make sure to manually delete the model, textures, materials to avoid headaches.
III - Importing VRM models into Bakin
We're going to assume you have some basic knowledge of how to use RPG Developer Bakin.

Open up your game project, and go into the Resources section, 3D Stamps. Create a new folder to house your VRoid models (organize it how you want) and import your new VRM model with the (BakinVRM) suffix, not the original.

An import previewer will appear, and accept to start the import.
Always select "Create new materials" if it asks for the material assignment type.

The model is now usable in game. However, a lot of features aren't set up yet, so we'll now go over how to set up a few of the features.

Blend Shapes
Blend shapes are used to create facial expressions on the fly, through events and dialogue. Configuring these by hand is a time waster, so I've done the heavy lifting and created a preset selection over on the Steam Workshop. It even has the blendshapes for the modded VRM features like head tilt, eye position and alternative irises.

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3507197035
To use this Steam Workshop item, first, subscribe to the preset over on the Steam Workshop. Then, inside of Bakin's home page, go to Steam Workshop, select the VRM Facial Presets v2, and click Rename and Save Project. Save the zip file anywhere and extract it, then open your game project and head to Resources -> Blend Shapes. Import the file where you extracted it and accept the import.

Next, go back to 3D Stamps, locate your model, and in the Blend Shapes field on the right, click on the empty space and select the VRM Blend Shapes preset. Your model will now be able to express emotions through events.

For any future model you add, do not need to create a duplicate VRM Facial Presets object, all models can use the same set. Some presets are used by Bakin's systems, such as "blink" (eyes closed) and "talk" (mouth open) for Conversation events.

How to use Blend Shapes in gameplay
You can call the "Apply Blend Shapes to Player" event to apply the blend shapes to the player, and "Apply Blend Shapes to This Event" event for NPCs or any Battle Actors, including allies (use Make Battle Cast as Operation Target for battle actors). There isn't a way to affect the Party Train models however.

Physics & Collision
VRM models automatically come with a predefined collision capsule, but this may not be ideal for some. On wider models, such as characters with absurdly huge dresses, the collision will be extremely large and won't necessarily line up with the feet on the ground.

To use your own set of physics / collision, enable Accurate Collision and click on the empty space near Physics Setting to change to a different one.



The physics objects not only handle event / object / terrain collision, but they can, when programmed right, handle additional "physics" that can react to each other. You can use it to give a pendulum swinging the ability to get knocked off a surface, or you can make the hands affect the breasts, among other things.

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3242428190

This physics preset was made back before official VRM support was a thing, and has some basic physics for both the hitbox and chest/hand physics support. However, I'd personally recommend removing all the shapes except for the first one, as the VRM format handles a majority of the physics already. However, when you've mastered more of the engine, you can one day use it as a base to fully enhance models with dynamic soft body reactions, but that's something beyond my ability, sadly.

Motion

VRMs will initialize with a set of pre-built animations in Bakin: however, due to armature differences, adding animations to the prebuilt set will, often, result in animation corruption. For this reason alone, you should change the motion object. Each character should ideally have their own Motion object in Bakin, in order to load unique animations for specific shared animations like walking and idle.


Replace the motion by clicking it, then go to the Resources tab (not the default Ready to Use tab), and select the VRM model. This will create a new motion object for that character.

However, we don't have any animations right now. Save your work in Bakin, because now we have everything we need to make and import animations for our new character.

(Optional) Glasses (after seperation)
If your model doesn't wear glasses (or you don't need the ability to turn on/off glasses), skip this section.

The VRoid for Bakin add-on adds the ability to split away and export the glasses/eyewear of models into a separate FBX file, which is useful if you need the ability to toggle on/off the glasses of a character. To add the glasses back:

  • Import the glasses that got exported into a new 3D Stamp.
  • You'll notice the materials are wrong. Navigate to the Models tab, and then find your glasses again, and re-assign the materials from the white ones to the glasses materials attached to your VRM model. They normally have the word "glasses" contained within them, but one is for the lens, and the other is for the rim.
  • Back into 3D Stamps, turn on Accurate Collision on the glasses and leave the physics empty.
  • Go to your VRM model's stamp, make sure Subgraphic is enabled.
  • Press Add in the Subgraphic panel, select the new subgraphic, fill in the Subgraphic field with the newly found glasses model.
  • Lastly, change the attach node to J_Bip_C_Head.

You can then toggle the glasses on/off through events that toggle on/off subgraphics. If you want the model to start by default with the glasses disabled, set the visible switch to off.

IV - Importing or making custom animations
This is more of a creative chapter, meaning I can't give you any pointers on how to animate.
However, I'll list some of the possible avenues you can either create or bring over custom animations, outside of Mixamo animations.

Basic Methodology
This is the general chronology of things to do when creating one animation:
  • You open the Main Blend in Blender.
  • Save the Main Blend as a new file in the same directory as the Main Blend, ideally name it CharacterName_AnimationName.
  • Through whatever methods described in the tutorial or your own, you apply the animation to the VRM model in this blender scene: it must be on the timeline, or if it's been pushed onto an NLA Strip you must enter editing mode for that strip.
  • When the animation is complete here, save your work in the animation blend.
The VRoid for Bakin plugin wasn't designed with multiple animations in one file, so each animation will need to be its own blend file, and eventually its own FBX.

We'll go through two different scenarios that I have experience with. Feel free to choose the method you prefer, depending on the animation you want to make.

Scenario A: Mixamo / Actorcore / third-party animations, retargeting and adjusting them to the VRM model's physique

Whether you use Mixamo[www.mixamo.com], Actorcore[actorcore.reallusion.com], or any other website or marketplace that offers motions, you'll quickly notice that VRM models either don't look "right" or simply can't be used.

  • Mixamo is generally compatible with VRM models, but the arm spacing will often be an issue (sunken arms syndrome). Also, it tends to refuse the VRM model for some reason, for no real reason.
  • Actorcore uses a different bone structure entirely, making it incompatible without retargeting the animation. Uploading the model to their site will change the entire bone structure as well, making it incompatible with Mixamo animations, etc.
  • Could be a similar scenario with animations ripped from Unity or Unreal's marketplaces or asset packs, but I don't have any experience with those.

So long as you have the FBX motion, however, you can retarget the animation to your VRM model using the Blender Animation Retargeting addon mentioned above, and, with the usage of my VRM Spacing Animation Baking addon for Blender, you can then adjust the posture of the entire animation, be it the legs, arms, head, etc.

Retargeting the animation
  1. Download your animation from either Mixamo, Actorcore, or wherever, the animation you want in either FBX or "Blender" (Actorcore) compatible format. When downloading, make sure the framerate/FPS to 60, only download the skin and not the model, and use the default model on the website for best results, not a custom import.
  2. Open the Main Blend, save as a new blend file in the same directory as Main Blend and call it ModelName_AnimationName.
  3. File -> Import -> FBX, and then find the animation you've just downloaded.
  4. If the add-ons panel isn't showing, press N to toggle it on / off, and then scroll and find the Retargeting tab.
  5. Select your VRM model (not the animation) in either the 3D view or hierarchy.
  6. Follow the short video tutorial in this section to see the procedure on retargeting the Mixamo animation to the VRM model.

Regarding non-Mixamo animations
In the video above, we used a Mixamo animation, which automatically guesses the correct set of bones. However, when using animations from Actorcore or from other sources, there is a good chance your VRM bones will be incorrectly guessed by the addon and will result in incorrect animation.



To fix this, you'll need to change the right-side bones to correspond with the bones in the same position as the Actorcore armature. The most important bones to fix are the two spine bones, waist, pelvis, hips, root, and fingers, the rest shouldn't affect anything in the animation. It is tedious, but once you've found the mapping that works, you can press Save Config and create a config file, so that any other animation for the model using that armature can be sped up by using Load Config.



Now, if the animation looks fine, you can skip straight to the next part of the tutorial, otherwise you should try adjusting the pose with VRM Animation Spacing Baking.

Adjusting the posture with VRM Animation Spacing Baking

After the animation has been baked to the VRM character, you can use the VRM Spacing Animation Baking addon (mentioned above) to adjust the posture of an entire animation. As the amounts to apply and the bones to work on are going to be based off your motions, this quick video demonstration will show how to use it.

Not shown in the video is a visual pose reposer. Simply press record, adjust any bone you want in pose mode, and then confirm to adjust the entire animation based on the changes done. It does apply to the entire animation, so avoid using this for dynamic motions as posing in one frame can look horribly wrong in another.

When you are satisfied with the look, scrub through the timeline to make sure it looks right in motion, and if so, save the animation blend, then head to the next part of the tutorial.

Scenario B: Your own animations using VRM Posing Desktop



If you need to make animations that are more tailored to your game, then I'd strongly recommend the usage of VRM Posing Desktop. It is a paid app on Steam, but it is worth the price, as it offers an excellent posing system with its IK rig, tons of reference poses to build your animations out of, and can export into VRMA files, which require no retargeting shenanigans to get them working with your model in Blender.

https://psteamproxy.yuanyoumao.com/app/1895630/VRM_Posing_Desktop/

The only downside is that the animation interface is downright cryptic without any documentation, presented in a very nonstandard way, and if you've noticed a little issue in an animation (like, say, pose hovering over the floor), you'll need to painstakingly edit each problematic bone in each keyframe, without really precise numbers to refer to unless you like opening and closing the timeline view over and over for every frame.

Creating the animation in VRM Posing Desktop

Open the app, and click on the Replace button, then press the VRM button and load your model: you can either use the original VRM from VRoid Studio or the Blender exported one, but it doesn't matter here, since the app exports VRMA files, and VRMA files can be applied to any VRoid Model without issues.


Feel free to follow the quick video tutorial on how to create an animation from scratch. This is a creative process, so it's just showing you the methodology in creating an animation: you'll need to figure out what to make on your own.

Once you're done and satisfied, it's worth saving it in both VPDLOOP and VRMA, so in case you need to edit it again, you can import the VPDLOOP file in VRM Posing Desktop. For our purposes, the VRMA file will be imported into Blender.

Bringing the VRMA into Blender

Open the Main Blend and save it as a new Blend file, in the same directory as the Main Blend, and name it ModelName_AnimationName.

Then, go to File -> Import -> VRM Animation (VRMA), and find the animation you've exported from VRM Posing Desktop. You'll need to scrub through the timeline to see the pose take effect, but at this point it's usable for the next part of this tutorial. Don't forget to save.
V - Adding the animations in Bakin
If you paid attention to your file system, you'll notice that importing a VRM model in Bakin creates three additional files, with a different armature structure and bone names. We will use these automatically with the usage of the VRoid for Bakin addon to get our animations working properly in Bakin, although an official method was just released recently.

The Official Bakin Method
SmileBoom released an official guide on how to export motions from Blender into Bakin, and they've even made their own addon to export the animation easily. You can find it here.[rpgbakin.com]

However, this tutorial won't cover it, although it does work, but I find it a bit tedious to read.
In practice, you can quickly export a model, with the animation, as is, in the current state, through the addon, and it will work... but ignore the fact that it weights a few MBs too much (at least on my end), even though the only mesh is a cube.

The VRoid for Bakin Method

Open the blend file you've created that houses the VRM character with the animation loaded in the timeline. Before continuing, make sure you can edit the motion and that it isn't in an NLA strip that isn't currently being edited (if that's the case, right-click the strip and begin editing).

If you configured the file paths and directories correctly (read tutorial for more info), and your files are correctly placed, click on Import Bakin Retarget Model. This will open a prompt on the type of model to import. Keep it set to VRM Humanoid and press OK, and it'll import into the scene the model that Bakin generated, to which we will use for the retargeting process.

Important: If you imported your VRM model into a Bakin project prior to RPG Developer Bakin v1.13, you'll need to use the Legacy option. The procedure for both legacy and the new model remain the same.

You'll then need to open the Retargeting addon. Normally the addon should keep the selection on your VRM model, but make sure you're selecting the VRM (not the greyscale duplicate) armature, and then fill in the armature to copy the pose from as the _base_ armature.

In the Bone Pairings, press A in the 3D space to select all bones, then press the Guess button in the addon twice, and confirm.

Next, confirm the rest pose twice, and then bake the animation.

Return to the VRoid for Bakin addon, and define an animation name in the text field (minus the model name), and then click on Export _base_ animation.

Before exiting Blender, DO NOT SAVE THE CURRENT SCENE. You can always reproduce the steps to make this animation from the saved animation you did before using the addon's retarget options.

Now, return to Bakin, go to the Motions object and find the one that your model uses. Click on the add button on the animation list, and add the file from Local Files. It should start playing! Make sure to rename the animation to something usable by either bakin's automatic systems or for yourself, and to tick the loop animation switch near it, and it should be usable in game!
VI - Additional Refinements in Bakin
Improve Hair/Chest Physics in Bakin
If you move a VRM model, especially one with large breasts, long hair, or large hair bangs, you will quickly notice that the physics are struggling to keep up with the movement, which can look hideous.

To fix this, go to Resources -> Models (not 3D Stamps), and find your VRM model (the hierarchy is different here compared to your 3D Stamps).

Enable "Movement Limit of Swinging Objects", and set the value somewhere between 0,6 to 1.
This corresponds to a sort of movement speed limiter.

If this option does not show up, close and reopen the Resources window, and it should appear (the option strangely only appears if the window is opened when a VRM model is the last thing selected prior).

Shading, avoiding full bright models
When making clothes in VRoid Studio, there's a shade color field for various clothing, but changing it does nothing. In Bakin and other VRM supported software however, this turns out to be the shadow color. At the default white color, no shading gets rendered on the clothes or body, which makes them essentially fully lit, even in dark areas. There's no need to manually re-export the model with the changes, since it can be easily fixed

In Resources -> Materials, a new folder with all the materials specifically for that VRM character exists. Select all the materials that aren't tied to the eyes or makeup, and scroll down the properties of material, and set the Shade Color to something other than white.


You'll need to mess around with the settings by previewing it in game, trying out light sources, but it is well worth it.

Rim light
Unlike the shading mentioned above, rim light settings don't seem to transfer from VRoid Studio to Blender.

Select the same materials as you did for the shading section. The values are a bit tricky to adjust, but they are the following:
  • Rim Light Color: The Color
  • Rim Light Intensity: The Intensity
  • Rim Light Lighting Mix: From 0 to 1, how much it should take the color of the environment(?) light.
  • Fresnel Power: The larger the number, the more isolated from the overall mesh the rim light is.
  • Rim Light Lift: Unsure.



Feel free to use these values: they represent the values from my model shown above in the Shading section.
Conclusion
If you've followed this guide from start to finish, you should hopefully get the hang of porting VRM models into RPG Developer Bakin, and getting animations and other features working.

I hope this helped you out!

About the author

Heya, I'm Meringue Rouge, formally known as ingenoire (or ingenoireP on X).
Like every aspiring game developer, I'm working on my own undisclosed game, using VRM models and RPG Developer Bakin. I love cute busty long haired royalty-themed waifus, if you couldn't tell.


2 条留言
Meringue Rouge  [作者] 6 月 30 日 下午 2:05 
If you can somehow convert MMD models into VRM, it should be doable.
Although that is a curious idea. No promises, but I'll see if I can whip something up to make MMD models easier to use in Bakin.
Adhi 6 月 30 日 上午 5:40 
Thanks for the great guide!
I will try soon with my personal models.
Can I ask if this guide can work with mmd models?