Dieterich Posted September 19, 2018 Share Posted September 19, 2018 Basically I try to edit the top of the cylinder in vertices, giving impression that there is grain in a storage unit. I have this: https://www.babylonjs-playground.com/#CRJEN8#3 I look for the result only of the grain as shown in the attached image: Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 19, 2018 Share Posted September 19, 2018 Hello and welcome to the forum, I do not quite get the issue you are facing, in your playground, you are not calling the edit function. Could please provide a tiny bit more info ? Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 19, 2018 Author Share Posted September 19, 2018 Hi! thanks! I have used the function EditMesh for tests... I don't know how I can do to create rings with vertices at the top, to create an elevation impression of grain in my units... what can I do? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 19, 2018 Share Posted September 19, 2018 Calling on @Pryme8 and @jerome who are amazing at creating procedural geometry ? Quote Link to comment Share on other sites More sharing options...
jerome Posted September 19, 2018 Share Posted September 19, 2018 no time for me now (later), but the answer is to create a tube with variable radius along its path Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 19, 2018 Share Posted September 19, 2018 I’m confused as to what the goal is. A ring that shows the height of the grain in be silo? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 19, 2018 Share Posted September 19, 2018 Ohhh I got you, I miss read the post! I am out of town at the moment, give me to this evening if I remember when I get to the hotel then I got you. This is actually really easy! You would use an updatable disc and a cylinder to accomplish this I would imagine. Sebavan 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 19, 2018 Author Share Posted September 19, 2018 Well, I decided to try to start with 'tube' and 'path' but I was not successful, because the basics for you guys is a lot for me. ?? (I'm a beginner, sorry). OBS: I try to solve only the level of the grain with different reliefs See: http://www.babylonjs-playground.com/#MYAL6U#2 Quote Link to comment Share on other sites More sharing options...
jerome Posted September 19, 2018 Share Posted September 19, 2018 http://www.babylonjs-playground.com/#MYAL6U#4 just use a radiusFunction to set the radius according to the current tube step http://doc.babylonjs.com/api/classes/babylon.meshbuilder#createtube http://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#tube Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 19, 2018 Author Share Posted September 19, 2018 Great @jerome! but how update one side of level? as shown in the attached my image. Quote Link to comment Share on other sites More sharing options...
jerome Posted September 20, 2018 Share Posted September 20, 2018 quik and dirty : http://www.babylonjs-playground.com/#MYAL6U#8 just change the tube internal path coordinates on the wanted steps. Said differently, don't make a straight path but a curved one in the upper part Sebavan and Dieterich 1 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 21, 2018 Author Share Posted September 21, 2018 Hi @jerome there is another way to update one side without tilting the top? Quote Link to comment Share on other sites More sharing options...
jerome Posted September 21, 2018 Share Posted September 21, 2018 As I said, you could do a curved path in the upper part http://www.babylonjs-playground.com/#MYAL6U#10 and you could also add as many steps as you need on the lower part, not necessarily all aligned together, just make some tests to get the wanted shape this one reminds me something but I can't tell what : http://www.babylonjs-playground.com/#MYAL6U#11 Dieterich and JohnK 2 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 21, 2018 Author Share Posted September 21, 2018 @jerome I thank you all the time for your dedication to helping me. creative answer #11, ?? well, we're almost reaching for what I really need. It may be difficult for me to express myself here, but in fact I need to use different levels that go up and down at different points in an arc/radius see the image below: red dot = N cables circle Blue = N arcs line gray = Surface that can go up/down depending on the product level I do not know if there is a slightly different shape instead of curves? tanx dude! Quote Link to comment Share on other sites More sharing options...
JohnK Posted September 23, 2018 Share Posted September 23, 2018 @Dieterich a belated welcome to the forum from me. I think I am right in saying that you will only ever get a pointed top to the grain using a tube because the cap uses a barycenter. Using a bezier surface you can get a more curved top, however the issue is that you cannot get a true circle with a bezier surface. In the following PG the boundary control points are fixed to form an approximate circle lying on a sloping plane. The central control points, indexes 1, 1, 1, 2, 2, 1, 2, 2 are changed in an animation to show the different types of top you could get. The equation to vary the inner control points is not the only one to use on these points. Hope this is of use https://www.babylonjs-playground.com/#KT9EE7#7 jerome and Dieterich 1 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 24, 2018 Share Posted September 24, 2018 Did this get solved yet? If not I got you tommrow. Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 24, 2018 Author Share Posted September 24, 2018 Well, I'm impressed with all answer's. Each made me learn something about the Babylon.js, and getting closer and closer to what I need. @JohnK how up and down the center point? and how create more points? I have only this points controls[1][1].y = 6; controls[1][2].y = 6; controls[2][1].y = 7; controls[2][2].y = 7; @Pryme8 I have not clarified my doubts yet. thank you so much Quote Link to comment Share on other sites More sharing options...
JohnK Posted September 24, 2018 Share Posted September 24, 2018 30 minutes ago, Dieterich said: how up and down the center point? and how create more points? A bezier surface only has 16 control points https://en.m.wikipedia.org/wiki/Bézier_surface https://www.babylonjs-playground.com/#KT9EE7#3 This was an idea for the grain a tube is still best for the silo. Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 24, 2018 Author Share Posted September 24, 2018 I understand. One last question, I'm now trying to adjust the bezier angle, is there any parameter to this? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 24, 2018 Share Posted September 24, 2018 Does it need to be Dynamic or Static? Are you going to be doing hit tests on it or can I displace it in the shader? Dieterich 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted September 24, 2018 Share Posted September 24, 2018 2 hours ago, Dieterich said: I understand. One last question, I'm now trying to adjust the bezier angle, is there any parameter to this? Sorry which angle do you mean? Dieterich 1 Quote Link to comment Share on other sites More sharing options...
Dieterich Posted September 24, 2018 Author Share Posted September 24, 2018 @Pryme8 can be static. @JohnK I would like to reduce the smoothness of the curve, more precisely it should be closer to 27 ° (you do not have to be right at this angle), I subtract the 'divisions' but this reduce surfaces. Quote Link to comment Share on other sites More sharing options...
JohnK Posted September 24, 2018 Share Posted September 24, 2018 The point of a bezier surface is to produce smooth surfaces, so this is probably as pointy as it gets https://www.babylonjs-playground.com/#KT9EE7#15 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 24, 2018 Share Posted September 24, 2018 If it can be static, then honestly I would raymarch that.... but the hacky way will be to do it with geometry displacement from a texture like I started working on here: https://playground.babylonjs.com/#GZ91H2 or use @JohnK's method JohnK 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 24, 2018 Share Posted September 24, 2018 Another method you could use is make a heightmap Ground, and then use CSG to make it a circle then tube. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.