ADT-atop-cone oddness + Xmas tree fun

Hi gang.

I’m goofing around with a playground: https://www.babylonjs-playground.com/#YSEICS#1
( Cone elevated above ground… ODD version: https://www.babylonjs-playground.com/#YSEICS#2)

GUI 2d mapped onto cone, with single Ellipse Control (called e1)… and I’m X-animating its position within the ADT… using e1.leftInPixels.

Notice that the ellipse is sort-of partially blocked as it passes across the camera-side of the cone.

Now pan camera until you are in over-head view. Notice that ellipse looks good as it animates. No blocking of view (other than the animation loop-back point, expected).

For some reason… when viewing the ellipse animation from the “front”, ellipse gets “culled” as it passes camera-side of cone. By default, cam beta is 1.18. Values of 1.0 and lower… ellipse stays in view. Value of 1.3, and ellipse almost completely disappears as it passes cam-side.

Something depth-sorty or texture-mappy is happening here. Anyone wanna help? Feel free to put a clue inside a snowball, and throw it at my head. (thx!)

Is that from the UV map?

I think you might have to draw a secondary circle that starts the process over as the other one is going off the UV 0-1 range.

This is just a guess though from a quick look on my phone.

Hi P8, thx for response. I think you are talking-about the anim loop-back point on right side of mesh (+x side), which is expected and you are correct about its cause. But, that is not the problem I seek solving.

I want to eliminate the partial blocking that happens on the -z side… the side of the mesh that faces the camera. The problem/anomaly is affected by camera.beta. The problem is seen as the ellipse travels from right side of mesh… to left side of mesh.

Again, the thing happening on right side of mesh… expected and not a problem. Partial blocking that happens as ellipse moves from right side to left side… that is what I want to eliminate. thx.

It seems that the -z-side ellipse blocking… is somehow related to the cone’s end-cap. The blocked portions of the ellipse (seen the entire time ellipse travels from right-to-left)… seems to follow the curvature of the back-side (+z) of the cone’s cap.

I guess, while I study the problems with GUI 2d xmas trees… we better light-up a particle-based tree.

https://playground.babylonjs.com/#1PQT7P#39

Custom update function for sparkly particles (sparticles) is active… and a fancy coneEmitter. Random sub-cone tilting… all sorts of fancy knobs and switches are used, here.

Line 49 of the custom updater… is the trail-head to doing some colors of your own. For example, only blue and white lights would be pretty, eh? Might as well make this the “decorate your own tree” thread.

What’s that you say? Turn-on the twin garland-spinners, too? Ok fine… here. Sort of looks like Las Vegas… vomited on a pine tree, after eating too many fireflies. :smiley:

Like an LED factory explosion. :slight_smile:

4 Likes

https://playground.babylonjs.com/#1PQT7P#44 In this one, I set line 141 of the sparkle-particles PS1… to coneEmitter.radiusRange = .3. Notice that this keeps particles from being emitted in the center of the tree… and being wasted (because they are blocked from view).

If you look at the bottom of the tree, now, you can see that the coneEmitter’s particles are emitted at the outer edges of the cone/limbs, and none are emitted down the center-line (good). This allowed me to reduce the emitRate to HALF the previous rate, improving performance.

NICE! The coneEmitter.radiusRange feature is perfectly suited for xmas trees, eh? Hi-5 to the author of coneEmitters, whomever that be! Bottomless glass of rum-fortified egg-nog for you. :slight_smile:

I am out of town or I’d be more helpful sorry buddy.

Thanks for the mission-critical status report, P8. :wink:

Making xmas tree ornamments and lights from GUI 2D ellipses… is pretty much a ridiculous idea from the get-go… so, no losses. Just Wingnut… using the wrong tools for the wrong jobs… lovin’ it.

You went “up north” with a bunch of other BJS coders, dincha? You’re codin’ AI sleighs at the North Pole again, right? nog. They still using Yuletide? It’s a pretty good programming language… really.

Short season, but gooooood money for contract Yuletide coders and Reindeer nutcrackers, for sure. :slight_smile:

@Wingnut Sorry i’m just playing with yours Christmas tree. Added snow :wink:
https://www.babylonjs-playground.com/#2HWY8A

3 Likes

Haha yeah, tiss the season!

I’ll have a Tom and Jerry with some extra rum in your name!

1 Like