- Home /
How to create Vectrex(Vector) look in games ?
Hi all,
I wonder if its possible to create Vectrex(Vector) look-alike games like "Vector Tanks" (see Youtube: http://www.youtube.com/watch?v=sza2ke2TEnM) with built-in tools in Unity ... I tried to paint the edges in my UV maps which looks crappy and I dont think that the Edge Detection FX in Unity Pro solves the problem.
So maybe one of you can tell me if & how the meshes must be prepared in a 3D program or/and if & how it can be done by code/tools/whatever (beside magic :) in Unity.
Thanx, Enradion
Answer by Bunny83 · Dec 24, 2011 at 03:27 PM
Well, in the video it's not really a vector graphic. Real vector graphics doesn't really have triangles, just vectors. The "vector tanks" game also haa a transparent mesh with gets more opaque when you come closer. Probably done with a second shader pass.
However you could use the BarycentricWireframeUv1 - shader to render a mesh just as wireframe. You just have to use baricentric uvs. So each corner of each triangle should be either (0,0) , (0,1) or (1,0). Shared vertices could get you in trouble but it should be no problem to map all triangles to those coordinates. If you don't have shared vertices it's very easy, since every triangle is on its own.
Just in case you haven't seen it. I created a sample with different versions of the shader. I posted it already on another question and in the discussion page of the wiki page ;)
made this is no time:
and if anyone has any trouble getting uv's figured out, you just need each face to end up covering the entire UV image, like this:
Good stuff bunny, thanks :)
Answer by Eric5h5 · Dec 26, 2011 at 04:06 PM
See here: starscenesoftware.com/tankzone.html
I like the vecstrocity demos, but doesn't vecstrocity only really do 2d? I thought it would be limited in 3d rendering like this, atleast it would cause more overhead? I had thought it was like, a 2d plane, rendering "faux" 3d like old school 3d gfx
Clearly it doesn't only do 2D, as seen in the above link. ;) Lines can be occluded by objects in the scene and so on.
Your answer
Follow this Question
Related Questions
Draw 3d animations using Graphics.DrawMesh 0 Answers
Why CYAN is default object color (with default materials & shaders) 0 Answers
activate menu using the letter 'A' 1 Answer
GL not drawing in 3D? 0 Answers
Can Unity open .3ws file 1 Answer