I’ll prefix this by saying that I am pretty new to Babylon and 3D modeling so please feel free to direct me to further reading as I’m sure this has been covered before.
I have been playing around with the node geometry and have a stylistic planet model which can be viewed here.
My first questions is about line 142, when uncommented it creates an error and I’m not 100% sure where I am going wrong as it works in NGE without issue.
seg.output.connectTo(ground.segments);
My second is about the white to black gradient I have, I was hoping to get a smooth increase from white to black as the height increases which I can then to link through to a node material later, however I’m struggling to map this correctly as most examples I have seen online work with a flat plane.
It looks like the output of seg is of type geometry, while the input of segments should be an int, so it’s weird they work on NGE at all… do you have the link to the material in NGE itself?
About your second question, I’ll ping @PatrickRyan who is an expert in Node Geometry
I used the generate code button on NGE itself, perhaps this is where the issue lies as when I saved as JSON and used the JSON parse to create the node geometry it worked as expected.
I created a playground with the node geometry loading from JSON here:
Oh, I was mistaken, I’m sorry! I had taken GeometryInputBlock to mean the output is a geometry, but this is the general input block, so it should be connecting with the segments input. Let me investigate further.
I see what’s happening There’s an issue with automatic type detection when connecting the blocks, it goes away if you explicitly define the type of seg: Planet Height. | Babylon.js Playground (babylonjs.com). I’ll work on a fix for the auto detection too.