![]() |
|
|
|
|
#1 |
|
Banned
Join Date: Apr. 7th, 2004
Location: The Netherlands
Posts: 7
|
Hi,
First of all, I'm not trying to make a game, but I'm curious if I can use the runtime to visualise scientific (geological) data. So before I dive into the depths of the code/engine, I hope you're willing to answer some newbie's questions (TIA ![]() So I have text files with (x,y,z) values, a height table. 1. Is there any way to quickly generate a terrain from those values? 2. Is there any way to write those values directly into an unreal level file and view the results? (this would be really nice to automate the level generation, allowing for real-time interaction between visualisation and modelling) Thanks in advance! Jos |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Oct. 22nd, 2003
Posts: 51
|
1. You could code a program to create a 16bit greyscale bitmap (G16) from your text file, which could in turn be used as a heightmap in a terraininfo actor.
2. Well you cant get much quicker then just selecting a new heightmap in your existing level. But if you wanted to, you could code your own program, but this time have it so it creates an unreal map in .t3d format which is rather basic. My advice though would be just to keep a template map and import your new height maps into the template, and then if you like it and wont to do more with it save it under a different name. NB: If you are not worried about performance you could make your on brush builder and build your terrain out of it instead, then you could just format text file so it can be loaded as a config file for the builder. However I still think a separate height map generator is the way to go. Part 2 continued. If I was doing this, I would code my terrain generator in a direct x app and have a preview window where the low vertices were blue and the high white (in between green ie. Sea, grass, snow). So I could preview it without having to import the heightmap into the unreal editor. Last edited by ttl; 7th Apr 2004 at 11:59 PM. Reason: updated part 2 |
|
|
|
|
|
#3 | |||
|
Banned
Join Date: Apr. 7th, 2004
Location: The Netherlands
Posts: 7
|
Hi,
Quote:
Quote:
Quote:
- what does the .t3d file specification look like? - how do 'brushes' work and how can they be built? - what's a good tutorial to learn making easy levels, without any combat/game related stuff? - why is there no help document for the runutime yet? :-) Any help with any of these would be highly appreciated Jos |
|||
|
|
|
|
|
#4 | ||||||
|
Registered User
Join Date: Oct. 22nd, 2003
Posts: 51
|
Quote:
Quote:
Quote:
Quote:
NB: This is the "difficult" way of doing things, so dont say I didnt warn you :P Quote:
![]() Quote:
Note: you can also do some fancy stuff using #execs if you dont want to go the .t3d way |
||||||
|
|
|
|
|
#5 | |
|
Registered User
Join Date: Oct. 22nd, 2003
Posts: 51
|
I just thought I'd mention you can do some pretty cool stuff just using the editor console. I made a few .txt file you can "exec" in the console. I have attached them along with some example heightmaps and a t3d file that the .txt files use. If you wanted to you could code you're external program to to find the console command window in unrealed and send an exec command that loads a .txt file to import your newly created heightmap.
Anyway the example files and a readme is included in the attached zip file. To give you a general idea of what this does before you download it, here's a cut out from the readme: Quote:
Edit: The original file was removed, if you want the updated version check my next post. Last edited by ttl; 14th Apr 2004 at 11:21 PM. Reason: removed the file, check my next post for an updated version |
|
|
|
|
|
|
#6 | |
|
Banned
Join Date: Apr. 7th, 2004
Location: The Netherlands
Posts: 7
|
Quote:
I'm at work at the moment (5pm local time), but i'll definitely look into it later. Jos |
|
|
|
|
|
|
#7 |
|
Banned
Join Date: Apr. 7th, 2004
Location: The Netherlands
Posts: 7
|
These scripts are really useful, and knowing that thay can be made maybe even more so. Playing around with them I find that you have to be patient with the editor though - it tends to crash often and hard...
![]() New questions have risen from your excellent help - importing new terrains (the three bmp files) into the runtime map seems to give some unwanting effects: - the terrain is not visible generally, just the other stuff (the bridge, waterfall, river, wheatfields etc) - the playerstart is usually not in a valid place and has to be placed manually, but that could be related to the first issue - although the terrain isn't visible, trees etc are floating in mid-air, so it seems like the terrain is there but is not rendered. However, walking into the void causes sinking down any general idea what could be the problem? Or is it just too much to ask of the editor to add a terrain that doesn't match the rest of the level and compute what's supposed to change? Jos |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Mar. 18th, 2002
Posts: 143
|
Yeah, your best bet is to convert your text data (DEMs?) into a 16-bit greyscale BMP or TGA heightmap, and import that.
You should be able to write a commandlet to generate the map if all you have is terrain and BSP in that regard. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Mar. 18th, 2002
Posts: 143
|
Make a normal map in UnrealEd that's set up the way you want it. Make a fake terrain using the built-in terrain tools that's the size you want, but instead of storing the terrain in MyLevel, store it in its own package. Save the map. Then export that map to T3D.
When you want to create a new map, make a copy of your T3D file, and in a regular text editor, change the reference to the terrain texture and package name. Make a new package and texture with that new name, using the new terrain you've made. Load up that package in the editor, and then import the T3D, and do a full rebuild. Presto change-o, you have a new map with nearly no work. And there is a help file for the Runtime. It's called UDN. Start at http://udn.epicgames.com/Content/WebHome and work your way from the top of the table of contents on the left to the bottom. |
|
|
|
|
|
#10 |
|
Registered User
Join Date: Oct. 22nd, 2003
Posts: 51
|
np
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|