runtime editor for Terrain

Posted By: Vahid_PC_Games

runtime editor for Terrain - 06/20/11 12:31

hi guys.
i have two questions:
1- How to edit a Terrain in runtime (played game , no GED) , like this:


2- How to set other textures at a Terrain in runtime (played game , no GED) , like this:


tanks.
Posted By: Timothy

Re: runtime editor for Terrain - 06/20/11 13:37

For terrain deforming there is a script from Widi.
Link:
http://www.opserver.de/coni_users/web_users/pirvu/au/demo/zips/terraindeformer.zip

Terrain painting on the other hand is afaik only possible using a shader. I would look for an multitexture terrain shader which uses colormaps. Maybe you can change the colormaps in realtime?
Just a suggestion.

Greetings
Posted By: Vahid_PC_Games

Re: runtime editor for Terrain - 06/20/11 14:09

tanks man.
I'm waiting for more guidance.
Posted By: Widi

Re: runtime editor for Terrain - 06/20/11 14:33

Here is a new link for my TERRAIN DEFORMER:
DEFORM TERRAIN A8

With the old link is a error, because since A8.10 is changed somethings with pan_setdigits...

To paint at the terrain i already have a tool too:
I use blendmaps for my terrain and painting directly to this blendmaps.
Posted By: Vahid_PC_Games

Re: runtime editor for Terrain - 06/20/11 15:01

tanks Widi , its perfect.

1- talk more about "To paint at the terrain i already have a tool too:
I use blendmaps for my terrain and painting directly to this blendmaps."

2- what is "terrain_resave.dll"?is it Source of your mod?

3- can i use this mod in C# wrapper?
Posted By: Widi

Re: runtime editor for Terrain - 06/20/11 16:48

1: I try to explain it, but my english is not so good. My terrain have blendmaps. With this blendmaps i set the detailmaps with a shader to the terrain. For example: red in the blendmaps says that in the terrain is grass, green for rocks, blue for sand and alpha for stone.
My terrain works with 2 blendmaps and i have with my shader 11 different materials for my terrain.
In your code you have to read the pixels around the mousecursor with pixel_for_bmap() from the blendmap and if you want there f.e. grass make green higher and all other colors deeper, set it in the blendmap with pixel_to_bmap() and save the blendmap.
2: With "terrain_resave.dll" you can save the changed terrain what is not possible only with 3dgs.
3: I never work with c# wrapper, so i don`t know...
Posted By: Stromausfall

Re: runtime editor for Terrain - 06/20/11 17:16

hmmm if you want to use it in C# you'll have to rewrite line by line and be aware, that some commands, like inkey don't exist in external languages !

theoretically it should be possible, but it's of course quite some work (although I guess, writing an editor always is)
Posted By: Vahid_PC_Games

Re: runtime editor for Terrain - 06/20/11 19:42

tanks guys.

dier Widi , do you have a sample or demo for your blendmaps terrains?
Posted By: Widi

Re: runtime editor for Terrain - 06/20/11 20:07

Not jet, this code is impemented in my project. But i also want to implement this part at my DEFORM TERRAIN. If you can wait until next weekend, i try to finish this part.
Posted By: Vahid_PC_Games

Re: runtime editor for Terrain - 06/20/11 20:13

OfCourse.
I'll stay waiting.
Posted By: Widi

Re: runtime editor for Terrain - 06/26/11 13:57

Here you go:

Deform and paint terrain

Read the "read first" please for more infos. The terrainshader is based on mystymood by loopix.
Posted By: djfeeler

Re: runtime editor for Terrain - 06/26/11 14:09

Thanks
Posted By: Vahid_PC_Games

Re: runtime editor for Terrain - 06/30/11 11:22

tanks man.
its very good.
Posted By: Widi

Re: runtime editor for Terrain - 06/30/11 12:15

You are welcome. Glad to see you like it wink
Posted By: Vahid_PC_Games

Re: runtime editor for Terrain - 07/12/11 08:27

again , Hello.
i dont work on "Deform and paint terrain" good , because i was busy.
but now , im work at it fully and i can say : "Its perfect".
realy tanks dear "Widi".

and now i have a new q :
how to use shaders on textures in "Deform and paint terrain"?

for example set fx_bump to textture1,mtl_toon to texture2 ... .
if can not , how to set a shader on a painting terrain by different parameter , like: texture1.bump.power=20 and texture2.bump.power=50 ... .
and if can not this , how to set a shader on a painting terrain like fx_bump .

thanks.
Posted By: Widi

Re: runtime editor for Terrain - 07/12/11 20:45

There is already a Shader added to the terrain in my program for the detailmaps (terr_hlsl_1.fx). If you want this things you have to change this shader. For shaders i am not really good, have also some problems till this shader was working. Maybee someone can help you in the "Shaders" section here in the forum.
Posted By: Logitek

Re: runtime editor for Terrain - 08/10/11 09:44

I think I have found maybe a bug in the deformer. I have tried it with the A8 trial.

If I use a terrain that has already very deep areas and if I save the terrain without big changings then the deepest areas are suddenly the highest after reloading. You understand what I mean?

It is only visible after a new start of the deformer with the changed terrain. Or if you load it with med.

It seems that the deformer has a limit of a deepest point. If a terrain is on some areas deeper than this point, then it will be raised up to the highest point.

Deep areas are then mountains.

This is only happening if you have already a nealy finished terrain from an export of example earthsculptor. Not with a flat one.

For example: This is the terrain I wanna change:

___/---

After saving it with the deformer it looks like:

____
||||\---

|||| < This I have made, because empty spaces are not visible here in the forum. You see, the bottom line is now on the top.

Would be cool if you can solve this problem.


© 2024 lite-C Forums