eO vector / edge rendering demo

Community Forums/Showcase/eO vector / edge rendering demo

JoeGr(Posted 2007) [#1]
eO is a set of functions for rendering fast (I hope!) antialiased vector-style 3D graphics. Please try the demo and let me know if it works and what framerates you get. Any other feedback is also welcome.

http://www.mediafire.com/?8dnhmlzzkdz




boomboom(Posted 2007) [#2]
Pretty cool, you going to release this? Add this with a bit of blur and you have some retro renderer.

Can you apply this technique onto only 1 object, or do you have todo it on the entire screen?


JoeGr(Posted 2007) [#3]
Thanks. I may release the source code at some point but it needs tidying up first. The effect can be applied to an individual mesh, so it could be used to highlight a selection for example.


FBEpyon(Posted 2007) [#4]
I get between 175 - 210 fps

Its nice...


boomboom(Posted 2007) [#5]
Yea, I could really use this right now :) can be used to nicely wireframe a mesh etc.

Does this actually product the render using vectors or just look like it does? If it actually does it via putting vector lines over the top can these lines be changed, line width, line alpha, line patten (dots, dashes...) etc?


Ryan Burnside(Posted 2007) [#6]
Looks well done.

Questions:

Is this software rendering?

What is the difference between styles 2 and 3?


JoeGr(Posted 2007) [#7]
I'd like to see what theories people come up with about how this works before I explain it.

What is the difference between styles 2 and 3?

Nothing, except the colour.

EDIT: I forgot to mention above, you can move the camera in and out using the mousewheel.


Uncle(Posted 2007) [#8]
Looks lovely and runs well on my machine (lowest was 125fps for mode 4). Im really impressed by this, and can think of hundred and one uses for it :)


SpaceAce(Posted 2007) [#9]
AMD Athlon 64 X2 Dual Core 4600+, two gigs of RAM, GeForce 7900 GS.

In render modes 1-3, I get 270 FPS to 310 FPS in each mode. In mode 4, I get 103 FPS.

SpaceAce


Grey Alien(Posted 2007) [#10]
Looks really nice. BMax or B3D?


Mark Judd(Posted 2007) [#11]
Joe,

Looks really good - fantastic possibilities.

No idea how you've achieved it - multipass ?

150fps in modes 1-3, 70 ish in mode 4

P4 3 GHz - 1Gb RAM - geforce 7600

cheers,

Mark


jhocking(Posted 2007) [#12]
Looks awesome! I definitely would love to know how this is done. From the nicely smoothed lines and what I know about Blitz3D I'm gonna guess this is done by using sprites with drawings of lines, stretching the sprites to fit the edges.

Interestingly, my system specs are lower than Mark (same ram, lesser cpu and videocard) but I get framerates more like spaceace; I wonder why that is?

@greyalien: from the rocketship icon I'm assuming this is Blitz3D, but I can see how this effect would be more doable with antialiasing in miniB3D or even Max2D commands combined with CameraProjects of the vertices.


xlsior(Posted 2007) [#13]
370 FPS in mode 1 (textured), 140 in mode 4 (wireframe)

(I get a memory access violation when trying to run it directly from the zip file -- did you molebox it by any chance? Extracting it first and running the file then works OK)


SpaceAce(Posted 2007) [#14]

Interestingly, my system specs are lower than Mark (same ram, lesser cpu and videocard) but I get framerates more like spaceace; I wonder why that is?


The most likely cause, off the top of my head, is that Mark, like me, has a dual-core CPU and you have a single-core CPU. That would mean that the demo program can only consume 1/2 of our CPUs (which it does, running at 48%-50% CPU capacity which is equal to 96%-100% of a single core), while it can utilize your entire CPU.


I get a memory access violation when trying to run it directly from the zip file



I also got this. I figured maybe the program was trying to write something back to its zipped location.

SpaceAce


boomboom(Posted 2007) [#15]
I think he has packed objects in his exe, which won't work if you run it from inside a zip.


JoeGr(Posted 2007) [#16]
Thanks for taking a look everyone. I'm glad that it appears to be working okay. As suggested above, the file has been moleboxed which is why it needs unzipping before it will run.

It was written in Blitz3D. As for how it works, Joe Hocking was right. Each edge is represented by a quad which is textured with a simple line texture and scaled to the necessary length. So its 3D in 2D in 3D! Or something.

Here's a screenshot where I've replaced fully transparent areas of the basic texture with a mid-grey so you can see what's going on.



Credit is due to Indiepath for his Line3D function which I used as a starting point:

http://www.blitzbasic.com/codearcs/codearcs.php?code=1184

A couple of other ideas I have for this technique are that it could be used to render 3D objects with a 'hand-drawn' appearance or for smooth cartoon outlines.


Ryan Burnside(Posted 2007) [#17]
You might try adding some sort of cap to the lines so they appear continous. A small circle at the "joints" might work however this would require some multiple passes and tinkering with blending. If you are going to have transparent shapes you will need to sort the faces of the object so the faces furthest away from the camera are drawn first with overlapping faces drawn latter. Basically it comes down to calculating the center of the polygons then sorting them by each faces distance from the camera. Sorry I can't help more, still working on this concept myself.

Basically to render smoothly connected lines You just save all the opaque lines an joints to some varitey of image buffer then draw the image with the proper blending mode (light or alpha) over the polygons. I'm not sure if Blitz3d supports multiple image buffers though.


Steve Elliott(Posted 2007) [#18]
Nice. As long as you don't write a Tempest clone it'll be good.


TartanTangerine (was Indiepath)(Posted 2007) [#19]
I made a massive improvement to the line code for BMAX, you might want to look that up to figure how to do real glowing lines.

Btw, this is a really cool idea - I might have a go at a BMAX version at some point.


Mortiis(Posted 2007) [#20]
Wow, we may see good looking gridwars type of games in the
near future.


Terry B.(Posted 2007) [#21]
Amazing looking...


JustLuke(Posted 2007) [#22]
Looks fantastic. You mentioned the possibility of this being used to render mesh outlines for a hand drawn effect. Have you implemented this functionality already? Because I've yet to see a satisfactory implementation of this technique, and I've wanted to see one for Blitz3d for years (literally!).


Boiled Sweets(Posted 2007) [#23]
Add those real glowing lines - I would love that!!!!!!


Who was John Galt?(Posted 2007) [#24]
My brain must be stuck in the 80s, because this demo with some vector lines looks more impressive than Crysis.


jhocking(Posted 2007) [#25]
aw so no source? oh well


_33(Posted 2007) [#26]
~350 fps


JoeGr(Posted 2007) [#27]
Thanks for all the comments and for posting framerates.

You might try adding some sort of cap to the lines so they appear continous. A small circle at the "joints" might work however this would require some multiple passes and tinkering with blending.

I've already experimented with this and it did work to some extent but it slowed the rendering down. Besides, its only really necessary if you want thicker lines. I'm not sure why you think it would need multiple passes.

If you are going to have transparent shapes you will need to sort the faces of the object so the faces furthest away from the camera are drawn first with overlapping faces drawn latter. Basically it comes down to calculating the center of the polygons then sorting them by each faces distance from the camera.

You're talking about faces and edges being visible through other faces of the same mesh, right? If so, I have no satisfactory solution to this. Its not an issue for simple convex meshes like those in the demo. But isn't this a problem for solid meshes rather than transparent ones? Perhaps I've misunderstood you. Incidentally, checking the distance between the centre of each face and the camera would not guarantee that they were drawn in the right order.

I made a massive improvement to the line code for BMAX, you might want to look that up to figure how to do real glowing lines.

Sounds good. Could you post a link?

You mentioned the possibility of this being used to render mesh outlines for a hand drawn effect. Have you implemented this functionality already?

Sorry, no. Its just an idea at the moment. If I get it working I will post an example.

aw so no source? oh well

Not just yet. It still needs a bit of work before its fit to be released.