Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > STr34kZ (aka. EOR lines)
2005-02-15 15:46
Cybernator

Registered: Jun 2002
Posts: 154
STr34kZ (aka. EOR lines)

Streaks, not freaks. :)
Does anyone have any idea how to _completely_ avoid the streaks in EOR fillers. SLJ in his tutorial mentioned that ---*--- intersections will fail. I wanted a complete 3D scene to be EOR filled at once. After some experimenting I came up with a technique to handle obscured objects, objects partially or wholly on the top of another, and it works ok (as long as the filling of a single object is successful). Pick up yer jaws, this doesn't work at realtime. :) Because of this, implementing of an algorithm to handle these intersections will not be a trouble, but I can't think of anything.
Lines are drawn from left to right and the last pixel is not drawn for horizontal lines (where dx>dy). For vertical lines, I don't draw the endpoints, and I only draw the last pixel of each vertical chunk (the way SLJ's routine works).

One interesting thing with the object where this happens is that if you watch it from the other side, there're no streaks.

Check out: http://www.geocities.com/lazeristoski/eor.zip

Use left/right arrows to change frames, F to toggle filling.
Btw, clipping against the upper border is handled as well, though you won't see that from the animations I have included.

Ah yes, make sure you have DirectX 7 or later installed. :P

(addon: just drag one of the .eor files onto the Exorizer.exe)
 
... 19 posts hidden. Click here to view all posts....
 
2005-02-17 08:05
Oswald

Registered: Apr 2002
Posts: 5034
my filledvectors use a routine which eliminates lines that 'normally' would be drawn more than once... simply checks which lines would be drawn more than once, and precalculates what the resulting color would be after that, and then only one line is drawn in the resulting color.. or no line if the color would be the bitpair 00. Guess other coders routines does this too ?
2005-02-17 09:36
Krill

Registered: Apr 2002
Posts: 2871
yes, i do that as well.
2005-02-17 10:01
Graham
Account closed

Registered: Dec 2002
Posts: 990
in my routines there is no such things as "lines drawn more than once" so i do not have to eliminate them.
2005-02-17 10:38
Cruzer

Registered: Dec 2001
Posts: 1048
oldest trick in the book ;)
2005-02-17 10:54
Oswald

Registered: Apr 2002
Posts: 5034
graham ?! how do you do that ?
2005-02-17 12:19
JackAsser

Registered: Jun 2002
Posts: 1997
1. Perform backface removal.
2. Set all edge colors to 0.
3. For each face take face-color and eor the color with the color of each corresponding edge.
4. Draw all the edges using EOR.
5. EOR-fill.

Kind of, sort of... :D

ps. only works for convex objects naturaly.
2005-02-17 12:33
Cruzer

Registered: Dec 2001
Posts: 1048
guess the code could look something like this, if the facevisibles were either $00 or $ff for true/false...

lda #facecolor0
and facevisible0
sta tmp
lda #facecolor1
and facevisible1
eor tmp
sta linecolor
2005-02-17 12:38
Oswald

Registered: Apr 2002
Posts: 5034
Quote: in my routines there is no such things as "lines drawn more than once" so i do not have to eliminate them.

jackasser, cruzer: you write how to actually eliminite, but graham says he doesnt has to... (?!?!)
2005-02-17 13:37
Cruzer

Registered: Dec 2001
Posts: 1048
i guess you don't have to eliminate double lines in realtime if the lines are "born" knowing that they always have to consider two faces' colors and visibility to get their own line color.
2005-02-17 19:17
Graham
Account closed

Registered: Dec 2002
Posts: 990
@Oswald:

something like JackA said. i do not think of the lines as "edges of a polygon" but rather "polygons are neighbours of the lines".
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
REBEL 1
t0m3000/HF^BOOM!^IBX
Smasher/F4CG
trident
Didi/Laxity
Jazzcat/Onslaught
iAN CooG/HVSC
LMan
Airwolf/F4CG
fieserWolF/Abyss-Con..
Korodny
wil
thesuperfrog
Sentinel/Excess/TREX
Guests online: 104
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Uncensored  (9.6)
7 Comaland 100%  (9.6)
8 No Bounds  (9.6)
9 Aliens in Wonderland  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Birth of a Flower  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Morph  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 S!R  (9.7)
5 Fungus  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.087 sec.