# How to know the mesh has been rendered complete When I want to screenshot?

**URL:** <https://forum.babylonjs.com/t/how-to-know-the-mesh-has-been-rendered-complete-when-i-want-to-screenshot/46189>\
**Category:** Questions\
**Created:** [December 5, 2023, 9:47am UTC](https://forum.babylonjs.com/t/how-to-know-the-mesh-has-been-rendered-complete-when-i-want-to-screenshot/46189 "2023-12-05T09:47:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaopangoo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/xiaopangoo/32/23507_2.png) [@xiaopangoo](https://forum.babylonjs.com/u/xiaopangoo)\
**Post date:** [December 5, 2023, 9:47am UTC](https://forum.babylonjs.com/t/how-to-know-the-mesh-has-been-rendered-complete-when-i-want-to-screenshot/46189/1 "2023-12-05T09:47:00Z")

</div>

I want to load new babylon file in my project and get preview of this model as sprite.  
So I load the babylon file and then create a new camera in my project, the camera and babylon file have the same layerMask and then use BABYLON.Tools.CreateScreenshotUsingRenderTarget to get the preview of the loaded model.  
But I can’t know when to use BABYLON.Tools.CreateScreenshotUsingRenderTarget because i don’t know when the model of babylon file has been rendered complete. The preview will be incomplete.

I have tried use node.isReady(true), but it don’t work.  
Is there any other method to know the model has been rendered complete?

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [December 5, 2023, 10:21am UTC](https://forum.babylonjs.com/t/how-to-know-the-mesh-has-been-rendered-complete-when-i-want-to-screenshot/46189/2 "2023-12-05T10:21:01Z")

</div>

You may try to use `scene.executeWhenReady()` with the parameter `checkRenderTargets = true`  
Docs - [Scene | Babylon.js Documentation](https://doc.babylonjs.com/typedoc/classes/BABYLON.Scene#executeWhenReady)

---

<div class="post-metadata">

**Author:** ![xiaopangoo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/xiaopangoo/32/23507_2.png) [@xiaopangoo](https://forum.babylonjs.com/u/xiaopangoo)\
**Post date:** [December 5, 2023, 10:44am UTC](https://forum.babylonjs.com/t/how-to-know-the-mesh-has-been-rendered-complete-when-i-want-to-screenshot/46189/3 "2023-12-05T10:44:12Z")

</div>

I tried scene.executeWhenReady() but this function don’t be called. I found the scene.isReady(true) is false all the time. It’s strange.

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [December 5, 2023, 10:52am UTC](https://forum.babylonjs.com/t/how-to-know-the-mesh-has-been-rendered-complete-when-i-want-to-screenshot/46189/4 "2023-12-05T10:52:32Z")

</div>

The small [Playground](https://playground.babylonjs.com/) with your example would greatly help to solve your problem.

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [December 5, 2023, 11:32am UTC](https://forum.babylonjs.com/t/how-to-know-the-mesh-has-been-rendered-complete-when-i-want-to-screenshot/46189/5 "2023-12-05T11:32:40Z")

</div>

Here is the small example (working with WebGPU as well) - [https://playground.babylonjs.com/#0H83E8#23](https://playground.babylonjs.com/#0H83E8#23)

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [January 3, 2024, 3:18pm UTC](https://forum.babylonjs.com/t/how-to-know-the-mesh-has-been-rendered-complete-when-i-want-to-screenshot/46189/6 "2024-01-03T15:18:32Z")

</div>

Hello @xiaopangoo just checking in if your problem was solved?
