|
Post by scalion on Dec 26, 2023 12:04:26 GMT 1
Hi all, Happy Christmas !
I wrote this program to produce specific shape for a board game project.
The principle is to manipulate basic shapes to perform triangulations. The result can then be exported into an STL file which must then be edited with good 3D printing software (I use UltiMaker CURA). So it is in the code that we create the part with specific procedures (STL_SPHERE, STL_BOX, STL_CYLINDER, Etc...). However this kind of thing is already possible with online software such as TinkerCad which I use and which is powerful. But where it is interesting is for the creation of more complicated shapes (helicoids and the like), see the STL_SpecialShape1 procedure in this example. As you can see it works quite well and is very practical for making complex shapes.
|
|
|
Post by scalion on Dec 26, 2023 12:08:00 GMT 1
This is how the part appears after slicing in Ultimaker CURA :
|
|
|
Post by (X) on Dec 26, 2023 15:48:59 GMT 1
I added a short video to highlight this thread.
Please 'Like' and 'Subscribe' for more GFA-BASIC 32 for Windows promotional videos. We're only getting started!
|
|
|
Post by (X) on Dec 26, 2023 21:09:14 GMT 1
Can you believe I bought a 3D printer about 2 years ago and the only thing I printed was the demo???!!!
I had so many things I thought I wanted to print but I have not gotten around to printing my "Star Trek Commmunicator" yet!
I had also contemplated incorporating a tilt and pan mechanism for my camera or smartphone. However, the expected profusion of 3D models didn't materialize although it keeps improving. I am not giving up. I just didn't dive in head first yet.
|
|
|
Post by scalion on Dec 26, 2023 21:34:36 GMT 1
Ton star-treck comunicator je le kiffe !!! Tu sors ça et tu dis "Spoke à inter, prêt pour la téléportation !!!".
Il faut être patient avec une imprimante 3D, toujours prendre le temps de la calibrer correctement, et de faire des petits essais. C'est très pratique pour se faire des boitiers en général (montages arduino et cie).
|
|
|
Post by scalion on Jan 10, 2024 12:30:33 GMT 1
J'ai apporté quelques modifications, notamment au niveau de la manipulation de la vue qui est maintenant correcte, j'ai enfin réussi à manipuler une vraie matrice 3D, pfff.... pas facile. J'ai ajouté aussi quelques fonctions de création de forme (que j'ai mis en exemple dans le code). Voilà pour l'instant
US : I made some modifications, notably regarding the manipulation of the view which is now correct, I finally managed to manipulate a real 3D matrix, pfff.... not easy. I also added some shape creation functions (which I put as an example in the code). That's it for now.
|
|
|
Post by (X) on Jan 10, 2024 12:35:36 GMT 1
Bravo scalion. C'est de toute beautée!
Alors pour les non-initiés, OpenGL, ça ajouterait les textures, ombrages, réflections et autres?
Bravo scalion. It's a thing of beauty!
So for the uninitiated, OpenGL would add textures, shadows, reflections and more?
BTW: It was a good idea to mention in your disclaimer: "If your keyboard runs away or your computer screen disappears in a parallel world, I have nothing to do with it." :)
|
|
|
Post by scalion on Jan 10, 2024 13:22:43 GMT 1
Bravo scalion. C'est de toute beautée!
Alors pour les non iniciés, OpenGL, ça ajouterait les textures, ombrages, réflections et autres?
Bravo scalion. It's a thing of beauty!
So for the uninitiated, OpenGL would add textures, shadows, reflections and more?
BTW: It was a good idea to mention in your disclaimer: "If your keyboard runs away or your computer screen disappears in a parallel world, I have nothing to do with it." Merci ! Alors pour répondre à ta question : non, Opengl ajouterai uniquement l'éclairage avec des surfaces pleines et un rendu plus rapide. Ombrages et réflections sont des techniques que je ne maitrise pas encore malheureusement (ni le bump-maping d'ailleurs, et ça j'aimerais vraiment y arriver).
US : THANKS ! So to answer your question: no, Opengl will only add lighting with full surfaces and faster rendering. Shading and reflections are techniques that I have not yet mastered unfortunately (nor bump-mapping for that matter, and I would really like to get there).
|
|
|
Post by Roger Cabo on Jan 10, 2024 18:16:47 GMT 1
Another interesting point would be smoothing groups. Fortunately smoothing groups are provided by OBJ and but !not! for STL. But the OBJ format is easy for the basic elements. But unfortunately the "s" info in the OBJ tells not really how to use in opengl environment and pass them into the VBO. There is a websites with some nebular info about. community.khronos.org/t/how-do-i-use-smoothing-groups-from-obj-files/73070 From what I read you must create a normal vertex buffer like the VBO and pass a shader to opengl. Then it also possible to add texture and Specular and all other effects by shaders. Shaders it self are really easy.. but compiling and pass the correct format into opengl is special. I would love to have the ability to add smoothing groups and perhaps some textures. Special properties like Specular and would be great. Normals and Textures would be also fine.. but this requires also importing UV maps also. But for sure that a lot work..
|
|
|
Post by (X) on Jan 10, 2024 19:26:41 GMT 1
This OpenGL demo by P. Heinzig shows about 10 OpenGL demos...
|
|
|
Post by scalion on Jan 13, 2024 22:32:13 GMT 1
I implemented OpenGL and that is very fastest !!!
Note i discovered how to get opengl matrix to modify it manually and reload in GPU, see source.
|
|
|
Post by (X) on Jan 14, 2024 1:06:10 GMT 1
Essaie tu d'enlever la job à Tony Stark?! Qui aurait dit que du BASIC aurait autant de vitesse graphique? C'est époustouflant!
Watch out Tony! Scalion might be trying to take your job! Who would have thought that BASIC could have so much graphic speed? It's breathtaking!
|
|
|
Post by (X) on Jan 14, 2024 1:18:00 GMT 1
Je joues avec les effets lumières de OpenGL... Grâce aux IA tels que BING et ChatGPT... Ça progress tellement plus rapidement! Playing with OpenGL lighting effects... Thanks to AIs like BING and ChatGPT... Progress is so much faster! Ich spiele mit den Lichteffekten von OpenGL ... Dank KIs wie BING und ChatGPT... Das geht so viel schneller!
|
|
|
Post by scalion on Jan 14, 2024 11:49:20 GMT 1
Essaie tu d'enlever la job à Tony Stark?! Qui aurait dit que du BASIC aurait autant de vitesse graphique? C'est époustouflant!
Watch out Tony! Scalion might be trying to take your job! Who would have thought that BASIC could have so much graphic speed? It's breathtaking!
Il me faudrait l'imprimante 3D de la NASA qui utilise du métal en fusion !
Je la veux !
|
|
|
Post by (X) on Jan 14, 2024 12:03:26 GMT 1
|
|
|
Post by (X) on Jan 14, 2024 13:08:32 GMT 1
|
|
|
Post by (X) on Jan 14, 2024 17:04:24 GMT 1
Bon! 31 videos plustard et ça me fais penser comment fou on doit être pour s'aventurer dans de tels territoires! Je suppose que c'est un cas de: "la fin qui justifie les moyens"! Il reste à voir si ça m'a aidé pour GB32...
Well! 31 videos later and it makes me think how crazy you must be to venture into such territory! I suppose it's a case of "the end justifying the means"! It remains to be seen if it helped me with GB32...
Ich habe mir überlegt, wie verrückt man sein muss, um sich in solche Gebiete vorzuwagen. Ich denke, das ist ein Fall von "der Zweck heiligt die Mittel"! Es bleibt abzuwarten, ob es mir bei GB32 geholfen hat...
|
|
|
Post by Roger Cabo on Jan 14, 2024 23:23:31 GMT 1
I implemented OpenGL and that is very fastest !!!
Note i discovered how to get opengl matrix to modify it manually and reload in GPU, see source.
Very nice stuff!!!Did you have a camera frustum to eliminate stuff is outside of the screen? or Cam.far and Cam.near?
|
|
|
Post by scalion on Jan 15, 2024 18:08:10 GMT 1
Hi all, I implemented STL_TORUS and STL_Distortion_Rotate. I also add lighting but the specular light not appear correctly. Hope somebody have an idea ?
Here he source : STL basic creation.G32 (51.52 KB)
|
|
|
Post by scalion on Jan 15, 2024 18:45:35 GMT 1
I implemented OpenGL and that is very fastest !!!
Note i discovered how to get opengl matrix to modify it manually and reload in GPU, see source.
Very nice stuff!!!Did you have a camera frustum to eliminate stuff is outside of the screen? or Cam.far and Cam.near?
Yes it's possible, i suppose you want test an (x,y,z) point if appear in the screen ? There's multiple ways.
|
|
|
Post by Roger Cabo on Jan 15, 2024 20:02:57 GMT 1
Hi all, I implemented STL_TORUS and STL_Distortion_Rotate. I also add lighting but the specular light not appear correctly. Hope somebody have an idea ?
Here he source : View AttachmentI understand specular in terms of :how it happens and what it does and and should look. But I do not have the math acknowledge.. Does the specular comes from the OpenGL-Renderer?
From the image it looks like you have a light and ambient (sky lightning) enabled. Or seems to be a second light in blue-ish. Start with 1 light + specular and a flatten quad on ground.
Normaly in the easy way, specular is a disk texture that will be blured. And will be add like reflection by vectors to the light position from the surface position normals.
|
|
|
Post by (X) on Jan 15, 2024 20:48:11 GMT 1
Hi all, I implemented STL_TORUS and STL_Distortion_Rotate. I also add lighting but the specular light not appear correctly. Hope somebody have an idea ?
Here he source : View AttachmentTry changing w param of light source to 0 (directional)
|
|