sergey.pozhidaev Posted August 7, 2014 Share Posted August 7, 2014 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
silent Posted August 8, 2014 Share Posted August 8, 2014 Hi Sergey, Could you please share with us your scene? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
sergey.pozhidaev Posted August 8, 2014 Author Share Posted August 8, 2014 here is an example. Projects.zip Link to comment
silent Posted August 8, 2014 Share Posted August 8, 2014 At the first glance it really looks like a bug. I will pass this information to the developers. Thank you for the test scene! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
sergey.pozhidaev Posted August 9, 2014 Author Share Posted August 9, 2014 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
silent Posted August 11, 2014 Share Posted August 11, 2014 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts