tunnel
Blitz3D Forums/Blitz3D Beginners Area/tunnel
| ||
Hello folks! Im new to this and thougt I learn by doing easy demoeffects in the beginning. Now I thought I give it a go by trying to make a classic tunnel. Without using the 3dengine ofcourse :) So if you know any tutorials to make easy tunnels that would be very appreciated. Goal one: Travel through a straight tunnel in the middle. Goal two: Make the tunnel bend when traveling trough in the middle. Goal three: Move away from the center of the tunnel with the camera and spin around when traveling through the tunnel. Or is this maby a stupid thing to try to do in the beginning? |
| ||
If you want to create a mesh in code, you'll need to create an empty mesh. Then add a surface to this mesh. A surface is a collection of vertices (3d points) and triangles between these vertices (faces). Each surface can have a brush applied to it. A brush is a material than can contain one or more textures. 1. Create an empty mesh mesh = CreateMesh() 2. Add a surface to this mesh surf = CreateSurface(mesh) 3. Add vertices to surface v0 = AddVertex(surf, -1, 1, 0) ;returns index of new vertex v1 = AddVertex(surf, 1, 1, 0) ;returns index of new vertex v2 = AddVertex(surf, 1, -1, 0) ;returns index of new vertex 4. Add a triangle to surface AddTriangle surf, v0, v1, v2 ;use indices to create triangle A more extensive example of these commands can be found in the 'flag' demo, in the samples folder. |
| ||
I want it as basic as possible in the beginning. No surfaces or such, just a tunnel made out of dots if possible. |
| ||
Wait, are we talking about a 2D or a 3D tunnel ? |
| ||
2D tunnel. Mabye I should post this thread on the blitz max forum even if I use blitz 3d? |
| ||
No, this is the right forum for Blitz3D related beginner's issues. The BlitzMax forums are only for BlitzMax stuff. I'd suggest having a look through the code archives. You may find something useful in there. |
| ||
Ok, thanks Ill do that |
| ||
There's this here: http://www.blitzbasic.com/codearcs/codearcs.php?code=734 |
| ||
Right on the money, thanks man. :) |