Blender terrain export

Your forum for all discussions around Modding.
CMMODZ
Posts: 4
Joined: Tue Oct 06, 2020 10:27 pm

Blender terrain export

Post by CMMODZ »

So i recently found out that on Houdini you can export terrain for to be put into GE just wondering if anyone knows any blender methods for this? or any other software which doesn't cost money.

Thanks.
Ziuta Modding
Moderator
Posts: 912
Joined: Sun Jul 17, 2016 9:40 am

Re: Blender terrain export

Post by Ziuta Modding »

This is nothing new, the terrain from GE is saved in the map_dem.png file, it is a graphic file so you can export it in such programs, which is also done by Hudinia on the example of videos from this forum, you can do the same in Maya or Blender
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: Blender terrain export

Post by olahaldor »

I'm not sure I follow exactly how you can do that in Maya and Blender.
As far as I know, you cannot work with it as a height map in either. You need to make a plane, subdivide it a lot of times to get a good resolution, then you can displace the plane with the heightmap.

However, this is still polygons.

You need some way to adjust the polygonal model with, say, a road or a field.
So how does one do that, and keep it intuitive and with a good performance?

Frankly, I think it's a difficult task. Loads of polygons in motion take a lot of processing power. It may be sluggish, even take a few seconds or minutes to process.

In the end, you'd have to render the polygonal object as a depth map, which basically is a black and white image, like a heightmap.
The pitfall here is; values may change. Things might not get back to GE like the way it was originally. Maybe the terrain shifts.

Unless they can work with it as a height map, per definition, I'd say you're in for a bumpy road.

Best way to test is to actually just.. test. :)

Take a plane, a heightmap file from a map, and see if there's a way you can manipulate the model and get it out without shifting the terrain when it gets back to GE .

However, if you know something I don't Ziuta, I'd be happy to be proven wrong, and learn from your knowledge.
CMMODZ
Posts: 4
Joined: Tue Oct 06, 2020 10:27 pm

Re: Blender terrain export

Post by CMMODZ »

Yeah im curious to how this is possible in blender, I've been trying to find a way to do this for years
TheSuBBie
Posts: 538
Joined: Wed Jun 10, 2020 11:38 am

Re: Blender terrain export

Post by TheSuBBie »

I am curious to know why you would want to go to the bother of trying to create/modify a terrain in any other software when you can quite happily do it for free in Giants editor.
Add to which there are several scripts (and updated for each GE version) that have been freely available on the internet along with tutorials on how to use them for many years

For example using some of these scripts and only using GE, I can quite easily create a field using a spline to create the field border,use that spline to paint only the outside area in a chosen texture (field border) again using the same spline create the field dimensions as well painting the field in the infoLayer_farmland.grle and add the correct field/NPC data to the farmlands.xml, paint the required terrain field detail in GE then finish by placing hedges all the way round the field, all in less than 10 min.

Want to create a road aligned to the terrain using the freely available scripts, no problem, again using a spline create your road layout,flatten the terrain (spline Height) run a script (Csv script), export the result to Blender, convert to a curve extrude to the required shape convert back to mesh, texture, export as i3d import into GE road aligned to terrain, done job.

Want a river that follows the contour of the terrain, two methods spline create the river shape, spline Height script , second method, open map.dem in a suitable image editor (I use a free legacy version of photoshop CS2) obviously copy paste original to save as back up, in the image editor select the Burn tool and set the brush size to the width you want (remember 1 pixel = 2m in the map.dem) Range--Shadows-- value 8% (higher value deeper river) then just draw your river route directly onto the map.dem,save open map in GE voila one river.

List of all the free software I use

Giants Editor
Google Earth
Qgis -- create 16 bit dems of real life area's
Blender
Photoshop CS2 with plugins nvidia/super png
Gimp
Materialize -- create PBR texture maps
Notepad++
and of course the tools provided by Giants Texture tool icon tool etc

If you still want to use the terrain in GE to create a road laout then first use a spline and flatten the terrain along your road route, then zoom out so your view only covers your proposed road area, export the terrain as an obj (WYSIWYG, only the terrain in view will be exported so keeping poly count to a minimum), import into Blender and work on it there, if you do make any changes to the road that require terrain height alteration in GE then either use the terrain brush or adjust the spline and re execute the spline height script.
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: Blender terrain export

Post by olahaldor »

Good question. Why bother?
Why do you bother to use scripts in GE, and even go to the length of using Blender for roads?
Would you say the same about Spline Street Constructor?

Because GE gets me this far, not far enough.

You mention "use this and that script".
Why do you think they were made?
Because modders or even the Giants devs thought "there has to be a better way"?

That's exactly why you would seek to use external tools which does the job better, more effective, more precise, more time for the fun stuff.


And why bother what others want to do? Why bother to give a reply that ridicules what the op wish to accomplish?

Ps: photoshop is not free.
TheSuBBie
Posts: 538
Joined: Wed Jun 10, 2020 11:38 am

Re: Blender terrain export

Post by TheSuBBie »

Ps: photoshop is not free.
I hate to disappoint you but the version of photshop I use IS FREE

https://www.techspot.com/downloads/3689 ... p-cs2.html

with the addition of the FREE plugins Nvidia Tools and Super Png it does everything I require for Farming Simulator and other Games modding.

I also these other FREE softwares when modifying/editing my own photo's for use in modding

Raw-Therapee -- http://rawtherapee.com/
Microsoft Visual Studio 2022 --https://visualstudio.microsoft.com/

One could also say why do you go to the bother of spending money on programmes that effectively do the same thing as the free ones
olahaldor
Posts: 252
Joined: Wed Oct 03, 2012 11:08 am
Location: Norway

Re: Blender terrain export

Post by olahaldor »

If anything I'm educated.
TheSuBBie
Posts: 538
Joined: Wed Jun 10, 2020 11:38 am

Re: Blender terrain export

Post by TheSuBBie »

@CMModz OP
or any other software which doesn't cost money.
@olahaldor
Why bother to give a reply that ridicules what the op wish to accomplish?
I think also my replies satisfy his original post
cburgess
Posts: 20
Joined: Thu May 18, 2023 2:06 am
Location: USA

Re: Blender terrain export

Post by cburgess »

olahaldor wrote: Wed Mar 15, 2023 8:55 pm ...

In the end, you'd have to render the polygonal object as a depth map, which basically is a black and white image, like a heightmap.
The pitfall here is; values may change. Things might not get back to GE like the way it was originally. Maybe the terrain shifts.

...
The "black and white image, like a heightmap" is the key here, IMHO.

I used to do this with the MSFS (flight sim) and TrainSimulator. I use dem data (microdem used to be a good program to quickly convert dem date into the gray-scale heightmaps images) as a reference to create the heightmap, and then smooth it out in Photoshop (or similar program), since the resulting file is a gray-scale image. I found it nearly impossible to re-create hi-fidelity terrain, so I simply adjusted my expectations in the final result as "good enough".

If you are making a fictional map loosely based on a specific location, creating the gray-scale image is simple in Photoshop. Black is the lowest elevation, and lighter shades to white becoming higher elevation. Use the burn and dodge tools to change the grayscale.

I am starting work on a Midwest-USA based generic map where the road system basically traces out an entire (or portions thereof) square mile of farmland (very do-able with 2x and 4x maps), I'll make the basic heightmap using PS, making the roads white for easy location in GE*, and then lower the road's terrain in GE to blend into the surrounding terrain contours.

*As an example in MS TrainSimulator, finding a RL railroad on a dem map, and making the railroad path white (highest elevation) makes it easier to find in the game's terrain editor. I'd lay the track on the path and then blend down into the surrounding terrain. Raw dem data can result in a very jagged heightmap image file, so it still needs a lot of smoothing out. What I just described is the easiest way I found, for me, to do this, but it's not the only way.
Last edited by cburgess on Fri Jun 02, 2023 8:50 pm, edited 1 time in total.
zippyo
Posts: 72
Joined: Mon Jan 13, 2020 4:38 pm

Re: Blender terrain export

Post by zippyo »

or u can export wavefront OBJ format from GE and blender gobbles that up. or maya or whatever u use
Post Reply