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.

Metadata

Release files for libcalab-ogre3d 0.3.5

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

Built distribution (wheel)

Table of built distributions (wheels) for libcalab-ogre3d 0.3.5
File Interpreter ABI Platform Actions
libcalab_ogre3d-0.3.5-cp312-cp312-macosx_13_0_arm64.whl CPython 3.12 CPython 3.12 macOS 13.0+ ARM64 Details for libcalab_ogre3d-0.3.5-cp312-cp312-macosx_13_0_arm64.whl

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

Download URL libcalab_ogre3d-0.3.5-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
ea947ebac8543b688c892ecdebe236ad3930bfb803d5a25c2f1e0acdafc17154
BLAKE2b-256 checksum
How to use checksums
c2286d9490672cb154c23974d0e28ef23d0c42c191a2a757bdb1168bbf139016
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Security for libcalab-ogre3d 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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