Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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,534 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Terrain Deform realTime [Re: HeelX] #421221
04/13/13 19:36
04/13/13 19:36
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: HeelX
Originally Posted By: NeoNeper
I Am Using bmap_save(BMAP*, STRING* name), to save the modified map. But he's saving the texture mirrored!
Don't use tga, but save as BMP or PNG instead.
I tried to save it as a bmp, but then, when I try to reopen the project, with already existing skin, I get "bad file format" for the bmp skin.
But with png and predefined string in the bmap_save, uses ok. What could cause this problem?

Edit: btw, here is the working example with the png skin:
http://www.filedropper.com/tpaint1

Edit2: I was too late with the bad file format thing grin

Last edited by 3run; 04/13/13 19:39. Reason: ****

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Terrain Deform realTime [Re: 3run] #421223
04/13/13 20:51
04/13/13 20:51
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
LOL, really works well with PNG!
I noticed something else!
as the camera moves away from the model that was painted, the painting of model, fades away!

It is not effective in texture <skin 1> until the moment that the texture is saved and then the project and run again!
look!.




I think I will have problems with this because the terrain shader will not be effective on the painting.


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Terrain Deform realTime [Re: NeoNeper] #421225
04/13/13 22:16
04/13/13 22:16
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: NeoNeper
as the camera moves away from the model that was painted, the painting of model, fades away


Try
Code:
bmap_to_mipmap(ent_getskin(my, 1));


Re: Terrain Deform realTime [Re: HeelX] #421229
04/13/13 23:05
04/13/13 23:05
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
HeelX@ is there anyway, to save the current painting on the alpha channel from the acknex? It could be better to handle the terrain shader I guess.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Terrain Deform realTime [Re: 3run] #421232
04/14/13 07:40
04/14/13 07:40
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: 3run
HeelX@ is there anyway, to save the current painting on the alpha channel from the acknex? It could be better to handle the terrain shader I guess.


You can of course use the pixel_* functions to read out the alpha channel and put it into another bitmap. But why? Normally, a blendmap stores on seperate channels of a RGBA bitmap the influences of the 4 textures (not including the first texture, which is always tiled over the terrain as base layer).

P.S: I posted here a function to save TGAs properly.

Re: Terrain Deform realTime [Re: HeelX] #421351
04/15/13 22:54
04/15/13 22:54
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
> TerrainMultiTexture Shader + Paint Texture in RealTime.

////////////////////////////////////////////////////////////////
//
//PAINT TERRAIN by NeoNeper - Julio Pereira.
//Credit to HeelX for assign functions and supporting material
//for the creation of this example
//------------------------------------------------------------
// FXMODELTEX3NM SHADER
//------------------------------------------------------------
// Copyright (c) 2011, Christian Behrenberg [1]
--------------------------------------------------------------
// REFRENCES
// [1] http://www.christian-behrenberg.com
--------------------------------------------------------------


Terrain Paint V.1.2 Download

> Inside the folder "texture Backup" contains a texture Beckap for change when you want to reset your painting!
**********************BRUSH OPTIONS****************************\n
Key 1 = Texture MASK PINK\n
Key 2 = TEXTURE MASK GREEN\n
Key 3 = TEXTURE MASK BLUE\n
Key T = TEXTURE MASK SHADOW\n
Mouse Left = PaintTerrain"

PS: I was interested in posting this, Editing the first post of this topic, but the button ("EDIT") no appear.(T.T) For this reason that I had here in the middle of the topic. I apologize for that!.

///////////*DOUBTS FOR NEXT VERSION*////////////////////////////


1 > Is there any way that allows me to add transparency in the color I paint on the ground? Thus I believe it would be possible to overlay color and (skin4 Shadow color) would be applied correctly in my example
ex: alpha_to_pixel() LOL (^.^).


2> HellxX you could help me add another texture to the shader?

4 Textures would be great!

Last edited by NeoNeper; 04/15/13 23:01.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Terrain Deform realTime [Re: NeoNeper] #421352
04/15/13 23:10
04/15/13 23:10
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Looks pretty cool man! Next thing is deforming or what? laugh BTW, if you go with deforming, better save the terrain itself, instead or saving the game. Keep this up!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Terrain Deform realTime [Re: 3run] #421378
04/16/13 11:16
04/16/13 11:16
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
(^.~) Tanks.

Terrain deforming in the FIRST POST of the TOPIC! V1 And V.2.
Just want include changes of which I asked help on the previous message!

After that I will create another source.

HeelX Quote:
Quote:

You mean the stretching? This is caused by the UV map and can not sufficiently be recalculated without distorting neighbouring terrain patches. But you could use a ttriplanar UV mapping with a shader to calculate texcoords by slope, see this: http://memoirsofatexel.blogspot.de/2010/08/terrain-triplanar-uv-mapping.html or http://devblog.drheinous.com/2012/06/triplanar-texturing.html or http://http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html.


And then will come the end of sources!

I always had a lot of doubts regarding terrain Deform, regarding TErrain Shader, regarding UV TErrain, regarding land Paint Terrain ....

I then decided to create this topic to learn about it and to share it with everyone who also may have these doubts!
Just thank you all for helping me! I'm learning a lot.

Quote:

...
better save the terrain itself
...


I am saving a money for acquire the plugin of the HeelX.
With it will be possible to save the changes directly in the terrain .hmp!
To all who need this implementation, just purchase the plugin of the HeelX

Last edited by NeoNeper; 04/16/13 11:29.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Page 2 of 2 1 2

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