Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (EternallyCurious, howardR), 646 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
saving sky cube texture #467481
08/05/17 10:04
08/05/17 10:04
Joined: Mar 2014
Posts: 359
CocaCola Offline OP
Senior Member
CocaCola  Offline OP
Senior Member

Joined: Mar 2014
Posts: 359
hello,

i have programming a script to make a sky cube from a self maked scene.
but i have to open the file in gimp and save it again because the file making from my script load the file Verical mirrored. why is it so?

Code:
//you need the terrain.hmp from gamestudion folder
//you need a empty sky+6.tga with the size 3072 x512 to load
//script with sky entity cube
// for start press key C
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
BMAP* skyV1="#3072 x512x32"; 
BMAP* shotV1= "#512x512x32"; 
BMAP* shotV2= "#512x512x32"; 
BMAP* shotV3= "#512x512x32"; 
BMAP* shotV4= "#512x512x32"; 
BMAP* shotV5= "#512x512x32"; 
BMAP* shotV6= "#512x512x32"; 

ENTITY* sky_cube =
{
	type = "sky+6.tga";
	flags2 = SKY | CUBE | SHOW;	
}
function main()
{
	var i=0;
	vec_set(screen_size,vector(512,512,0));
	video_window(NULL,NULL,0,"SKYmaker"); 
	vec_set(sky_color,vector(99,125,265)); // make sun light all windows98 
	//level_load(NULL); //for see level without terain
	level_load("terrain.hmp"); // delete if you load null level
	while(!key_c)wait(1);
	camera.x=0;
	camera.y=0;
	camera.z=0;		
	camera.pan=0;
	camera.tilt=0;
	camera.roll=0;
	camera.arc=90;	
	wait(1);
	i=0; 
	bmap_blit(skyV1,bmap_for_screen (shotV1,0,1),vector(i,0,0),vector(512,512,1));
	i+=512;
	camera.pan-=90;
	wait(1);
	bmap_blit(skyV1,bmap_for_screen (shotV2,0,1),vector(i,0,0),vector(512,512,1));
	i+=512;
	camera.pan-=90;
	wait(1);
	bmap_blit(skyV1,bmap_for_screen (shotV3,0,1),vector(i,0,0),vector(512,512,1));
	i+=512;
	camera.pan-=90;
	wait(1);
	bmap_blit(skyV1,bmap_for_screen (shotV4,0,1),vector(i,0,0),vector(512,512,1));
	i+=512;
	camera.pan=270;
	camera.tilt=270;
	wait(1);
	bmap_blit(skyV1,bmap_for_screen (shotV5,0,1),vector(i,0,0),vector(512,512,1));
	i+=512;
	camera.tilt=90;
	wait(1);
	bmap_blit(skyV1,bmap_for_screen (shotV6,0,1),vector(i,0,0),vector(512,512,1));
	wait(1);
	bmap_save(skyV1,"sky+6.tga");//save the sky map 
	wait(1);
	beep();
}


Last edited by CocaCola; 08/05/17 10:08.
Re: saving sky cube texture [Re: CocaCola] #467484
08/06/17 08:00
08/06/17 08:00
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
that's a .tga problem (there's an option in the tga file's header that specifies if the content starts at top left or bottom left)

try using .png or .dds (bigger file size) for example instead. but note that acknex doesn't use a lot of compression for .png files, so re-saving it in an actual image editing program (like gimp) is still recommended if file size matters.


POTATO-MAN saves the day! - Random

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