3D Vector Engine
Community Forums/Showcase/3D Vector Engine
| ||
Started work on a 3D vector graphics engine yesterday for an game Im planning. It used the Draw3D lib, and JV-Ode for physics. Still a bit more to do, but I think the basics are there. Would be interested to hear how it runs on different machines. Im currently getting over 200 FPS with 50 objects. You can view it in action here... http://www.youtube.com/watch?v=S_vJeAvw_LY Or download a demo here. http://www.urbaninteractive.net/VextorVision2.zip Does anyone know of a vector text engine, or can suggest a quick way of doing? Cheers Unc |
| ||
that's pretty cool, what type of game you planning to make? |
| ||
Im not 100% sure yet. Battlezone type game would be the obvious choice. Still need to figure out a few things. |
| ||
a "red baron"-ish game would be really cool! |
| ||
Shouldn't you use OpenGL wireframe instead? |
| ||
Shouldn't you use OpenGL wireframe instead? This is written in Blitz3D, not BMax. Even though I own BMax, I still find B3D much quicker to develop stuff in. |
| ||
I wrote this about 4 years ago: http://www.blitzbasic.com/codearcs/codearcs.php?code=1184 I use it extensively in the iRoids game I wrote, that also uses vector text :) ![]() |
| ||
brilliant stuff :) |
| ||
Indiepath, I remember your game well. I loved the thing you did with the screen background, and the over feel of the game. Would you be really annoyed if I did something similar? |
| ||
Very cool! A few things here and there (mostly tanks) seem to be vibrating when they should be still. The nature of JVODE perhaps? |
| ||
A few things here and there (mostly tanks) seem to be vibrating when they should be still. The nature of JVODE perhaps? I could be wrong here but having written a very similar library myself I have a feeling this might be caused by using integers instead of floats to define the ends of the lines. If I remember correctly, you can use floats with Draw3D's line functions which may fix this issue. That's pretty good going for a couple of days work. Edit - I've noticed that the ends of the lines don't quite join up correctly, possibly for the same reason? |
| ||
Hi Joe, I was definitely inspired by your demo. Thanks for the tips on using floats, and it was the main reason for the lines not aways meeting up. Thanks to you I learnt something new today. I use CameraProject to get the position of the vertexs relative to the camera, and I always thought this returned integers, but it actually returns floats :) This coupled with Draw3D using floats now means I can connect the points more accurately. One of the other reasons for the lines not meeting up 100% is the because I was a couple of pixels out when grabing my texture (Especially on the yellow lines). I think I have got it almost right now, and have updated the demo (link updated in the top post). I also spent a little time on adding a Z Buffer sort routine. It now draws the object in order with the closest object being the last to be drawn. The tanks jittering is caused by JV-ODE I think. To be honest Im new to use JV-ODE, so haven't really got to the bottom of it yet. Shouldn't be too hard to fix though. Thanks for the tips Joe. Next, Im going work on getting the vector text working. |
| ||
No problem - I'm glad I could help. If you want to e-mail me with any other difficulties you run into, feel free. As for my own vector/edge-rendering library, I think its about time I posted a progress report. However rather than hijack your thread I've started a new one here: http://www.blitzbasic.com/Community/posts.php?topic=76960 |
| ||
Thanks to the help of JoeGr ,Stevie G, and Sswifts code archives, I've managed to now come up with a simple hidden face routine for my vector engine. As I say its only simple, but its enough for my plans (you can see through the objects, but all back faces vectors are hidden). I've update the demo to show the render modes now available. http://www.urbaninteractive.net/VextorVisionDemo2.zip You can adjust the thickness of the vectors by using the +/- keys on the numbers keypad. |
| ||
It runs fine here - nice but very dodgy physics ;) |
| ||
Runs fine here too, 100 objects with steady 62FPS :) nice but very dodgy physics ;) Ahem, dodgy physics setup ;) Uncle, pop into the JV-ODE thread if you need any assistance with those jitters, I'll be glad to help. Looks like twitchy TriMeshes to me :) |
| ||
Ahem, dodgy physics setup ;) Yep, this is exactly what it is :) To be honest I just slapped the physics in just to get the objects moving to test the renderer. Now thats working ok, I will concentrate on making the physics a little more realistic. VIP3R, I do have a question about some of the set up, but I will pop it in the JV-ODE thread. |