Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
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
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 579 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 5 1 2 3 4 5
save hmp file dll #450136
04/07/15 09:37
04/07/15 09:37
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
here's a contribution to save hmp terrain

--- http://www.datafilehost.com/d/5998324b

declare this function in your project:

Code:
int save_hmp(char* filename,ENTITY* terrain,int skip_original_pixels);



set skip_original_pixels to 1 ,if you want to skip the original image
pixel data , and try to rather use the pixel data from the bmap buffers,
use this if you want to save modified pixel operations .


else set it to 0.

---

include save_hmp.dll in your project folder .

then call this function to save your terrain entity out to file .

---

has skin support , bmp and tga supports modified pixel data .

dds and png and jpg only supports non modified pixel data and "skip_original_pixels" wil default to 0 , no matter what the value "skip_original_pixels" was set to when you called the function (for now anyway)...

Last edited by Wjbender; 04/15/15 20:58.

Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450139
04/07/15 09:51
04/07/15 09:51
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Wjbender@ thank you very much! it's very useful contribution! laugh

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: save hmp file dll [Re: 3run] #450142
04/07/15 10:48
04/07/15 10:48
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
roger that , over and out


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450145
04/07/15 10:55
04/07/15 10:55
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
thanks!
do you plan to support skin changes in future?
in MapBuilder I use a dll which works fine, but saves hmp with original skins.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450146
04/07/15 11:47
04/07/15 11:47
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
did you write that dll ? or where did you get it .

I am surely planning on that , however my current understanding of the ctexture & cskin information ,is a bit vague , especially working from the bmap pointers of the skin's data towards completely correct data for ctexture and cskin , well I believe that's where I am supposed to retrieve my data to fill up ctexture and cskin .


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450147
04/07/15 11:50
04/07/15 11:50
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I got from an old user called Widi with the permission to use it.
as I remember HeelX has a working version, and you can search his related questions to jcl, to get some useful info...


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450149
04/07/15 12:02
04/07/15 12:02
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
well it appears to be just arrays of (color per pixel) with bmap->bytespp, either arranged as rgb or bgr , I think I can manage .

Last edited by Wjbender; 04/07/15 12:16.

Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450154
04/07/15 14:03
04/07/15 14:03
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
http://www.datafilehost.com/d/c21e74d7

tested with 2 bmap skins , worked fine , however I am a bit confused with the mipmaps .


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450155
04/07/15 14:21
04/07/15 14:21
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450156
04/07/15 14:27
04/07/15 14:27
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace

hhmm maby I should add dds and whatever , currently I only have simple bmp skins


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450179
04/08/15 04:26
04/08/15 04:26
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Neat, thanks for the contribution!


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: save hmp file dll [Re: Superku] #450180
04/08/15 06:42
04/08/15 06:42
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I use mainly tga skins, because it enables runtime pixel manipulations without conversions (which is also possible). but supporting more formats is better laugh


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450185
04/08/15 09:40
04/08/15 09:40
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
thanks superku.

@sivan well tga ,bmp worked okay when I tested , jpg dds png however is a different story .


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450187
04/08/15 10:57
04/08/15 10:57
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace


latest updated link is on page 1


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450216
04/09/15 07:48
04/09/15 07:48
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
hi
it works fine with mutlitexturing tga skins, but modified skin texture (replaced with another tga, or alpha channel edited for changing coverage) are unsaved i.e. the original skins are coming back after reloading.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450221
04/09/15 16:47
04/09/15 16:47
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
can you give me a code example ?

I couldn't reproduce the problem .


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450235
04/10/15 07:01
04/10/15 07:01
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I tried within latest MapBuilder, just replaced the old dll access with yours by some #ifdefs. the actual texture editing stuff would be too complex to post here.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450237
04/10/15 08:08
04/10/15 08:08
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
the test I did was , I loaded a hmp with textures applied (which is what I presume you do) then I replaced the skins with different textures , I then saved it ,removed the entity , and loaded it ,everything were correctly saved and applied ..

I also tested with ent_reload but this one seems to have a problem , because it doesn't reload the whole mesh , possible a bug there with terrain and ent_reload?

are you saving your modified files before saving the hmp ? or are you altering the skins bmp's then saving just the hmp ?

I wil conduct some bmp_lock ,with alterations on the pixels tests today .



Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450239
04/10/15 08:29
04/10/15 08:29
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
maybe it is related to bmap_save what I use for speed reasons and to work with bmap_load correctly (bmap_create flips tga).

by the way for the alpha pixel modifications I use a pixel based approach which should work.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450245
04/10/15 09:33
04/10/15 09:33
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
the pointer of data I am using to fill the data pointer of the hmp before saving , is the pointer available to palettized pixels of the original image .

oh and the manual states that a bmap_save's image format can only be read back with bmap_load and can not be used for BMAP definitions or textures. .


I see the issue , thank you.

Last edited by Wjbender; 04/10/15 09:45.

Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450252
04/10/15 14:29
04/10/15 14:29
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
try the new dll , set skip_original_pixels to 1 if you want the modified pixel data to be saved instead of the original pixel data .

jb


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450288
04/11/15 15:58
04/11/15 15:58
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
do you mean the 1st post link is updated, and there is a global variable in the dll "skip_original_pixels" to set to 1? (and should it be declared?)


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450290
04/11/15 16:55
04/11/15 16:55
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
the new function must be declared as :
Code:
int save_hmp(char* filename,ENTITY* terrain,int skip_original_pixels);



to save the original pixel data , if you just replaced the skins with other files :

Code:
if (save_hmp("hmpfilenamehere.hmp",terrain_entity_here,0)) // success



to save the pixel data that was modified with for example bmap_lock operations ,instead :

Code:
if (save_hmp("hmpfilenamehere.hmp",terrain_entity_here,1)) // success



that's how it is for now.

yes the link is updated on the first page first post

Last edited by Wjbender; 04/11/15 17:03.

Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450294
04/11/15 20:30
04/11/15 20:30
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
hey, it works! laugh

the only issue happens (crash on save), when there is an empty or NULL skin (skin without texture). I have an optimized shader where I sometimes use such an arrangement.

and dds support would be great! tongue

thanks for the efforts!


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450298
04/11/15 20:56
04/11/15 20:56
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
okay I'll sort out with more error checking .

I am working on it on and off , between 2 other projects ,sometimes I multitask between all 3 ,coding/ testing and improving a few lines of code at a time .

glad it helps out for now .

edit:
<-- am I now the one who's name they dare not speak 666 posts

Last edited by Wjbender; 04/11/15 21:01.

Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450315
04/12/15 11:03
04/12/15 11:03
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
fixed ,updated link and info on page 1 , 1st post


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450365
04/13/15 12:04
04/13/15 12:04
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
thanks, it help me to find some bugs in MapBuilder laugh (some missing protections of null textures)

further tests:

if the skin texture is not square, and modified, it is not saved, the original is kept (square textures are saved properly)


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450368
04/13/15 13:09
04/13/15 13:09
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
didn't test it but I believe that should work now .


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450373
04/13/15 14:04
04/13/15 14:04
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
unfortunately it doesn't work... or the link is old, dll file size is the same, what can rarely happen.

Last edited by sivan; 04/13/15 14:05.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450387
04/13/15 15:32
04/13/15 15:32
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
okay I also noticed a size difference with the one on my pc , I uploaded it , let me know because as I read my code it should work .


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450469
04/15/15 09:02
04/15/15 09:02
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
it does not work too


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450474
04/15/15 11:51
04/15/15 11:51
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
mm I must have missed a line of original width & height code likely.

just to be clear , how are you resizing the images ?

and are you using skip_original_pixels set to 1 or 0


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450491
04/15/15 20:57
04/15/15 20:57
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
as stated above I found one I missed , and corrected it . if it doesn't save correct now , I would need more details in the methods involved .


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450492
04/15/15 20:57
04/15/15 20:57
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
as stated above I found one I missed , and corrected it . if it doesn't save correct now , I would need more details in the methods involved .


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450510
04/16/15 07:29
04/16/15 07:29
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
hi, no success, only square skins are saved well, here is the colouring code I used for testing:

Code:
void		TerEdit_Tx_SetColor()
{
	wait(3);
	
	int skin_int = teredit_tx_selected+1+(teredit_tx_set-1)*max_teredit_tx_items;
	
	if (skin_int > teredit_tx_count)	return;																// protection
	
	if (!ent_getskin(terrain_entity, skin_int))											
		{
			return;
		}
	
	TerEdit_Tx_Color( bmap_for_entity(terrain_entity , skin_int) , vector(teredit_tx_blue,teredit_tx_green,teredit_tx_red) );
	wait_for(TerEdit_Tx_Color);
}


void		TerEdit_Tx_Color(BMAP* bmap_pointer, COLOR* to_color)				
{
	if (bmap_pointer == NULL)
		{
			return;
		}
	
	var pixel_format  = bmap_lock(bmap_pointer,0);														// lock and get format
	if (pixel_format >= 565) 
		{
			var pixel;
			COLOR pixel_color;
			var pixel_alpha;
			int i,j;
			for(i=0;i<bmap_width(bmap_pointer);i++)
				{
					for(j=0;j<bmap_height(bmap_pointer);j++)
						{
							pixel = pixel_for_bmap( bmap_pointer , i , j );								// get pixel
							pixel_to_vec( pixel_color , pixel_alpha , pixel_format , pixel );		// get color and alpha
							pixel = pixel_for_vec( to_color , pixel_alpha , pixel_format );		// set alpha
							pixel_to_bmap( bmap_pointer , i , j , pixel );								// set pixel
						}
				}
		}	
	bmap_unlock(bmap_pointer);	
	bmap_to_mipmap(bmap_pointer);	// @@@ update mipmaps after unlocking, to avoid the original skin to appear from big distance		
	wait(1);
	
	TerEdit_Tx_UpdateSets32();      // uses bmap_blit to copy skin texture to thumbnail
	TerrHmp_Tx_UpdateMaterialSkins();    // sets material skins to entity skins due to shader requirements
	wait(1);
}



Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450512
04/16/15 07:40
04/16/15 07:40
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
okay I wil look at the code , could it be possible that its a limitation ? I remember reading something about width and height being able to support non square values but the engine keeps it a power of 2 , I may be confusing this with something else but if I find it I wil tel you


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450516
04/16/15 09:41
04/16/15 09:41
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I don't know whether GED supports it or not. if yes, GED's source could help. it was shared a while ago in the forum by jcl. I can upload if you need - if I can find it.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450519
04/16/15 10:22
04/16/15 10:22
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
in the manual , I found this :

If the texture had no mipmaps before, modified texture content gets lost when creating the mipmap chain the first time. Thus, create the mipmaps before modifying the texture, and call bmap_to_mipmap afterwards a second time for updating the modified content to the other mipmaps.
This function can not be applied to compressed (DDS), cubic, normal, tangent, rendertarget, or other special bitmaps. If required, create the mipmaps before converting the bitmap to a special format (for instance bmap_to_cubemap(bmap_to_mipmap(skymap)). Creating mipmaps afterwards will otherwise render the special bitmap unusable.

there's a problem with your code there(if you didn't have mipmaps before ) and I do not save mipmaps out to file yet.

I tested by doing pixel operations , followed by bmap_to_mipmap , which destroyed the modifications and results in behaviour you would not want ,if you were planning on keeping the pixel alterations ..

but still , how are you resizing the bmaps to be non square ? I mean what function ?


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450529
04/16/15 19:58
04/16/15 19:58
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
ahh thanks! a missed info. I can do that mipmap generation on texture editor initialization.

they are pre-made textures, 4 textures are combined into one, to easily access 8 textures from the terrain shader as 4 entity and 4 material skins (global color map, global normal map, rgba blendmap1, rgba blendmap2, 1st 1x4 color map, 1st 1x4 optional normal map, 2nd 1x4 color map, 2nd 1x4 optional normal map), but I could make 2x2 arrangement instead of 1x4, but with Gimp it is easier to create 1x4.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450533
04/16/15 20:35
04/16/15 20:35
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
okay so you made texture atlases ,I understand .

how do you feed the texture parts from the atlas, as new bmap skins , before you save ?

and what format are those bmaps ?


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450536
04/16/15 21:02
04/16/15 21:02
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
all the textures are saved as hmp skins, and the last 4 ones are assigned as the 4 material skins on terrain creation (material bmap pointers to entity skins).
I just tried to modify the full texture atlas. they are tga textures. if it will work fine, I think I replace the old dll with yours.
as I remember performance is slightly better when dds textures are used, but they can be converted for the game. currently I have a secondary option to save a terrain texture package (and a terrain lighmap texture) for each level as a set of separate tga files.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450547
04/17/15 09:18
04/17/15 09:18
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
I have tested with

bmap_createpart
bmap_createblack
bmap_blitpart

with non square sizes , to try and duplicate your problem when you said it doesn't save non square skins .

but all of those saved them out , however they are filled with black to make them powers of 2, by the engine when applied as a texture skin , that's the only thing I can think of now ,that bears any kind of similarities with your problem , because I am stil not sure what functions your using so that I can try and duplicate the problem .

edit :
let me look in to this a bit more


Last edited by Wjbender; 04/17/15 10:30.

Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450549
04/17/15 10:31
04/17/15 10:31
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
unfortunately I cannot give a simple answer as in MapBuilder I use different configurations for single skin + detail map terrains, and for multitexturing where blending is stored in the alpha channel. if you are patient enough and want to read a lot, it is within MBteredit_tx.h/.c and MBterrhmp.h/.c. later I'm planning to upload it to GitHub, it would be easier to discuss.

so it is okay now, this mipmap thingie at least fixed some other issues laugh and I can change my shaders to use square atlas maps. currently I'm mostly using an autotexturing shader, which is much better for using with many levels than to save skins to every hmp-s (and I frequently use the same hmp for many levels beside a deformation info file), thus imo it is better if you don't invest too much time into my problem at the moment. and I'm not sure how much I will work with 3dgs in future... the dll basically works fine beside this limitation.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #450550
04/17/15 10:40
04/17/15 10:40
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
I found this in the manual under bmap_lock

After locking an uncompressed bitmap, you can access its texture content directly through the bmap.finalbits pointer. The texture size (in bytes) is given through (mybmap.finalwidth * mybmap.finalheight * bmap.finalbytespp). The texture size is normally a power of 2 and not identical to the original image size returned by bmap_width and bmap_height.


I just had to know why and what goes wrong


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #450554
04/17/15 12:15
04/17/15 12:15
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
okay, I thought you won't sleep until it is resolved grin

basically everything works fine with non-square (but power of 2) sized skin textures, except saving. I can make some further tests, unfortunately no much time because of job, and no time at weekend because of family. I can do them probably only next week.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: save hmp file dll [Re: sivan] #458777
03/30/16 07:45
03/30/16 07:45
Joined: Nov 2005
Posts: 204
Bavaria
HellThunder Offline
Member
HellThunder  Offline
Member

Joined: Nov 2005
Posts: 204
Bavaria
Is there a way to share the dll again? I know a year has passed - but I would love to play around with this.

Thanks.


Create your own JRPG and join our community: https://www.yrpgtoolkit.com
Re: save hmp file dll [Re: HellThunder] #458780
03/30/16 10:08
03/30/16 10:08
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline OP
User
Wjbender  Offline OP
User
W

Joined: Mar 2012
Posts: 927
cyberspace
wikisend.com/download/829782/save_hmp.dll


Compulsive compiler
Re: save hmp file dll [Re: Wjbender] #458786
03/30/16 12:01
03/30/16 12:01
Joined: Nov 2005
Posts: 204
Bavaria
HellThunder Offline
Member
HellThunder  Offline
Member

Joined: Nov 2005
Posts: 204
Bavaria
@Wjbender
Thank you for your quick reply =)


Create your own JRPG and join our community: https://www.yrpgtoolkit.com
Page 1 of 5 1 2 3 4 5

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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