Jump to content

[SOLVED] WidgetSpriteNode/WidgetSpriteViewport & ObjectMeshSkinned issue


photo

Recommended Posts

I have ObjectMeshSkinned with attached ObjectMeshSkinned children.

Children have "controlled" option checked to inherit parent pose.

It works perfect when rendered in main app window.

But when i try to render through WidgetSpriteNode/WidgetSpriteViewport::renderImage function, 

I get problem: bone transofrmations seems not been inherited.

 

what exactly i do:

 

1. setup ObjectMeshSkinnedAnimation through layers to some frame (state1)

2. call viewport.renderImage() to get image

3. setup ObjectMeshSkinnedAnimation through layers to another frame (state2)

4. state2 displayed in main viewport, state1 displayed through WidgetSprite

 

The main viewport with state2 looks good.

WidgetSprite shows parent ObjectMeshSkinned in state1(as excepted) but controlled children rendered in state2(not excepted - wrong)

Link to comment

by the way, i`ve tried to use engine.render.renderImage2D() & found the same behavior.

& also found what WidgetSpriteViewport.renderImage is little bit faster than renderImage2D.

what about any other more faster solutions? (except making clone of objects & working through WidgetSpriteViewport with viewport masks instead of sprite.)

The best way is to make WidgetSpriteViewport working "on demand"

 

 

init

call WidgetSpriteViewport::setManualUpdate(1);

 

update

1. setup state1

2. call WidgetSpriteViewport::manualUpdate() - updates inner framebuffer image in vram without coping image into ram & back to vram (how probably works soution with images & sprites)

3. setup state2

4. profit

Link to comment

Hi Sergey,

 

The actual problem is that beard_goat_wide_0 transformation calculated only once (in state1) and used later in state2. We slighltly modified your code to update beard separately for each state. Please, check the attached viewport_skinned.cpp.

 

Unfortunately, Controlled option is now ignored, and you can even uncheck it inside the editor.

 

Thanks!

 

viewport_skinned.zip

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...