# When i use stencil to make ground geometry ,it's child doesnt work

**URL:** https://discourse.threejs.org/t/when-i-use-stencil-to-make-ground-geometry-its-child-doesnt-work/80697
**Category:** Questions
**Tags:** stencil
**Created:** [April 4, 2025, 7:24am UTC](https://discourse.threejs.org/t/when-i-use-stencil-to-make-ground-geometry-its-child-doesnt-work/80697 "2025-04-04T07:24:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fengfengmomo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fengfengmomo/32/49882_2.png) [@fengfengmomo](https://discourse.threejs.org/u/fengfengmomo)
#### Post date: [April 4, 2025, 7:24am UTC](https://discourse.threejs.org/t/when-i-use-stencil-to-make-ground-geometry-its-child-doesnt-work/80697/1 "2025-04-04T07:24:33Z")

</div>

when i use stencil to make ground geometry, forexample when plane is six level, it work, but when i zoom into seven level , it disapper some piece, and seven level is produce dynamic and is child of six level

 ![屏幕截图 2025-04-04 151830](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/9/1/9125f029bc7bb954b58e5b65b62698a112eb7f98.png)  
 ![屏幕截图 2025-04-04 151803](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/8/b/8b0e9e73f9a416ede41a8e4e5695ebb700549a4f.jpeg)

and i try to remake question as fllow , but i cant, please help,  
[贴地图，模板测试实现](https://codepen.io/FengFengmomo/pen/dyBKeGR?editors=0011)

---

<div class="post-metadata">

### Author: ![fengfengmomo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fengfengmomo/32/49882_2.png) [@fengfengmomo](https://discourse.threejs.org/u/fengfengmomo)
#### Post date: [April 4, 2025, 7:29am UTC](https://discourse.threejs.org/t/when-i-use-stencil-to-make-ground-geometry-its-child-doesnt-work/80697/2 "2025-04-04T07:29:35Z")

</div>

my webgl config is like below:  
this.renderer = new WebGLRenderer({  
canvas: this.canvas,  
antialias: true,  
alpha: true,  
logarithmicDepthBuffer: true,  
precision: “highp”,  
stencil: true,  
});  
this.renderer.sortObjects = true;  
this.renderer.setPixelRatio(window.devicePixelRatio);  
this.renderer.setClearColor(0xFFFFFF, 0.0);  
this.renderer.autoClearStencil = false;  
animate(){  
this.animateId = requestAnimationFrame(this.animate.bind(this));  
this.stats.update();  
this.renderer.clearStencil(1,1,1);  
if(this.base){  
this.controls.update();  
}  
if (this.base){  
TWEEN.update();  
}  
for(let runtime of this.tilesRuntimeS){  
const dt = this.clock.getDelta();  
runtime.update(dt, this.camera);  
}  
if (Config.outLine.on){  
this.effectOutline.render(); // 合成器渲染  
} else {  
this.renderer.autoClear = true;  
this.renderer.render(this.scene, this.camera);  
}  
}

---

<div class="post-metadata">

### Author: ![fengfengmomo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fengfengmomo/32/49882_2.png) [@fengfengmomo](https://discourse.threejs.org/u/fengfengmomo)
#### Post date: [April 4, 2025, 7:33am UTC](https://discourse.threejs.org/t/when-i-use-stencil-to-make-ground-geometry-its-child-doesnt-work/80697/3 "2025-04-04T07:33:00Z")

</div>

and the geometry in picure is a planeGeometry, and it’s struct is a Quad-Tree
