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
0 registered members (), 1,094 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Print Thread
Rate Thread
Page 1 of 2 1 2
Terrain Deform realTime #420993
04/08/13 12:30
04/08/13 12:30
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Hello friends!
I began a study to learn how to modify the mesh of my terrain in real time!
This is my first contact with this subject, so I decided to start with the basics then go for getting more advanced!

I would then share with the community the results that I am getting over the learning!

And also wish I could use this topic to take my doubts about it

=============================================================
For those interested:
Terrain Deform - V.1
Terrain Deform - V.2
V.1 Screen

V.2 Screen


**********************BRUSH OPTIONS****************************\n
> Key 1 = Brush Single Vertex\n
> Key 2 = Brush Multiple Vertex\n
> Key 3 = Brush Multiple Vertex + Smoot\n
> KEY T = Terrain Max Height SET ( 0 FALSE | 1 TRUE)
> Ctrl + Mouse Well = Brush Amount Incress and Decress\n
> Shift + Mouse Well = Brush Size\n
> Alt + Mouse Well = Deform Max Height\n
**********************SYSTEM OPTIONS****************************\n
> W A S D = Camera Move\n
> Q and E = Camera Pan\n
> Mouse Left And Right Click = Upper and Rise Terrain Deform"

PS: To remove changes made in the terrain, just delete the file (level1.SAV).

Last edited by NeoNeper; 04/11/13 22:58.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Terrain Deform realTime [Re: NeoNeper] #420995
04/08/13 12:38
04/08/13 12:38
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
hi

check this out: Widi's terrain deformer for A7 and A8
I got ideas for my terrain deformer mainly from this.

the download link is broken but you should find it in an AUM based on the date of this thread.

moreover you don't need updatehull since last version update, that bug was fixed finally.

Last edited by sivan; 04/08/13 12:39.

Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Terrain Deform realTime [Re: sivan] #421000
04/08/13 13:19
04/08/13 13:19
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 Sivan (^.^).
I'm not finding the sources of Widi!
And thanks for letting me know about the c_updatehull. I will update my files!

If you have files of the WIDI, make available to me! I would be grateful


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Terrain Deform realTime [Re: NeoNeper] #421009
04/08/13 14:04
04/08/13 14:04
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
okay, I can upload it.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Terrain Deform realTime [Re: sivan] #421153
04/11/13 23:20
04/11/13 23:20
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Updated the first post of this topic!

As you can see, this new version was implemented options for multiple Vertex and also to Smooth move Multiple vertex!

Questions for next version!
==================================================
that way I can modify the scale of the texture in places where the terrain mesh was modified?


And Other Doubs.
How can I PAINT my texture in real time?

Last edited by NeoNeper; 04/12/13 13:26.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Terrain Deform realTime [Re: NeoNeper] #421193
04/13/13 00:35
04/13/13 00:35
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
that way I can modify the scale of the texture in places where the terrain mesh was modified?
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.

Originally Posted By: NeoNeper
How can I PAINT my texture in real time?
If you are working with a blendmap, you need to update a texture. For this you can use bmap_process to apply changes, or you change the bitmap with the pixel functions, which is kinda slow. Basically, all you have to do per frame is

1.) to convert the mouse cursor position from view space to object space
2.) convert that from object to uv space as offset for the drawing
3.) iterate over all pixels: for each pixel calculate strength and update

in your multitexturing shader you have to use this bitmap then; you can either update the entity's texture of the blendmap or you create a dynamic blendmap on the fly and assign it as material bmap on skin 1 or else.

Re: Terrain Deform realTime [Re: HeelX] #421195
04/13/13 01:14
04/13/13 01:14
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Again I thank you for taking the time and patience to help me HeelX! (^.^)!.
The links on UV textures that you presented to me are very useful, I will take some time studying to implement on my project!

I will first try to implement the painting of the terrain in real time!
I want to use Blend Map for texture.

Quote:

...or you create a dynamic blendmap on the fly and assign it as material bmap on skin 1 or else.


This seems way cooler (ô.Ô)LOL!.
I believe that the process more effective would be I actually use a dynamic texture!.
When I'm Painting the terrain, I'm actually painting the blend Map and refreshing the terrain shader...
+ ou - (^.^)

I will begin implementing the first 3 steps you showed me.
Quote:

1.) to convert the mouse cursor position from view space to object space
2.) convert that from object to uv space as offset for the drawing
3.) iterate over all pixels: for each pixel calculate strength and update


I will consult the Manual about bmap_process!

If you have something else to help me, every hint and supporting material are welcome!.

TANKX MAAN (^.^);
Soon I'll be showing my results!


Last edited by NeoNeper; 04/13/13 01:14.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Terrain Deform realTime [Re: NeoNeper] #421210
04/13/13 16:26
04/13/13 16:26
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Terrain Paint -V.1


> Mouse Right for Paint Terrain
> Key Esc or Close Enguine Button for Save Texture.
> Inside the folder "texture Backup" contains a texture Beckap for change when you want to reset your painting!



==========================================================

Now I can already paint the land and save BlendMAP after modifications.

I believe that now it is interesting to use the shader to multiple terrain textures from a painted Blendmap

Before starting to implement this part I would like someone to help me with the problem mentioned below!
Doubt:
-----------------
I Am Using bmap_save(BMAP*, STRING* name), to save the modified map. But he's saving the texture mirrored!

How can I save the map without a mirror?

TANKX BROTHERS!

Last edited by NeoNeper; 04/13/13 16:27.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Terrain Deform realTime [Re: NeoNeper] #421217
04/13/13 19:04
04/13/13 19:04
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
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.

Re: Terrain Deform realTime [Re: HeelX] #421219
04/13/13 19:29
04/13/13 19:29
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
not working when using BMP!. After he saves I can not run again.
BAD FILE FORMAT!. The map is being saved with some property that disables executable rights later!

Apparently, he is converting bmp 24bit to 32bit

Last edited by NeoNeper; 04/13/13 19:31.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Page 1 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