Flood filling algorithm for filling the region enclosed between intermediate points generated by Bresenham 3D Line algorithmBy Sri Harsha
I have a triangle,oriented in a 3D Plane i.e. I have my vertices as (x1,y1,z1) ; (x2,y2,z2) and (x3,y3,z3)
I am trying to convert this triangular facet to voxelised model i.e.
Along each edge,I am applying Bresenhams 3D Line algorithm and generating intermediate points.After generating intermediate points, I want to fill the inside region.
I have been searching for some algorithm like flood filling,but did not find anything relevant till now.
I would be really glad,if some one can provide an algorithm for achieving this.
I basically have a List of tuple for storing all the (x,y,z) data created along the edges.(generated using Brsenhams 3D Line algorithm).
Now,I want an algorithm,which creates cubes in the inside region.
I'm trying to design a Boss which has a special mechanism based on a 2.5D ARPG. In some cases,it can generate a lot of fog,then the players only have a limited view.
This situation has a feature: Players don't know where the Boss is and the surrouding situation,I want to make sth interesting based on this.
on this occasion,I have several ideas:
1. Boss have different ability in the fog,like being much more powerful,it is hard for players to avoid the skills.
2. Players can destroy or build sth to clear away the fog,then it is easier to fight the Boss.
I wonder is there any other things Boss can do based on the limited view of players?The ideas above are not special enough I think. Do u guys have any suggestion?
After I saw a DOOM video on my cell phone,I suddenly found it's really cool,both of the looking and feeling.
So the questions came out to me:
1-Is there much less fun when a FPS game with out verticle aiming?
2-What's the core strategy or technique when playing this kind of game?
3-Is it easy to use the strategy or technique when using a mobile phone?
What's your opinion guys?
I am coding the rasterization of triangles by the baricentric coordinate method.
Look a lot of code and tutorials that are on the web about the optimization of this algorithm.
I found a way to optimize it that I did not see it anywhere.
I Only code the painting of triangles without Zbuffer and without textures. I am not comparing speeds and I am not interested in doing them, I am simply reducing the amount of instructions that are executed in the internal loop.
The idea is simple, someone must have done it before but he did not publish the code or maybe in hardware it is already that way too.
It should be noted that for each horizontal line drawn, of the three segments, you only need to look at one when going from negative to positive to start drawing and you only need to look at one when it goes from positive to negative when you stop drawing.
I try it and it works well, now I am implementing a regular version with texture and zbuffer to realize how to add it to this optimization.
Does anyone know if this optimization is already done?
The code is in https://github.com/phreda4/reda4/blob/master/r4/Dev/graficos/rasterize2.txt
From line 92 to 155