Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,213 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 6 1 2 3 4 5 6
Re: Real DX9 Reflection [Re: Drew] #37742
12/17/04 20:08
12/17/04 20:08
Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
Machinery_Frank Offline
Senior Expert
Machinery_Frank  Offline
Senior Expert

Joined: Nov 2004
Posts: 7,121
Potsdam, Brandenburg, Germany
... not only assembling. Please create a plugin and an easy way to use (little documentation). Then feel free to make an affordable price. That work should be honored. I would pay for it.

And if there is an option to choose between the render to texture mode and the slower one then would everyone be very happy.


Models, Textures and Games from Dexsoft
Re: Real DX9 Reflection [Re: Machinery_Frank] #37743
12/17/04 23:22
12/17/04 23:22
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
The script im doing , Allow you to take cubemap shots, On walktrough Mode, and then you can place then in Static Objects (Don't move), of course the player won't be able to show in the reflection in this case... cause the texture is not refreshed..

For PLayer ( dinamic entity) the script let you take shot each 3 ( im not sure , seconds) refreshing the envirnoment cube map, based on player position.

Re: Real DX9 Reflection [Re: key_46] #37744
12/19/04 03:17
12/19/04 03:17
Joined: May 2004
Posts: 66
Brazil
key_46 Offline OP
Junior Member
key_46  Offline OP
Junior Member

Joined: May 2004
Posts: 66
Brazil
Really i have make a simple shader using alpha map and a simple cube map:





ADPA Ataque Dos Pôneis Assassinos! Atack Of Killer Ponys! ADPA(R) all rights reserved
Re: Real DX9 Reflection [Re: Josh_Arldt] #37745
12/26/04 04:40
12/26/04 04:40
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline
Expert
Metal_Thrasher  Offline
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
Quote:

Use what Pappenheimer suggested.
This saves the bitmaps as a cubemap instead of shot1, shot2 ect...

savedir="output";
var_nsave fh;
bmap* canvas;
bmap* b_render1;
bmap* b_render2;
bmap* b_render3;
bmap* b_render4;
bmap* b_render5;
bmap* b_render6;
var cubenumber = 0;
var directions[18] = 180, 0, 0, 90, 0, 0, 0, 0, 0, -90, 0, 0, 90, -90, 0, 90, 90, 0;
string tempstring1;
string tempstring2;
string _ts_;

//----------------------------------------------------------------------------- write_cubemap
function write8(byte) // write char
{
file_asc_write(fh, byte);
}

function write16(short) // write unsigned short
{
file_asc_write(fh, short&255);
file_asc_write(fh, (short>>8)&255);
}

function str_padding(str, number, padding)
{
str_for_num(_ts_, number);
var i = 0;
i = padding - str_len(_ts_);
while(i > 0)
{
str_cat(str, "0");
i-=1;
}
str_cat(str, _ts_);
}

function write_cubemap()
{
var i;
var xx;
var yy;
var format;
var pixel;
var pixelalpha;
var canvas_size[2];

canvas_size.x = bmap_width(b_render1);
canvas_size.y = bmap_height(b_render1);
format = bmap_lock(b_render1, 0);
bmap_lock(b_render2, 0);
bmap_lock(b_render3, 0);
bmap_lock(b_render4, 0);
bmap_lock(b_render5, 0);
bmap_lock(b_render6, 0);

str_cpy(tempstring1, "cubemap");
str_padding(tempstring1, cubenumber, 4);
str_cat(tempstring1, "+6.tga");
fh = file_open_write(tempstring1);
cubenumber+=1;
//--------------------------------------------------------write header
write8(0);
write8(0);
write8(2); // image type
write16(0);
write16(0);
write8(0);
write16(0);
write16(0);
write16(canvas_size.x * 6); // width
write16(canvas_size.y); // height
write8(24); // color depth
write8(0);
//--------------------------------------------------------write image data
yy = canvas_size.y - 1;
while(yy >= 0)
{
i = 0;
while(i < 6)
{
if(i==0){canvas=b_render1;}
if(i==1){canvas=b_render2;}
if(i==2){canvas=b_render3;}
if(i==3){canvas=b_render4;}
if(i==4){canvas=b_render5;}
if(i==5){canvas=b_render6;}
xx = 0;
while(xx < canvas_size.x)
{
pixel = pixel_for_bmap(canvas, xx, yy);
pixel_to_vec(temp, pixelalpha, format, pixel);
write8(temp.x); // b
write8(temp.y); // g
write8(temp.z); // r
xx+=1;
}
i+=1;
}
yy-=1;
}
file_close(fh);
bmap_unlock(b_render1);
bmap_unlock(b_render2);
bmap_unlock(b_render3);
bmap_unlock(b_render4);
bmap_unlock(b_render5);
bmap_unlock(b_render6);
}

//----------------------------------------------------------------------------- capture_cubemap
function capture_cubemap
{
var old_arc;
var old_x;
var old_y;
var old_screen;

b_render1 = bmap_create("render.tga"); // use a 256x256 tga for example -> determines cube map size
b_render2 = bmap_create("render.tga");
b_render3 = bmap_create("render.tga");
b_render4 = bmap_create("render.tga");
b_render5 = bmap_create("render.tga");
b_render6 = bmap_create("render.tga");

old_arc = camera.arc;
old_x = screen_size.x;
old_y = screen_size.y;
old_screen = video_screen;

camera.arc = 90;
video_set(256, 256, 32, 2); // should be same resolution as render.tga

freeze_mode = on;
vec_set(camera.pan, directions[0]); wait(1); bmap_for_screen(b_render1,1,0);
vec_set(camera.pan, directions[3]); wait(1); bmap_for_screen(b_render2,1,0);
vec_set(camera.pan, directions[6]); wait(1); bmap_for_screen(b_render3,1,0);
vec_set(camera.pan, directions[9]); wait(1); bmap_for_screen(b_render4,1,0);
vec_set(camera.pan, directions[12]); wait(1); bmap_for_screen(b_render5,1,0);
vec_set(camera.pan, directions[15]); wait(1); bmap_for_screen(b_render6,1,0);
freeze_mode = off;

wait(1);
write_cubemap();

wait(1);
camera.arc = old_arc;
video_set(old_x, old_y, 32, old_screen);
}

on_c=capture_cubemap;



Now, what kind of action will attach this screenshot to an entity?


-Johnny Thrash
Re: Real DX9 Reflection [Re: Metal_Thrasher] #37746
12/26/04 10:38
12/26/04 10:38
Joined: Sep 2004
Posts: 1,214
Austin, Texas
Josh_Arldt Offline
Senior Developer
Josh_Arldt  Offline
Senior Developer

Joined: Sep 2004
Posts: 1,214
Austin, Texas
Quote:

str_cpy(tempstring1, "cubemap");



I believe this is the name of the cubemap it writes. It writes it as cubemap+6.tga. Just use a cubemap shader and change the cubemap to this one.

Re: Real DX9 Reflection [Re: Josh_Arldt] #37747
12/28/04 12:00
12/28/04 12:00
Joined: Nov 2004
Posts: 832
United States, Utah
Braxton Offline
Developer
Braxton  Offline
Developer

Joined: Nov 2004
Posts: 832
United States, Utah
Is the original shader for C-Script or C++.


"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves" - As A Man Thinketh
Re: Real DX9 Reflection [Re: Braxton] #37748
12/31/04 08:02
12/31/04 08:02
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline
Expert
Metal_Thrasher  Offline
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
The very first piost is C++ I think, the filename was something.cpp.


-Johnny Thrash
Re: Real DX9 Reflection [Re: Metal_Thrasher] #37749
12/31/04 09:42
12/31/04 09:42
Joined: Nov 2004
Posts: 832
United States, Utah
Braxton Offline
Developer
Braxton  Offline
Developer

Joined: Nov 2004
Posts: 832
United States, Utah
How do we use HumanSandBags shager in a 3DGS level.


"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves" - As A Man Thinketh
Re: Real DX9 Reflection [Re: Braxton] #37750
12/31/04 09:46
12/31/04 09:46
Joined: Nov 2004
Posts: 832
United States, Utah
Braxton Offline
Developer
Braxton  Offline
Developer

Joined: Nov 2004
Posts: 832
United States, Utah
I mean I pasted his (HumanSandBag) code in a new script file and then saved it as DX9.wdl now when I load the level and try to add the code to the player (in behaviors) nothing shows up. I have added the DX9 code to my A^ template code externally. How can I fix this???


"The GREAT LAW: Life is and always will be justly ordered, and that all past experiences, good and bad, were the equitable out working of our evolving, yet unevolved selves" - As A Man Thinketh
Re: Real DX9 Reflection [Re: Braxton] #37751
12/31/04 12:05
12/31/04 12:05
Joined: Oct 2003
Posts: 2,194
Saturn
Metal_Thrasher Offline
Expert
Metal_Thrasher  Offline
Expert

Joined: Oct 2003
Posts: 2,194
Saturn
Well, HSB's code there is for taking the cobe map picture...the actual code for it is on the wiki page on the bottom of this page. I just used sky texture instead of a cobe map and I got a very pretty crome-effect.


-Johnny Thrash
Page 4 of 6 1 2 3 4 5 6

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