Jump to content

Landscapes and terrain


uhntis
 Share

Recommended Posts

here's a little guid on how to use landscapes on your custom maps. well you can't create new landscape atm, but you can use the ones available in the missions.

graw20060625185001651xy.th.jpg

first of all: sorry for my bad english... i hope you get the point. if not, ask.

i found a total of 5 landscapes you can use. they are not available through the editor in its current state, but you can edit your latest world.xml to spawn them in your map.

once you edited your world_x.xml file you need to edit the texture_scope.xml in the work_temp folder in order to get the textures into your bundle-file, set it to write protected and compile the map again. i think this method can also be used to use statics/props that the standard sets from the editor dont let you put into the map.

so here's a step by step description on how to implement the terrain from mission 6 "Ready for bear":

1. Open the GRAW Editor, create your new map and save it

2. Go to costum_levels/work/YOURMAPNAME

3. open up world_0.xml (or your latest version of it)

4. find the node <static name="first">

5. insert the following xml-code


			<unit name="gp_mission_06_landscape" unit_id="1" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-5250" pos_y="-7250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

				</spawn_points>

			</unit>

if this is your only object on the map, it should now look like this:

<worlds>

	<world name="world" max_id="0" level_name="gp_mission_06_landscape">

		<cover name="first">

		</cover>

		<electric name="first">

		</electric>

		<wires name="first">

		</wires>

		<player name="first">

			<unit name="ghost_player" vehicle_id="none" mod="OnFoot">

				<position pos_x="0" pos_y="0" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

			</unit>

		</player>

		<sky name="first">

			<rotation yaw="0" pitch="0" roll="0"/>

			<setup sky_name="mp01"/>

		</sky>

		<small_static name="first">

		</small_static>

		<sounds name="first">

			<sound name="generic1" cue="generic_loop01">

				<position pos_x="-28506" pos_y="41271" pos_z="5079"/>

			</sound>

			<sound name="generic2" cue="generic_loop02">

				<position pos_x="12859" pos_y="-46865" pos_z="5161"/>

			</sound>

			<sound name="generic3" cue="generic_loop03">

				<position pos_x="52085" pos_y="42165" pos_z="5625"/>

			</sound>

		</sounds>

		<milieus name="first">

		</milieus>

		<static name="first">

			<unit name="gp_mission_06_landscape" unit_id="1" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-5250" pos_y="-7250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

				</spawn_points>

			</unit>

		</static>

		<static_addon name="first">

		</static_addon>

		<vehicle name="first">

		</vehicle>

	</world>

</worlds>

(if you want to cut-and-paste this code, make sure to edit level_name in the world-tag to your own level name) 6. change the unit_id number, if you already have objects in your map, but maybe its best to insert the lendscape first and add everything else after that. 7. fire up the editor, load the map and you will see the landscape as a static object. graw20060625185735428bx.th.jpg 8. add statics and props... whatever to your map. 9. export the map; yeah the lightmaps may take long, lower the settings to draft or something to make the process faster. 10. if you open the map in GRAW now, you will notice that most of the texture is checkered. the standard sets the editor offers you uses several texture sets and most of the textures for the terrain isnt included. 11. to include the textures needed for the landscape, find "texture_scope.xml" in the folder "custom_levels\work_temp\data\levels\custom_levels\YOURLEVELNAME". this directory is only available, if you have already compiled the map. 12. add the following code inside the <scope> tag:

  <xi:include href="/data/settings/set_texture_scope.xml#xpointer(/include/mission06/*)"/>

your texture_scope.xml should now look something like this:

<scope>

	<xi:include href="/data/settings/set_texture_scope_editor.xml#xpointer(/include/common/*)"/>

	<xi:include href="/data/settings/set_texture_scope_editor.xml#xpointer(/include/industrial/*)"/>

	<xi:include href="/data/settings/set_texture_scope.xml#xpointer(/include/mission06/*)"/>

	<texture_set name="atlas_mission_specific/mission03_specific/cube" />

	<texture_set name="atlas_mission_spec_editor/backdrop_cube_d" />

	<texture_set name="atlas_graffiti/atlas_graffiti_001" />

	<texture_set name="custom_levels/highway/lightmaps" />

	<texture_set name="atlas_props" />

</scope>

i know this may add alot of not needed textures. maybe we can figure out later what textures are exactly needed for the landscape static-object... or maybe the GRIN guys can give us a hint :) 13. now this is important: after you saved the edited texture_scope.xml make it write protected. the editor will overwrite the file if you dont do this. 14. open up the editor again and export the map again. to get good results you may want to set your lightmap rendering-settings acordingly. if you have already rendered the lightmaps at a good quality, you can skip lightmaps rendering at all. the import thing is only to get the edited texture_scope.xml into the bundle. this may also be possible by running bundler.exe from the command line - i didn't figure out how to do it proberly yet. 15. that's all. run GRAW and enjoy the landscape. 16. don't forget to disable write-protection on texture_scope.xml after youre done. if you dont do the file wont get deleted the next time you export a map and will be imported to the wrong bundle file, what may couse several problems. here are all landscapes i found and the xml-code you have to insert into the world.xml: DM05 "Hollow"

			<unit name="gg_mp_landscape_01" unit_id="1" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-1750" pos_y="1250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

				</spawn_points>

			</unit>

mission04 "Strongpoint"

			<unit name="gg_mission_04_landscape" unit_id="1" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-250" pos_y="-250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

				</spawn_points>

			</unit>

mission05 "Mayday!Mayday!"

			<unit name="gp_mission_05_landscape" unit_id="1" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-250" pos_y="-750" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

				</spawn_points>

			</unit>

mission06 "Ready for bear"

			<unit name="gp_mission_06_landscape" unit_id="1" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-5250" pos_y="-7250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

				</spawn_points>

			</unit>

If you want to use the tunnel in mission06, also add this:

<unit name="ind_tunnel_end" unit_id="196" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-750" pos_y="-4250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_road" unit="ind_tunnel_end_road" unit_id="4750"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_segment" unit_id="197" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-1750" pos_y="-4250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_lamp01" unit="ind_tunnel_lamp" unit_id="4751"/>

					<spawn_point object="spawn_lamp02" unit="ind_tunnel_lamp" unit_id="4752"/>

					<spawn_point object="spawn_road" unit="ind_tunnel_segment_road" unit_id="4753"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_turn" unit_id="198" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-2750" pos_y="-4250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_lamp01" unit="ind_tunnel_lamp" unit_id="4754"/>

					<spawn_point object="spawn_lamp02" unit="ind_tunnel_lamp" unit_id="4755"/>

					<spawn_point object="spawn_lamp03" unit="ind_tunnel_lamp" unit_id="4756"/>

					<spawn_point object="spawn_lamp04" unit="ind_tunnel_lamp" unit_id="4757"/>

					<spawn_point object="spawn_lamp05" unit="ind_tunnel_lamp" unit_id="4758"/>

					<spawn_point object="spawn_lamp06" unit="ind_tunnel_lamp" unit_id="4759"/>

					<spawn_point object="spawn_lamp07" unit="ind_tunnel_lamp" unit_id="4760"/>

					<spawn_point object="spawn_lamp08" unit="ind_tunnel_lamp" unit_id="4761"/>

					<spawn_point object="spawn_road" unit="ind_tunnel_turn_road" unit_id="4762"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_segment" unit_id="201" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-5250" pos_y="-7250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="90.000862"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_lamp01" unit="ind_tunnel_lamp" unit_id="4763"/>

					<spawn_point object="spawn_lamp02" unit="ind_tunnel_lamp" unit_id="4764"/>

					<spawn_point object="spawn_road" unit="ind_tunnel_segment_road" unit_id="4765"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_alcove" unit_id="205" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-4750" pos_y="-8750" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="-90.000862"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_lamp01" unit="ind_tunnel_lamp" unit_id="4766"/>

					<spawn_point object="spawn_lamp02" unit="ind_tunnel_lamp" unit_id="4767"/>

					<spawn_point object="spawn_road" unit="ind_tunnel_alcove_road" unit_id="4768"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_segment" unit_id="202" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-5250" pos_y="-9250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="90.000862"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_lamp01" unit="ind_tunnel_lamp" unit_id="4769"/>

					<spawn_point object="spawn_lamp02" unit="ind_tunnel_lamp" unit_id="4770"/>

					<spawn_point object="spawn_road" unit="ind_tunnel_segment_road" unit_id="4771"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_alcove" unit_id="206" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-4750" pos_y="-10750" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="-90.000862"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_lamp01" unit="ind_tunnel_lamp" unit_id="4772"/>

					<spawn_point object="spawn_lamp02" unit="ind_tunnel_lamp" unit_id="4773"/>

					<spawn_point object="spawn_road" unit="ind_tunnel_alcove_road" unit_id="4774"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_turn" unit_id="199" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-7250" pos_y="-13750" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="-179.99998"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_lamp01" unit="ind_tunnel_lamp" unit_id="4775"/>

					<spawn_point object="spawn_lamp02" unit="ind_tunnel_lamp" unit_id="4776"/>

					<spawn_point object="spawn_lamp03" unit="ind_tunnel_lamp" unit_id="4777"/>

					<spawn_point object="spawn_lamp04" unit="ind_tunnel_lamp" unit_id="4778"/>

					<spawn_point object="spawn_lamp05" unit="ind_tunnel_lamp" unit_id="4779"/>

					<spawn_point object="spawn_lamp06" unit="ind_tunnel_lamp" unit_id="4780"/>

					<spawn_point object="spawn_lamp07" unit="ind_tunnel_lamp" unit_id="4781"/>

					<spawn_point object="spawn_lamp08" unit="ind_tunnel_lamp" unit_id="4782"/>

					<spawn_point object="spawn_road" unit="ind_tunnel_turn_road" unit_id="4783"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_end" unit_id="180" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-9250" pos_y="-13750" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="-179.99998"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_road" unit="ind_tunnel_end_road" unit_id="4784"/>

				</spawn_points>

			</unit>

			<unit name="ind_tunnel_segment" unit_id="207" name_id="none">

				<light force_light="false" light_on="false"/>

				<position pos_x="-7750" pos_y="-13250" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

					<spawn_point object="spawn_lamp01" unit="ind_tunnel_lamp" unit_id="5000"/>

					<spawn_point object="spawn_lamp02" unit="ind_tunnel_lamp" unit_id="4786"/>

					<spawn_point object="spawn_road" unit="ind_tunnel_segment_road" unit_id="4787"/>

				</spawn_points>

			</unit>

mission08 "Guardrail IX"

			<unit name="gg_mission_08_landscape" unit_id="1" name_id="land">

				<light force_light="false" light_on="false"/>

				<position pos_x="12250" pos_y="5750" pos_z="0"/>

				<rotation yaw="0" pitch="0" roll="0"/>

				<lightmap scale="1"/>

				<spawn_points>

				</spawn_points>

			</unit>

Maybe i will add the textures you have to include for each landscape later, or somone else can figure it out. I also havent tested how playable maps with these terrains are.

Edited by uhntis
Link to comment
Share on other sites

Very good work uhntis!

Just adding some info:

well you can't create new landscape atm

yes you can using the diesel exporter. Exactly how to set up everything do this takes a long time to explain. However, if you could figure this out, adding stuff should not be too difficult. We are hoping to release tutorials on how to do this, but any experienced modder should not have much problems. Don't pm me on this, instead wait for a tutorial.

And regarding texture scopes. Here are some hints:

Mission 04 is shanty set

mission 05 park

mission 06 is either park or industrial (not sure)

mission 08 is shanty

DM05 is shanty

so just add the textures you need, but on the other hand I think that the editor wont load textures that aren't used. On the other hand, I'm not sure about this so proceed with caution :)

check for more texture scopes at settings/set_texture_scope.xml

Link to comment
Share on other sites

I just ran a test on the terrain and everything had checkers when doing the quick compile, and i also couldnt see grenades being launched from launcher... just the sound of it... but guns and throwing grenades worked fine... could that just be because i havent done a full compile?

Never seen that before... is there something we need to script for grenade launchers to work?

Link to comment
Share on other sites

Good post Kudos to you guys. :grin1:

This is awesome... is there any way to rotate/move the landscapes or are we stuck with where they show up in the editor?

sure. the editor handles the landscape just like any other static-object (middle mouse button to rotate). or you may edit this line in your world_X.xml:

<position pos_x="-5250" pos_y="-7250" pos_z="0"/>

<rotation yaw="0" pitch="0" roll="0"/>

Link to comment
Share on other sites

Good post Kudos to you guys. :grin1:

This is awesome... is there any way to rotate/move the landscapes or are we stuck with where they show up in the editor?

sure. the editor handles the landscape just like any other static-object (middle mouse button to rotate). or you may edit this line in your world_X.xml:

<position pos_x="-5250" pos_y="-7250" pos_z="0"/>

<rotation yaw="0" pitch="0" roll="0"/>

wow we posted at the same time... read the one before yours

Link to comment
Share on other sites

I just ran a test on the terrain and everything had checkers when doing the quick compile, and i also couldnt see grenades being launched from launcher... just the sound of it... but guns and throwing grenades worked fine... could that just be because i havent done a full compile?

Never seen that before... is there something we need to script for grenade launchers to work?

sound and stuff is handled by the textures i think. since you have problems with the textures = wrong or no sound.

don't forget to edit the texture_scope.xml in the custom_levels\work_temp\data\levels\custom_levels\[YOURMAPNAME] folder and make it write protected. you have to add the texture set that the landscape uses. if you use gp_mission_06_landscape from mission 6 "ready for bear" add the line

<xi:include href="/data/settings/set_texture_scope.xml#xpointer(/include/mission06/*)"/>

after you did this, export the map again. (you have to do it once in order to get the files into the work_temp folder).

to do a quick check i think it's enough to render the lightmaps in draft quality.

don't forget to make the texture_scope.xml readable again or delete it, before you work on another map.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...