Anyone have any ideas for drawing grids in 3d fast?
Grids in 3d?
Blitz3D Forums/Blitz3D Programming/Grids in 3d? Could you be more specific than "grid?" In 2D that word is fairly self-explanatory (draw lines of pixels into a grid shape,) but in 3D "grid" could be many things.
Repeat a masked gridtexture on a plane?
Why the hell did I read "Girls in 3d"?
Kungfista: You're not the only one...
Shattered: I'd suggest quads that stretch (and overlap, naturally) setup so that have no culling. You could very easily write a function to do that.. I can post one later maybe.
Shattered: I'd suggest quads that stretch (and overlap, naturally) setup so that have no culling. You could very easily write a function to do that.. I can post one later maybe.
Kungfista: Same here X_X, maybe we red what we would've liked to read..
As I said, I could post one.
;;;;;;;;;;;EXAMPLE Graphics3D 800,600,32,2 C = CreateCamera() Grid = CreateGrid(8,32,.5) Repeat If KeyHit(1) Then : ClearWorld : End : EndIf MoveEntity C,0,0,Float(KeyDown(2)-KeyDown(3))/2 Pan# = Pan# - Float(MouseXSpeed())/3 Tilt# = Tilt# + Float(MouseYSpeed())/3 MoveMouse GraphicsWidth()/2,GraphicsHeight()/2 RotateEntity C,Tilt,Pan,0 UpdateWorld RenderWorld Flip False Forever ;;;;;;;;;;;;CREATEGRID Function CreateGrid(GridSize%,Segments%=10,LineWidth#=.1) M = CreateMesh() Surf = CreateSurface(M) GridSize = Abs(GridSize) Segments = Abs(Segments) N# = -(GridSize*Segments)+GridSize/2 While N < GridSize*Segments V = AddVertex(Surf,N,0,GridSize*Segments) AddVertex(Surf,N+LineWidth#,0,GridSize*Segments) AddVertex(Surf,N+LineWidth#,0,-GridSize*Segments) AddVertex(Surf,N,0,-GridSize*Segments) AddTriangle Surf,V,V+1,V+2 AddTriangle Surf,V+2,V+3,V N = N + GridSize Wend N# = -(GridSize*Segments)+GridSize/2 While N < GridSize*Segments V = AddVertex(Surf,GridSize*Segments,0,N) AddVertex(Surf,GridSize*Segments,0,N+LineWidth#) AddVertex(Surf,-GridSize*Segments,0,N+LineWidth#) AddVertex(Surf,-GridSize*Segments,0,N) AddTriangle Surf,V,V+1,V+2 AddTriangle Surf,V+2,V+3,V N = N + GridSize Wend UpdateNormals M EntityFX M,16 Return M End Function
If you should happen to need a GUI system at the same time, I think you can do 3d grids using Chris Fuller's 'F-UI'.
EDIT: Just realised from another thread that you probably knew that already...
EDIT: Just realised from another thread that you probably knew that already...