University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

dae file in android platform looks unnormal | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
dae file in android platform looks unnormal
November 20, 2015
12:18 pm
Avatar
Member
Members
Forum Posts: 3
Member Since:
November 20, 2015
sp_UserOfflineSmall Offline

I have a dae file to create character. In windows smartbody, it looks normal. But it looks unnormal in android, the app is sbjniapp. The character is white in android phone.

windows platform snapshot: https://www.dropbox.com/s/dmcthnyeejku4fg/windows.png?dl=0

android platform snapshot: https://www.dropbox.com/s/vvphmxm48wni0if/phone.png?dl=0

dae file: https://www.dropbox.com/s/4oeo9z8t3t5yzfo/yc4.dae?dl=0

 

I changed the code in android\sbjniapp which the file is android\sbjniapp\jni\minimalwrapper.cpp.  I add the lights, but it also looks unnormal. 

void SBDrawFrame(int width, int height)

{

.....

the code is #if 1
// draw lights
drawLights();

...

}

My python code:

scene.setMediaPath('/sdcard/testsmartbodydir/')
#scene.setMediaPath('F:/smartbodydemo/testsmartbodydir')
scene.addAssetPath("script", ".")

scene.addAssetPath('motion', '.')
scene.addAssetPath("mesh", ".")
scene.addAssetPath('script', 'scripts')
scene.loadAssets()

scene.setScale(1.0)

scene.run('default-viewer.py')
camera = getCamera()
#camera = scene.getActiveCamera()
camera.setEye(0, 1, 2)
camera.setCenter(0, 1.45, 0.82)
camera.setUpVector(SrVec(0, 1, 0))
camera.setScale(1)
camera.setFov(1.0472)
camera.setFarPlane(10000)
camera.setNearPlane(0.1)
cameraPos = SrVec(0, 1.17, 2.0)
#camera.setPosition(cameraPos)
scene.getPawn('camera').setPosition(cameraPos)

model = scene.createCharacter("model", "")

modelSkeleton = scene.createSkeleton("yc4.dae")

model.setSkeleton(modelSkeleton)

modelHPR = SrVec(0, 0, 0)
model.setHPR(modelHPR)

modelPos = SrVec(15, -5, -100)
model.setPosition(modelPos)

model.createStandardControllers()
model.setStringAttribute("deformableMesh", "yc4.dae")
model.setStringAttribute('displayType', 'GPUmesh')

November 21, 2015
12:59 am
Avatar
Admin
Forum Posts: 52
Member Since:
August 8, 2012
sp_UserOfflineSmall Offline

Hi,

I have fixed this problem and commit the changes. Please update to the latest version ( both SmartBody and sbjniapp ) and see if the rendering is working.

 

Thanks,

Andrew

November 21, 2015
2:58 am
Avatar
Member
Members
Forum Posts: 3
Member Since:
November 20, 2015
sp_UserOfflineSmall Offline

Thanks. I try it. It's fixed.

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online: mondayneedle1, huberdavidsen3, casey29english, andersen19eaton, kristensen00leblanc, eric506784, t9rrzpi307
113 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

jwwalker: 80

jyambao: 51

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 65

Members: 52460

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 427

Posts: 2343