Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (SBGuy, Quad), 768 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 3
Page 4 of 6 1 2 3 4 5 6
Re: EXAMPLES for Gamma Ramp Correction DLL [Re: Daedelus] #51978
12/04/05 00:35
12/04/05 00:35
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline OP
Serious User
Lion_Ts  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Daedelus, I don't know. Do you have any problem with other dll (sphere or sylex, for example) on your laptop ?
MASH, real grayscale not for this dll.

Re: EXAMPLES for Gamma Ramp Correction DLL [Re: Lion_Ts] #51979
12/04/05 23:25
12/04/05 23:25
Joined: Aug 2002
Posts: 96
A
AAM Offline
Junior Member
AAM  Offline
Junior Member
A

Joined: Aug 2002
Posts: 96
Hi Lion Ts,
Its greate what you did,but when i try it i recieve this error - after the splash window that displays the owner of the product - :-

" dllfunction get_gammaramp not find in DLL "

What i did is :
1- Copied the gammaramp.dll to my acknex plugin directory.
2- Copied the script you put in your thread with out the C++ part in my script.

Im realy not good with dlls , so please help me.


If You Treat a Persone As He Is He Will Be As He Is, But If You Treat Him As He Should Be , He Will Be As He Should Be ,And Can Be.
Re: Gamma Ramp Correction DLL for FULLSCREEN mode [Re: William] #51980
12/05/05 06:56
12/05/05 06:56
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline
Serious User
PrenceOfDarkness  Offline
Serious User

Joined: Aug 2004
Posts: 1,305
New York
great contribution dude!


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Gamma Ramp Correction DLL for FULLSCREEN mode [Re: PrenceOfDarkness] #51981
12/05/05 07:23
12/05/05 07:23
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline
Serious User
PrenceOfDarkness  Offline
Serious User

Joined: Aug 2004
Posts: 1,305
New York
how ever i am getting a problem... On run time it says "get_gamma_ramp not found in dll" and "set_gamma_ramp not found in DLL"... can someone help me?


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Gamma Ramp Correction DLL for FULLSCREEN mode [Re: PrenceOfDarkness] #51982
12/05/05 13:32
12/05/05 13:32

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Daedalus,
Thanks for trying it, I suspect it is because its on a laptop, as their monitor viewing drivers are usually different. If it doesn't work for anyone else though, it must be a mistake I made....

PrenceOfDarkness,
Make sure you're loading the right dll in your script and that you're loading it a second before you start calling functions from it, that could possibly be your problem.

AAM,
You need the dll in the main directory of the WED and SED files (or the .exe if its been published). I don't believe you can even provide a path to it through scripting.

Re: Gamma Ramp Correction DLL for FULLSCREEN mode [Re: ] #51983
12/05/05 21:41
12/05/05 21:41
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline OP
Serious User
Lion_Ts  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Quote:


...dllfunction ... not find in DLL...




dll not in memory, i think.
-check where you placed it (plugin folder / your root folder of published game);
-check c-script (correct names, etc.);
-check last update of DX9.0c;

Re: Gamma Ramp Correction DLL for FULLSCREEN mode [Re: Lion_Ts] #51984
12/06/05 04:36
12/06/05 04:36
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline
Serious User
PrenceOfDarkness  Offline
Serious User

Joined: Aug 2004
Posts: 1,305
New York
well this is how i have it set up.. and it wont work.. I have directx 9c and here is my script it's called gammaramp.wdl and it's called from my main WDL after I include all my other WDLs

Code:

//-------------------------- WDL code -----------------------------
//2005 by LionTs.
//Free for all 3DGS community. Just send me $1000 per one game start.
//Ok, it's my another stupid joke :)
//Correct gamma ramp for FULLSCREEN mode.
// I'm trying to implement gammaramp in windowed mode thru GetDeviceGammaRamp,
// but I think it's useless.
//It's just an example, try to modify formula for gamma ramp arrays,
//You'll see intresting usefull effects.
//////////all code is working, I'm using this stuff in my game project
//function for simple gamma manipulation like overall brightness or color splash

dllfunction set_gamma(var,var,var); //red green blue: 0 - ~3.5, change overall brightness if all are equal
//functions for advansed effects like color inverted vision
dllfunction get_gamma_ramp(&var,&var,&var); //arrays of gamma ramp values: 0-65536
dllfunction set_gamma_ramp(&var,&var,&var); //arrays of gamma ramp values: 0-65536

var gr_red[256];
var gr_green[256];
var gr_blue[256];
var br_gamma=1.0;
//example for overall brightness correction
//PGUP & PGDN change it ingame
function gamma_correct
{
while(player == null){wait(1);}
var i=0;
get_gamma_ramp(gr_red,gr_green,gr_blue); //fill arrays with current gamma ramp
while(1)
{
if (key_any)
{
br_gamma+=time*0.1;
br_gamma=min(br_gamma,2.0);
}
else
{
if(key_pgdn)
{
br_gamma-=time*0.1;
br_gamma=max(br_gamma,0.5);
}
}
i=0;
while(i<256)//calculate values for gamma ramp
{
gr_red[i]=pow(i/256.0,1/br_gamma)*65536;
gr_green[i]=pow(i/256.0,1/br_gamma)*65536;
gr_blue[i]=pow(i/256.0,1/br_gamma)*65536;
/*
//try this, for example
gr_red[i]=pow((256.0-i)/256.0,1/br_gamma)*65536;
gr_green[i]=pow((256.0-i)/256.0,1/br_gamma)*65536;
gr_blue[i]=pow((256.0-i)/256.0,1/br_gamma)*65536;
*/
i+=1;
}

set_gamma_ramp(gr_red,gr_green,gr_blue); //commit new gamma ramp
}
wait(1);
}
//END of GAMMA_CORRECT()



well what is wrong here?


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Gamma Ramp Correction DLL for FULLSCREEN mode [Re: PrenceOfDarkness] #51985
12/06/05 11:45
12/06/05 11:45

A
Anonymous
Unregistered
Anonymous
Unregistered
A



I put this near the included wdls (not in an action or function):
var_nsave gam_dll;//variable that is not saved, but used on runtime


then this in the first part of the main() function (at the top of the script):

gam_dll=dll_open("gammaramp.dll");

Re: Gamma Ramp Correction DLL for FULLSCREEN mode [Re: ] #51986
12/06/05 14:13
12/06/05 14:13
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline
Serious User
PrenceOfDarkness  Offline
Serious User

Joined: Aug 2004
Posts: 1,305
New York
okay i finally got it to work lol, thanx alot wing... Hey Lion Ts this would be a million times more useful if you could write a small tutorial for it so alot of newbies (sadly including me ) could get it to work and even to use it to do different things.. Just explain what the variable "i" is for and other things...


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Gamma Ramp Correction DLL for FULLSCREEN mode [Re: PrenceOfDarkness] #51987
12/06/05 23:05
12/06/05 23:05
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline OP
Serious User
Lion_Ts  Offline OP
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Sorry, PrenceOfDarkness
I don't know english well to write tutorials...
About i. It's a cycle counter to fill gamma array. I use it in formula to provide 'linear' or 'normal' gamma ramp (try to read DX SDK help for more).
Take a look at all post in this thread and try. Try to write your own formulas to provide gamma correction.

Page 4 of 6 1 2 3 4 5 6

Moderated by  adoado, checkbutton, mk_1, Perro 

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