Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
the search for perfect graphics #245844
01/12/09 11:27
01/12/09 11:27
Joined: Jan 2009
Posts: 8
A
anomily01 Offline OP
Newbie
anomily01  Offline OP
Newbie
A

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.

Re: the search for perfect graphics [Re: anomily01] #245862
01/12/09 13:08
01/12/09 13:08
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
It is called ray tracing and I doubt that there is a way to do it at realtime usable fps without shaders...
But just give it a try I guess that you will anyways learn a lot by doing it wink

Re: the search for perfect graphics [Re: Slin] #246210
01/14/09 08:03
01/14/09 08:03
Joined: Jan 2009
Posts: 8
A
anomily01 Offline OP
Newbie
anomily01  Offline OP
Newbie
A

Joined: Jan 2009
Posts: 8
so do you think vec_bounce would work well for this?

and im a little confused how i'd do the whole thing

id have to add 1 to temp.x at the end of the process each time until temp.x = 800 (600x800 screen resolution) when it will reset and add 1 to temp.y (temp is the point on the screen for vec_for_screen that the trace is done from)

i will also have to have a mini counter to minimize the amount of times the process repeats before waiting for the next frame

so it'd be like var_counter + 1; ...... if var_counter = 100 var_counter = 0;
wait(1);

plus if temp.y = 600;
temp.y = 0;

so i just don't know whether these variables will hold after the wait(1) instruction and if i make this script a function how do i get it to repeat until small counter = 100 (play with for optimal fps) and if i use a while(1) instruction does that work and how about creating the particle effect i use to make a reflection? will it automatically stop or be deleted if the loop stops for a wait(1) instruction? or do i need to program it to disappear?

basic structure would be:

function
while(1) (?)
vec_for_screen (temp, camera);
C_trace (etc...
....
.
.
....
if (tex_flag1 = 1);
ent_create (pixel.tga, temp, null); ---or should i use an effect (etc.); command for speed? this is to create or spawn a stationary sprite at the given point

if (temp.x = 800);
temp.x = 1;
else { temp.x + 1};
if (temp.y = 600);
temp.y = 1;
else { temp.y + 1};
if (counter = 100);
counter = 0;
wait(1);
else { counter + 1};
}

any ideas? feedback?

Re: the search for perfect graphics [Re: anomily01] #246212
01/14/09 08:05
01/14/09 08:05
Joined: Jan 2009
Posts: 8
A
anomily01 Offline OP
Newbie
anomily01  Offline OP
Newbie
A

Joined: Jan 2009
Posts: 8
i was told you could perform over a hundred trace functions a frame, if so this is feasable as long as we restrict the number of trace functions per frame and manage the rest of the script and game to keep fps low

Re: the search for perfect graphics [Re: anomily01] #246373
01/14/09 21:05
01/14/09 21:05
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
a decent resolution has at least half a million of pixels. highly sophisticated and optimized raytracing engines like the "heaven seven" demo (see pouet.net) reach decent framerates but with 3dgs you wouldn't reach a percent of this speed.

with shaders of course... or cuda =).

Re: the search for perfect graphics [Re: Joey] #258772
04/02/09 03:07
04/02/09 03:07
Joined: Jan 2009
Posts: 8
A
anomily01 Offline OP
Newbie
anomily01  Offline OP
Newbie
A

Joined: Jan 2009
Posts: 8
i was thinking of only using it with a resolution of 600 x 800

Re: the search for perfect graphics [Re: anomily01] #258790
04/02/09 06:09
04/02/09 06:09
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
this still makes 800*600 = 480k, half million pixels.


3333333333

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1