Jump to content

Jedi Academy turned 20 this year! We celebrated in a ton of different ways: mod contest, server event, podcast, etc. Thank you to all who have been a part of this game for the last two decades. Check out the anniversary content!

Read more

Welcome to JKHub

This community is dedicated to the games Star Wars: Jedi Outcast (2002) and Jedi Academy (2003). We host over 3,000 mods created by passionate fans around the world, and thousands of threads of people showcasing their works in progress and asking for assistance. From mods to art to troubleshooting help, we probably have it. If we don't, request or contribute!

Get started

This game turned 20 years old this year, and it is still one of the greatest Star Wars games of all time. If you're new or returning from a long hiatus, here are the basics of getting started with Star Wars Jedi Knight Jedi Academy in 2023.

Read more

Terrain Creation using Easygen


Szico VII

Originally written by Rgoer

  • Title: Terrain Creation in EasyGen
  • Subject: How to create terrain using EasyGen
  • Written by: Rgoer
  • Tutorial written for: JK2/3
  • Similar concept work like in: Hand-Shaped Terain in Radiant.
  • Difficulty level: 4/10
  • Expected time to complete for first attempt: 30mins
  • Prerequisites:Basic proficiency in JK3 modding and radiant.


Download EasyGen (as of this writing, version 1.42 is the most recent)

This version INCLUDES the custom rgoer templates...but don't fire EasyGen up quite yet.

Before we get going, we need to create a heightmap. A heightmap is just a greyscale bitmap file, where each pixel defines the elevation of one brush vertex of EasyGen terrain.
FRlkOwy.jpg

This is an example of a heightmap:

S0v6C43.jpg

When you paint your own heightmap, you need to keep in mind that your heightmap needs to be one pixel wider in every dimension than the number of terrain brushes you want to make up one "side" of your terrain "square." For example, I wanted a 48-by-48 terrain, so I painted that example heightmap to be 49-by-49 pixels. This is because each heightmap pixel corresponds to a single brush vertex, and the vertex count is always one more than the brush count (one single brush has two vertexes per side).

Anyway, heightmaps aren't that complicated: brighter pixels represent higher elevation, and darker pixels are lower. White is the highest, black the lowest. If you have access to landscape software like Bryce or Terragen, you can export some nice heightmaps from those programs...

The only important peculiarities about EasyGen heightmaps is that they must be greyscale (8/16/24 bit all work fine), and they must be in Windows Bitmap (*.bmp) format.

Now it''s time to fire up EasyGen...
When you first start EasyGen up, you''ll probably see something like this:
52ZU1J7.jpg

Now is a good time to familiarize yourself with EasyGen''s 3D view controls. For the most part, you can move the camera with the same controls you use in Radiant. You also can drag the camera on the x/y plane with the right mouse button, and orbit with the left. Once you feel comfortable with EasyGen''s camera, feel free to move on.

As with any new software, one of the first things you want to do is check out the preferences. This tutorial was written with Star Wars Jedi Knight: Jedi Academy in mind, but you can alter the JA specific stuff here to work with whatever game you please. Here is how you should set your preferences up to work with JA:
wH6nXAW.jpg

Hit "OK" to save your changes to the preferences; now it''s time to import our heightmap:
L8cgfqD.jpg

You'll be confronted with a "Bitmap Import Setup" window. Hit the "Browse..." button and find your heightmap, then set the height to something larger than the default 256 units... however tall you had in mind when you painted the heightmap, something in the 1024 to 2048 range generally works for most cases.
GbfS8B9.jpg

Now, once we've imported the heightmap, we should see something along these lines:
xvst9rY.jpg

And now the important stuff...
All of the EasyGen magic happens in the "Alphamap" tab... so let''s head that way:
lGFol8j.jpg

We need to load some textures in order for EasyGen to have something with which to work its wonders... if you're working with JA, and you want to use default JA textures, you''ll need to unpack some from assets1.pk3 (in base). After you've done that, choose "Add folder..." from the "Textures" menu:
rrZhpnR.jpg

In the little browser, navigate to whatever texture directory you want to work with; I chose the "desert" set that I unpacked from assets1.pk3. At this point, notice that EasyGen tells you exactly what to do, right on the screen:
o4jLW3b.jpg

Click the first black square, pick a color, then choose a texture from the textures well. Oooh, ahhh; hit the little brown and green button I have circled in that image, and you''ll see that the terrain is now covered in the texture you just picked.

Now you want to create a palette of more color/texture combinations. Pick as many textures as you think you'll want to blend together on your terrain. Set your brush size with the "Paint radius" slider, and go to town painting on your terrain by holding ctrl+shift and using the left mouse button.

Keep this in mind:
Quake III (and, by extension, any Q3-engine game) can only blend at most TWO textures on a single surface triangle. EasyGen knows this, and warns you if you start creating three-way (or more than three-way) blends by turning the offending triangles black. If you start noticing triangles going black, it means you are trying to blend too many textures on a single surface, and you need to go back and repaint your blends until you have, at most, two textures blending on any given surface.

And now we wrap things up...
Eventually, you''ll end up with something like this:
ao4rZZH.jpg

Once you're satisfied with how your terrain looks (and you''ve remedied any black-triangle blending errors), you're ready to hit the "Export Terrain Entity" button (circled in red). You''ll be greeted with the "Radiant .map and related stuff settings" window... you want to set it up following this example:
RV3Xi8H.jpg

It is key that you installed the "rgoer" templates correctly, and that you added "rgoer" (without quotes) to the templatelist.txt file. Also, note that I used the name "tutorial" for all my map-specific names; you will want to use whatever the name of your map or project is in those instances.

The alphamap should be saved to the base directory; just click the little "..." button and give it a name. This creates a .pcx file that indexes which textures should be placed where by the compiler.

The shader should be saved to the scripts directory; EasyGen was designed to work with Quake III: Arena, and this is a throwback to that game. We'll move the shader file to the shaders directory in a minute.

Lastly, make sure that you put "system/terrain" in for the "top" and "system/caulk" in for the "sides" of your terrain brushes. This is a must (pretty much everything on this export settings screen needs to be set up just right, or your terrain blending won''t work).

Now you're ready to hit "Continue >>", give your terrain map a name, and let it rip.
L7OJPvF.gif

Now we're really getting there. Move your .shader file from the scripts to the shaders directory, and open it up in your text editor; there is one small change that must be made by hand, due to a bug in EasyGen.

Down at the bottom of the shader defitions, the very last one should be a definition for a shader called "terrain_base." This is the shader called by all the q3map_baseshader lines in the rest of the shader file, so it should be first (not last). Select this shader, cut it from the end, and paste it back in at the top so that it is the very first shader defined in your .shader file. Save it and you''re done.

Finishing Up:
All you have to do now is add your shader file to shaderlist.txt and copy/paste your terrain entity from the .map EasyGen created into whatever .map you''re working on.

You don't want to use the .map created by EasyGen, because it puts a bunch of garbage into the worldspawn that makes the .map unusable.

The terrain entities (which are really just func_groups) are fine, though, and you can just select the terrain, copy it, and paste it into whatever .map you want to, or load the map as a prefab into a new map.


User Feedback

Recommended Comments

butykoSh.

Posted

Hello! 🙂 Where can I download the rgoer template? It would be really nice to have it.  🙂

Thank you.

Circa

Posted

11 minutes ago, butykoSh. said:

Hello! 🙂 Where can I download the rgoer template? It would be really nice to have it.  🙂

Thank you.

It is linked in the tutorial.

butykoSh.

Posted

Okay, but nothing happens, when I click it

Circa

Posted

5 hours ago, butykoSh. said:

Okay, but nothing happens, when I click it

Hm, I think it was because it was a non-https link. I fixed that, try now. It works for me.

butykoSh.

Posted

On 5/17/2023 at 11:37 PM, Circa said:

Hm, I think it was because it was a non-https link. I fixed that, try now. It works for me.

Thank you very much, works just fine!!! ❤️



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...