Author Topic: Plugin for importing bones and animations to Blender from .anim (RE1MV)  (Read 749 times)

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
It is my first skeleton animation that I exported from Blender to Collada (.dae) and imported to the WebGL/TypeScript application. You can run it in browser by one click: Child Bone Animation



« Last Edit: September 13, 2020, 07:41:26 pm by Ivan Enzhaev »

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
I am close to write a plugin. It is good that a model do not have a skinning.

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
Now I understand animation data.

"25" - amount of frames.
Next line is a position of torso.
Next 15 lines are angles of parts (rotations around x, y and z).

Code: [Select]
25
-0.020 0.000 33.640
-0.791 -0.615 0.703
5.187 -8.615 -1.143
-5.978 8.352 -0.879
12.571 47.297 2.813
72.703 -13.363 -63.385
-25.407 23.209 -12.308
1.670 13.011 -14.330
-7.912 -2.989 0.352
18.198 -14.154 -4.220
0.000 0.352 14.681
-4.571 2.374 -0.176
16.527 -7.560 -2.110
-16.088 -1.582 -1.231
-18.989 -17.495 0.527
3.692 6.681 0.000

-0.020 0.000 33.620
-0.879 -0.527 0.703
4.923 -8.791 -1.055
-5.978 8.352 -0.879
12.571 48.088 3.165
74.637 -11.604 -63.473
-25.758 22.769 -12.308
1.846 13.099 -14.418
-7.736 -2.989 0.352
18.198 -14.505 -4.308
0.088 0.440 14.857
-4.659 2.374 -0.176
16.791 -7.824 -2.198
-16.264 -1.495 -1.319
-19.165 -17.846 0.615
3.780 6.857 0.000
« Last Edit: September 18, 2020, 09:22:21 am by Ivan Enzhaev »

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
I wrote an example where you can rotate/zoom parts of Jill: https://8observer8.github.io/webgl10-ts/jill-parts/index.html

Like Like x 1 View List

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
I am working with animations now.

Like Like x 1 View List

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
Something is wrong  ;D

Like Like x 1 View List

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
I want to have two versions of skeleton demo:
  • TypeScript, WebGL 1.0, Node.js
  • C++, OpenGL ES 2.0, Qt
Both versions will be run on Desktop and Android. Qt supports WebSockets for coop and multiplayer (Node.js supports WebSockets too).

I you want to start to practice with simple games you can use my examples. They draw a triangle:
« Last Edit: November 14, 2020, 11:54:22 pm by Ivan Enzhaev »

dukemagus

  • Newbie
  • *
  • Posts: 2
A tool that can reads the animation data and parse to something Blender can understand (i'm not sure RE1 models have skeletal rigs, so it would probably be something moving individual meshes) would be great!

Best of luck with the development of your tool

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
Thank you. I did not forget about it. Yes, of course, I will solve the problems and the plugin will be ready. Give me one or two month.
« Last Edit: December 21, 2020, 03:11:36 am by Ivan Enzhaev »

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
This script adds two numbers. It shows how to add GUI elements to Blender using Python. Useful link: https://stackoverflow.com/a/15610283/4159530



Code: [Select]
bl_info = {
    "name": "Calculator to add two numbers",
    "category": "3D View"
}
 
import bpy
 
class MyPanel(bpy.types.Panel):
  bl_label = "Calculator"
  bl_space_type = 'VIEW_3D'
  bl_region_type = 'TOOLS'
 
  def draw(self, context):
    layout = self.layout
   
    col = layout.column(align = True)
    col.prop(context.scene, "a_string_prop")
    col.prop(context.scene, "b_string_prop")
    col.prop(context.scene, "r_string_prop")
 
    row = layout.row()
    row.operator("calculator.add", text="Add two numbers")
   
class MyOperator(bpy.types.Operator):
    bl_idname = "calculator.add"
    bl_label = "Simple operator"
    bl_description = "My Operator"
   
    def execute(self, context):
        a = context.scene.a_string_prop
        b = context.scene.b_string_prop
        r = float(a) + float(b)
        context.scene.r_string_prop = str(r)
        return {'FINISHED'}
 
def register():
  bpy.utils.register_class(MyPanel)
  bpy.utils.register_class(MyOperator)
  bpy.types.Scene.a_string_prop = bpy.props.StringProperty \
    (
        name = "a",
        description = "First operand"
    )
  bpy.types.Scene.b_string_prop = bpy.props.StringProperty \
    (
        name = "b",
        description = "Second operand"
    )
  bpy.types.Scene.r_string_prop = bpy.props.StringProperty \
    (
        name = "result",
        description = "Result operand"
    )
 
def unregister():
  bpy.utils.unregister_class(MyPanel)
  bpy.utils.unregister_class(MyOperator)
  del bpy.types.Scene.a_string_prop
  del bpy.types.Scene.b_string_prop
  del bpy.types.Scene.r_string_prop
 
if __name__ == "__main__":
  register()
« Last Edit: January 13, 2021, 02:38:16 pm by Ivan Enzhaev »

Leigiboy

  • Newbie
  • *
  • Posts: 9
  • Location: Argentina
    • Support me on Patreon!
I dont know how I missed this, really awesome work.

I recently started thinking on recreate from RE1, where the camera zoom on the characters, in blender and althoug Iwas able to get the animations on blender using the fbx format a dedicated tool to impor them would be really awesome.

Keep up the good work!

Ivan Enzhaev

  • Newbie
  • *
  • Posts: 29
I found the nice tutorial about making bones with script: 3. Armatures
Creating keyframes for bones: Actions and drivers
This part is about making GUI in Blender using Python: 10. Interface
This code works in Blender 2.67 and 2.79. I think it will work in new Blendr 2.9 with little changes but I use 2.67 because it is good for my notebook.
« Last Edit: February 12, 2021, 07:35:46 am by Ivan Enzhaev »