Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Sculpting prefabs - A Tutorial for Counter-Strike 1.6

Learn about sculpting prefabs out of a single brush, using textures to guide you.

Introduction

What do I mean by "sculpting prefabs"? Well let's look at each word individually. Sculpting is when you take a material, and manipulate it, so that it may form a desired shape. A prefab is a term used for a brush / group of brushes in VHE, which are saved in a library with a name and description. The default "prefabs", which can be found when going to brush creating mode:

  

and selecting a desired brush category in the drop down box:

 

Categories include computers, crates and more. You can now probably deduce, that "sculpting prefabs" is about taking a single brush and dividing / plus clipping it until you have molded it into your desired shape. Then, saving it in your list of prefabs for usage in your maps. Sound interesting? Then read on!

Contents

This tutorial has four different parts to it:

  1. Attaining template textures - setting up textures as a base outline for your prefabs
  2. Sculpting in a single 2D view - using one view in VHE to mould the side view of your prefab
  3. Sculpting in all 2D views - turning it 3D by moulding the prefab in all views
  4. Optimisation - making sure the prefab keeps compile times and r_speeds to a minimum
  5. Finishing off - filing your prefab and conclusion to this tutorial

1. Attaining template textures

So our first step in this tutorial is to attain the textures we would like to use for our prefab. We will be moulding our prefab according to each texture, so it is important that you use entire images for each side of your prefab. Here is an image of my textures to show you what I mean: 

 
As you can see, I'm going to mould out a truck. All the images that I need are there. The important ones are the side, front and back views. The top and bottom ones aren't so important unless you'll obviously be able to see the tops and bottoms of your prefab when they're placed in your maps. Cylinders are an exception, which are a waste of time to mould out. You can just create a standard cylinder shape, by setting your brush type to "Primitives -> cylinder". Note I: I got all the above textures from a brilliant website called CG Textures. Check it out! Note II: If you're wondering how to get textures of your own into Hammer, I made a tutorial about this which you can find here:

   

2. Sculpting in a single 2D view

Now that you have attained your textures, we can begin sculpting our prefab. First, draw out a single block with the correct scaling and dimensions of your desired prefab. Apply the SIDES of your brush with the side view texture in your library, and fit the texture onto the side to check if the scaling is correct. It's also a good idea to add a player spawn and compile the map, just to make sure that the prefab won't end up too large or too small. 

 
Now, use the clipping tool, and divide up the brushes where there are any concave shapes (A shape which "caves-into" the original brush, like the space for a set of wheels in a car).

The final outcome of mine looks like this: 

 
You can see that the initial block shape is still there, but now, it's been divided up into segments according to the concave corners of the texture (vehicle). The next step is to get rid of unneeded block segments, and clip the segments according to the convex shapes of the truck. Convex is exactly the opposite of concave, and includes all the extruding points.  After doing this, you should get something along the lines of this: 

 
It's taking shape now, although only in the side view. Once we're happy with our prefab in the side view, we can move on to:

3. Sculpting in all 2D views

We'll begin this chapter by setting our focus on the front view of our prefab. In my case, it's the front cabin of the truck. Get your front texture and fit it on all the frontal sides of your prefab. Remember to put a tick in "treat as one", or else the texture will be fitted in each individual segment. You want the texture to fit accross your selection of sides. Doing this will produce something like this: 

 
Now, use vertex manipulation in the front view to fit your shape into the frontal texture. Remember that "invalid solid structures" are created when a single brush has a concave corner. Simply split the brush into 2 seperate brushes to fix this, like how we did when splitting the concave shapes in the side view. I did a fair amount of vertex manipulation, and even had to create additional brushes - don't be scared to add extra brushes and move around existing ones to get a realistic mould. It's important to make the object as realistic as possible. 

 
Now that we've done the front side, lets now work on the rear side of our prefab. Again, use vertex manipulation, and create additional brushes if necessary until you're happy with the result. It can be hard to texturise every single side, so try to find some plain, generic textures that are of similar colour and material. Here's the backside complete now: 

 
Now, just make sure everything looks okay in the 3D view and add any details you would like with new brushes. With vehicles, it's good to leave the wheels until this stage, as they aren't difficult to texture, and can be made with a single cylindrical brush. Next, align your textures up, and try to get them to touch as seamlessly as possible. If you think the dimensions of your prefab aren't nice, you can scale the model by going "Tools -> Transform" and select "Scale". Remember to turn "texture lock" on to keep the textures aligned. Here's the final prefab of mine: 

 

4. Optimisation

Optimisation can mean many things can't it? In this case, I'm talking mostly about the usage of the texture "null". It's an essential part of mapping with VHE, so if you don't know about null, I'll tell you about it now. Otherwise, read on to the paragraph after. Null is a texture which can be painted on brushwork like any other.

It has no display image, but when it is applied to a face, the face will turn black and have a blue repeating pattern of the letter "N" all over it. Any face that is painted with the null texture will not be rendered by all of Hammer's compiling tools. The compiler will still set it as a solid face, and the player may not pass through it, but it won't be drawn. This is the main reason for using it. Simply put, it's an invisible texture. Any faces that won't be seen at any point in the map should be "nulled". Not only does this improve on r_speeds, but it also quickens compile time.

So what we're going to do now is select every part of our prefab, then go to the textures library and find the texture named "null". Apply it to every single brush. Don't leave any faces untouched! They all must be nulled!!!!! MUHAHAHHA! Now, simply select all the faces of one side of your prefab, and set them back to their original texture. Make sure not to edit the scale, rotation or position of the texure, or else the texture will go out of alignment.

Repeat this for all sides of your prefab until you cannot see anymore null textures. By doing this, all the unseen faces of your prefab will not be rendered as 3D shapes. You can verify this by moving the 3D camera inside your prefab. When you're inside, you'll see all the hidden faces that have now been nulled. 

 
That's the basics of optimisation. There are a few other techniques, but this one makes the largest difference. It'll be very noticeable, especially when you're using multiple prefabs.

5. Finishing off

So your prefab is ready! But wait... you can't just copy and paste it into your map! The final step is to save your prefab in a library. First, go "Tools -> Prefab Factory". A pop-up box should appear looking like this: 

 

Now, simply click "Add Library", and name it "Myprefabs". Close the interface and select all the brushes in your prefab. Go to "Tools -> Create prefab" and give your piece a name and description. Use the drop down box and select your "Myprefabs" folder. (You don't have to create your own folder, but I've noticed that prefabs created in the default folders tend to "disappear" or be removed, and if you haven't saved them as RMFs then you've lost it forever.)

And, this concludes the tutorial! This method may be a little sloppy at times, but it's very easy to do, and can act as a base for you to make realistically proportioned prefabs. I hope you found it of some use, and that it will aid you in your future prefab making tasks. Chow! And here's the final product in-game: 

1-10 of 15
1
Pages
  • 1
  • 2
Go to page:
  • Giani Georgian avatar
    Giani Georgian Joined 10y ago
    Offline
    183 points Ranked 74,100th
    12 medals 1 rare
    • 6 years a member Medal icon
    • Journey to the Center of the Earth Entrant Medal icon
    • Reached 1,000 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    7y
    > **Posted by Glock18** > > > **Posted by Giani A7X foREVer** > > > > ... > > Oh I didn't know that! That is very useful, maybe I will use JackHammer when I am adding models to my maps. And Yeah I heard that Jackhammer is easier to use, but also you can't do as much too. Which is why I like VHE. Well, if you're going to use V.H.E. and JackHammer too, you must develope the map in Hammer, then add the props and compile the map in JackHammer ;)
     avatar
    URL to post:
  • Glock18 avatar
    Glock18 username pic Joined 8y ago
    Offline
    4,331 points Ranked 2,204th
    29 medals 1 legendary 4 rare
    • Returned 5000 times Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    • Submitted 20 Maps Medal icon
    • 6 years a member Medal icon
    • Winter Worlds Mapping Contest Entrant Medal icon
    7y
    > **Posted by Giani A7X foREVer** > > ... Oh I didn't know that! That is very useful, maybe I will use JackHammer when I am adding models to my maps. And Yeah I heard that Jackhammer is easier to use, but also you can't do as much too. Which is why I like VHE.
    Need a mapper? PM me!
    URL to post:
  • Giani Georgian avatar
    Giani Georgian Joined 10y ago
    Offline
    183 points Ranked 74,100th
    12 medals 1 rare
    • 6 years a member Medal icon
    • Journey to the Center of the Earth Entrant Medal icon
    • Reached 1,000 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    7y
    > **Posted by ikesTRon** > > Also models have some disadvantages.. > You never know how theyre placed really and you have to set their collision by hand.. If you use JackHammer, you can put models on your map by simply creating a "cycler" entity ;) You can easily select a model from its properties box and you can see the model in 3D view :D You can see how they would look in JackHammer by simply checking out the map I'm currently working on :) I'm using JackHammer because it's easier to use it :v
     avatar
    URL to post:
  • Alberto309 avatar
    Alberto309 username pic Joined 15y ago
    GoldSource Engine Ambassador
    Ѻғғʟıղϵ
    Sapientia Studio Flag Affiliation: Sapientia Studio
    46,363 points Ranked 98th
    30 medals 2 legendary 3 rare
    • 10 years a member Medal icon
    • Returned 5000 times Medal icon
    • 3rd Place - Winter Props/Prefabs Contest Medal icon
    • 6 years a member Medal icon
    • Returned 1000 times Medal icon
    • 4th Place - GameBanana Around the Globe Contest Medal icon
    Alberto309 avatar
    Alberto309
    Sapientia Studio Flag
    Affiliation
    Sapientia Studio
    GoldSource Engine Ambassador
    7y
    > **Posted by ikesTRon** > > Also models have some disadvantages.. > You never know how theyre placed really and you have to set their collision by hand.. Not if you have the 3D preview of the model, set on the FGD file. It can be exactly like Hammer 4. For the collision made by hand, that's right.
    Gamer since 1995 avatar
    Mantra
    Gamer since 1995
    URL to post:
  • ikesTRon avatar
    ikesTRon Joined 12y ago
    Offline
    2,063 points Ranked 22,232nd
    14 medals 3 rare
    • Submitted 50 Maps Medal icon
    • 6 years a member Medal icon
    • Submitted 20 Maps Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    7y
    Also models have some disadvantages.. You never know how theyre placed really and you have to set their collision by hand..
    • Agree x 1
    Foosher avatar
    Mantra
    Foosher
    URL to post:
  • Mavkush avatar
    Mavkush username pic Joined 12y ago
    Offline
    6,849 points Ranked 1,246th
    24 medals 1 legendary 3 rare
    • 10 years a member Medal icon
    • Returned 1000 times Medal icon
    • 6 years a member Medal icon
    • Submitted 50 Skins Medal icon
    • Halloween Skinning Contest Submitter Medal icon
    • Tutorial Contest Entrant Medal icon
    7y
    > **Posted by Glock18** > > > **Posted by Sivealy** > > > > It's such a complex process. I'd prefer to use a model. > > Sure you can use a model, but you can also use a prefab. Once it's made, it's made and you can use it as easily as a model. Plus collision checkin is done by itself, you get lighting and you can tie the prefab to an entity and turn it into a moving train. as a server operator id use prefabs more than models to reduce the downloading when connecting, alltho models add pretty cool detail to the map, but longer downloads. I like them both my self. Otherthan that nice tutorial!
    • Agree x 1
    • Interesting x 1
    MAVKU$H avatar
    Mantra
    MAVKU$H
    URL to post:
  • Glock18 avatar
    Glock18 username pic Joined 8y ago
    Offline
    4,331 points Ranked 2,204th
    29 medals 1 legendary 4 rare
    • Returned 5000 times Medal icon
    • Returned 1000 times Medal icon
    • Reached 50 subscribers Medal icon
    • Submitted 20 Maps Medal icon
    • 6 years a member Medal icon
    • Winter Worlds Mapping Contest Entrant Medal icon
    7y
    > **Posted by Sivealy** > > It's such a complex process. I'd prefer to use a model. Sure you can use a model, but you can also use a prefab. Once it's made, it's made and you can use it as easily as a model. Plus collision checkin is done by itself, you get lighting and you can tie the prefab to an entity and turn it into a moving train.
    Need a mapper? PM me!
    URL to post:
  • Devieus avatar
    Devieus username pic Joined 11y ago
    Moderator
    ONLINE
    111,015 points Ranked 27th
    79 medals 8 legendary 17 rare
    • 1st Place - Tutorial Contest Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • Returned 5000 times Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • 2017 Top Contributor Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    7y
    > **Posted by Sivealy** > > It's such a complex process. I'd prefer to use a model. Not everyone knows how to make models.
    Sentinel of the TV remote avatar
    Mantra
    Sentinel of the TV remote
    URL to post:
  • Flora Canou avatar
    Flora Canou Joined 8y ago
    Offline
    3,545 points Ranked 3,128th
    17 medals 1 legendary 2 rare
    • Submitted 50 Maps Medal icon
    • Submitted 20 Maps Medal icon
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • One month a member Medal icon
    7y
    It's such a complex process. I'd prefer to use a model.
    Oldthinkers unbellyfeel me.
    URL to post:
  • NvC_DmN_CH avatar
    NvC_DmN_CH username pic Joined 8y ago
    There
    Apocalyptic Flag Affiliation: Apocalyptic
    130 points Ranked 85,242nd
    55 medals 4 legendary 17 rare
    • Returned 5000 times Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    • 1st Place - The Heatwave Skinning Contest Medal icon
    • Became a Ripe Supporter Medal icon
    • Submitted 20 Gamefiles Medal icon
    • 3rd Place - The
    NvC_DmN_CH avatar
    NvC_DmN_CH
    Apocalyptic Flag
    Affiliation
    Apocalyptic
    7y
    Very useful and well-designed tutorial. Many people (like me) have some problems sculpting prefabs without any problems. 10/10
    • Agree x 1
    • Thanks x 1
    DmN means DiaMoNd avatar
    Mantra
    DmN means DiaMoNd
    URL to post: