|
|
the search for perfect graphics
#245844
01/12/09 11:27
01/12/09 11:27
|
Joined: Jan 2009
Posts: 8
anomily01
OP
Newbie
|
OP
Newbie
Joined: Jan 2009
Posts: 8
|
ok so the goal of this script is to not use any shaders but still create really cool effects.
this is an outline of all the effects i wish to create, the trick is doing this solely with simple, logical scripting, that doesn't use shaders. It will take a lot of resource managment to keep fps down.
first off starting with a counter that will increase numerically with each run of the loop, and then will repeat once the end of the loop is reached. however the counter must limit the number of loops per frame.
the loop starts by converting a point on the screen to a 3d coordinate using vec_for_screen. with each execution of this loop a different coordinate is calculated until a certain amount has and then there is a wait(1); fucntion to continue the function during the next frame so that the fps isn't hit too hard.
before the counter is changed and another point is converted to a 3d point however, a trace function is ran using the originally calculated 3d point.
performing this trace with a certain distance in quants specified will detect any hits or collisions, saying there is an object between the origin of the trace (camera viewpoint) and the end of the trace. properties of the object and surface hit will be stored for use.
then using either vec_bounce or a set of vector calculations another trace function will be ran from the target point of the original trace. this trace will detect an object in its path and store its properties as well.
the properties of color, etc., at the point of collision will then be used to create a bitmap at the point on the screen that the original trace was run from.
the properties of the reflecting object would affect the size and brightness of the bitmap for sharp reflections or for dull ones. different bitmaps could be used for certain reflections (i.e. very bright light ((twinkle)))
the bitmaps color could change based on the properties of the reflecting surface to account for surfaces that reflect only certain percentages of certain colors, some more than others. This way you could make things that reflect light like a prism in a spectral way etc.
as well the bitmaps' brightness and transparency will change based on the: -angle of the camera to the reflecting surface (lower angle=brighter reflections) -distance from reflecting surface to reflected object -brightness of reflected object
the size of the bitmap will change based on: -reflectiveness of the surface -brightness of the reflection -whether the reflected object is a specially identified entity (i.e. light or sun) -distance of reflected object to the reflecting surface.
basically by tweaking all these things you could create weak reflections for dull objects, or sharp reflections, or only partial reflections for the objects that only reflect a certain color or objects at a certain distance or certain angle or only reflect objects of a certain brightness. this will allow the for the depiction of surface properties.
as well then you could apply normal mapping that the programming will reference (need a lil help here) to change the normal of certain surfaces and affect the way things are reflected.
another thing that would need to be done however would be to create normal maps that can increase in detail as you get closer to the object so it looks in focus.
from a distance the reflection properties of the reflecting material can be derived from the generalization of the more detailed normal map where the reflections are more detailed.
normal mapping could also be used to trigger certain reflective properties. such as some parts of the surface with certain values assigned through their normal map (would use a different one than you'd use for the regular one) could have different reflective properties. such as puddles in the mud; the water and mud could be one map and one surface but the water could de denoted through a normal map and thus have different reflection properties.
The total package of detail control could include(or would ideally):
-low-poly objects in the far distance with normal maps made to simulate the reflective properties as seen from large distances. -objects that gain in poly counter as they get closer. -normal maps that both modify the direction of the reflected ray(making "bumps") and modify the reflective properties of the surface -normal maps that increase in detail as the get closer, and make up for decreasing model detail as they get farther -reflections that get sharper for the more detailed normal maps.
ideally the use of normal maps and lighting affects would eliminae the need for detailed texures. textures could be single colors
this method could also allow for many other effects but it is doubtful they could be combined or all used.
other effects could include, however: atmosphere effects, blur and overexposure effects, direct lighting affects (stencil shodows for the sun or single bright sources of light), level of detail in texures
Of course all of this would require a great deal of personal attention to details as well it would require tinkering and experimentation to get just the right settings for each surface, but the resulting affect, if it worked, would be very good graphics that are geared to accurate representations of each down to every detail. if it worked it would ideally create a living environment in which everything will have perfect detail that stays somewhat scaled to your perpective (the closer you look the more detailed the world, etc.). creating a world of seemingly infinite detail.
so what do you think??? I know its very complicated and not straightforward. I know most will say it won't or can't work but im not interested in how it can't work im interested in how it COULD work. i got some of it written if you could get the basic parts down then you could start adding things and tweaking it.
|
|
|
|