Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by rki. 06/18/24 15:32
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 748 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Save Edited Bitmap? #101317
12/06/06 22:21
12/06/06 22:21
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
Can someone please tell me how I can save a bitmap file after editing it with the pixel_to_bmap function?

Don't tell me it's impossible. If it is, how can I use the edited bitmap as a texture for an effect after it has been edited? Is it supposed to work?

Thanks in advance.


God DID give us a manual on how to change this world...
Re: Save Edited Bitmap? [Re: quasarchangel] #101318
12/06/06 23:19
12/06/06 23:19
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
How about you post this in the "future" forum.
saving bitmaps to a file.

I dont know of any direct method.

You could display the bitmap on the screen and generate a
(bmp) screenshot... as a simple workaround.

Re: Save Edited Bitmap? [Re: Damocles] #101319
12/07/06 01:24
12/07/06 01:24
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
I'd say it *should* be possible with render to texture somehow, but I've never tried it, so I'm not sure.

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Save Edited Bitmap? [Re: quasarchangel] #101320
12/07/06 03:30
12/07/06 03:30
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
if you are just going to use it in an effect.. in fact it should be ready to use with no problems.. what happens when you try it?


Sphere Engine--the premier A6 graphics plugin.
Re: Save Edited Bitmap? [Re: Matt_Aufderheide] #101321
12/07/06 06:13
12/07/06 06:13
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
There is no difference on my terrain, where I use it as a blendmap, I'll check it again, but I've even added a wait between the edit and then it starts applying the material a few frames after it has been edited


God DID give us a manual on how to change this world...
Re: Save Edited Bitmap? [Re: quasarchangel] #101322
12/07/06 06:20
12/07/06 06:20
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
http://www.coniserver.net/wiki/index.php/Write_TGA%27s_with_C-Script

i added a tga writing script to the wiki a while ago but for using a modified bitmap in an effect, saving and reloading shouldn't be necessary actually.

Re: Save Edited Bitmap? [Re: ventilator] #101323
12/07/06 07:15
12/07/06 07:15
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
Could you give me a tutorial or example script to do it without saving, I just want to compare it with my own. Otherwise I'll see if I can incorporate that tga writing script. Thanks for the replys.


God DID give us a manual on how to change this world...
Re: Save Edited Bitmap? [Re: quasarchangel] #101324
12/07/06 07:55
12/07/06 07:55
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Did you make sure to unlock it after you are done writing to it?


Sphere Engine--the premier A6 graphics plugin.
Re: Save Edited Bitmap? [Re: Matt_Aufderheide] #101325
12/07/06 08:34
12/07/06 08:34
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
Yes, Heres a piece of my code:

format = bmap_lock(blendmaph,0);
y=0;
x=0;
while(y<40)
{
while(x<40)
{
temp=(heightmap[((x)*400)+y]/255)*100;
pixel = pixel_for_vec(vector(temp,temp,temp),100,format);
pixel_to_bmap(blendmaph,x,y,pixel);
x+=1;
}
x=0;
y+=1;
}
bmap_unlock(blendmaph);

This is run just before applying the material effect to my terrain. The blendmap is a tga file. I have checked that it actually works by setting the bmap up as a panel and it does what I want it to do, but there is no difference as blendmap in effect.


God DID give us a manual on how to change this world...
Re: Save Edited Bitmap? [Re: quasarchangel] #101326
12/07/06 10:12
12/07/06 10:12
Joined: Jul 2000
Posts: 27,987
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,987
Frankfurt
Indeed, setting it up as a panel is the usual test to check whether a bitmap is correctly written. If it's visible in a panel, it also looks the same when you use it as a model or terrain texture.

So the problem is somewhere else, like using the wrong bitmap for your effect. Another possibility is when the bitmap is converted to a normal map or uv map etc, which of course alters it totally.

Saving a bitmap is implemented in the beta version and is in experimental state currently.

Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

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