Skip to main content

Example code 1 (fbx rendering using timeline).

import os,sys,pdb,math
from libcalab_ogre3d import *
import numpy as np


def onFrameChanged(iframe):
    global skin1, skin2
    print(iframe)
    skin1.setPose(fbx.loader.mMotion.pose(iframe))
    skin2.setPose(fbx.loader.mMotion.pose(iframe))


            

this=RE.createMainWin(sys.argv)
skelFile='../../Mixamo/fbx_withSkin/bigvegas_Walking.fbx' 
skinScale=1

fbx=RE.FBXloader(skelFile, skinScale=skinScale, useTexture=True, simplifyMesh=False)

# draw skeleton
skin1=RE.createSkin(fbx.loader)
skin1.setScale(skinScale, skinScale, skinScale)

# draw mesh
skin2=RE.createFBXskin(fbx)
skin2.setScale(skinScale, skinScale, skinScale)


g_motion2=fbx.loader.mMotion
mTimeline=RE.Timeline("Timeline", g_motion2.numFrames(), 1/g_motion2.frameRate())
m.startMainLoop() # this finishes when program finishes

example code 2 (bvh loading without using timeline).

import os, sys, pdb, math, random
from libcalab_ogre3d import *
import numpy as np

elapsedTime=0
            
def frameMove(fElapsedTime):
    global elapsedTime, mLoader, mMotion,mSkin

    elapsedTime=elapsedTime+fElapsedTime
    currFrame=round(elapsedTime*30) # assuming 120hz

    if currFrame>=mMotion.numFrames():
        return
    mLoader.setPose(mMotion.pose(currFrame))
    leftwristpos=mLoader.getBoneByName('LeftHand').getFrame().translation
    RE.draw("Sphere", leftwristpos*100, "wrist1", "red", 6)

    mSkin.setPose(mMotion.pose(currFrame))

def onCallback(w, uid):
    print(w.id())


this=RE.createMainWin(sys.argv)

this.addButton('hihi')
this.updateLayout()

mLoader=RE.createMotionLoaderExt('../Resource/motion/woody/wd2_2foot_walk_turn2.bvh')
mMotion=mLoader.mMotion

mSkin= RE.createSkin(mLoader);    # to create character
mSkin.scale(1,1,1);                    # this motion data is in cm unit 
mSkin.setPose(mMotion.pose(0));

RE.viewpoint().vpos.set(0, 50, 300)
RE.viewpoint().vat.set(0,40,0)
RE.viewpoint().update()

while True:
    if not RE.renderOneFrame(True):
        break

Other examples

https://github.com/taesoobear/IPCDNNwalk

Changelog

version 0.2.8

  • Gaussian splatting

version 0.2.7

  • Pack and unpack floatTensor

version 0.2.6

  • Fixed memory issues (regarding .array)
  • Fixed memory leaks (regarding Voxels and SDF)

Version 0.1.5

  • Automatically creates the work resource folder.

Version 0.1.4

  • Improved the SceneGraph UI.

Version 0.1.3

  • Fixed null pointer errors related to Ogre::SceneNode.

Release files for libcalab-ogre3d 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for libcalab-ogre3d 0.3.3
File Interpreter ABI Platform
libcalab_ogre3d-0.3.3-cp312-cp312-win_arm64.whl CPython 3.12 CPython 3.12 Windows ARM64 Details
libcalab_ogre3d-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details
libcalab_ogre3d-0.3.3-cp312-cp312-macosx_13_0_arm64.whl CPython 3.12 CPython 3.12 macOS 13.0+ ARM64 Details

Total release size: 61.6 MB

Release files / libcalab_ogre3d-0.3.3-cp312-cp312-win_arm64.whl

Download URL libcalab_ogre3d-0.3.3-cp312-cp312-win_arm64.whl
Size 20.8 MB
Tags CPython 3.12 Windows ARM64
SHA-256 checksum
How to use checksums
ca7e56cdd4fd9febad54af6365b17c0187261bc213d4d91b888094c31dcf6eca
BLAKE2b-256 checksum
How to use checksums
970b58fc58b44ce5c4932f76e27686b1bade51260fee7e63bd016e81a0646111
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / libcalab_ogre3d-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL libcalab_ogre3d-0.3.3-cp312-cp312-manylinux_2_39_x86_64.whl
Size 24.9 MB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
d0fa2953cb9f174b20f3d86e3888372a4416f0fe37c79695f4cd7d215d7b3f06
BLAKE2b-256 checksum
How to use checksums
7a6ac9a5a668c734be23b95d6310f0546d5ac3d68af9f9f19c6f5483a9023e53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / libcalab_ogre3d-0.3.3-cp312-cp312-macosx_13_0_arm64.whl

Download URL libcalab_ogre3d-0.3.3-cp312-cp312-macosx_13_0_arm64.whl
Size 15.9 MB
Tags CPython 3.12 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
38360400eb75b4d225c1d702384aaea04792e25533fcc04b6e7d1dbc9c559ee3
BLAKE2b-256 checksum
How to use checksums
1e48b0deaf4b40c42f6b7549b6ed720bdfa73aa329bb6d9d6108dcff6cb7d135
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release history Release notifications | RSS feed

0.3.4

2 release files

This release

0.3.3 This release

3 release files

0.3.2

3 release files

0.3.1

2 release files

0.2.9

1 release file

0.2.8

3 release files

0.2.6

4 release files

0.2.5

3 release files

0.2.4

3 release files

0.2.3

2 release files

0.2.2

3 release files

0.2.1

2 release files

0.2.0

1 release file

0.1.9

2 release files

0.1.8

3 release files

0.1.7

2 release files

0.1.6

1 release file

0.1.5

3 release files

0.1.4

2 release files

0.1.3

3 release files

0.1.2

5 release files

0.1.1

1 release file

0.1.0

1 release file

0.0.9

0.0.8

4 release files

0.0.7

2 release files

0.0.6

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page