Snarkpit Articles

Hollow spheres

Vertex scaling
To create a hollow sphere, It is often most efficient to slice up a hollow cylinder horizontally, and then scale the newly created verticies horizontally using Worldcraft's vertex scaling mode.

First, create a cylinder.
Article image


In order to prevent dastardly floating point errors, make sure that all the verticies of the cylinder are on the grid using vertex manipulation mode. Doing this from the start can save you a lot of "fixing time" later on.
Article image


Next, make the cylinder hollow without using the hollow tool in order to have predictable and nice geometry to deal with.

Begin by clipping the cylinder from vertex to opposite vertex until you have a bunch of wedges.
Article image


Slice your cylinder into quarters and keep only 1 - you can duplicate it to a full cylinder later after you have messed with it.
Article image


Then slice the wedges to get more verticies
Article image


Manually move the verticies to approximate a hollow shape.
Article image


And finally, copy the 1/4 cylinder and rotate it until you have a full hollow cylinder:
Article image


Create a template cylinder perpendicular to the hollow cylinder. This cylinder will not be a part of the final product - it is just there as a guide for vertex scaling.
Article image


Use the clip tool to horizontally slice the hollow cylinder at approximately the points where the template cylinder has verticies
Article image


Select all peices of the hollow cylinder and enter vertex manipulation mode. Select all of the verticies on a single horizontal slice and press Alt + e to enter vertex scaling mode.

Decrease the number in the scaling box to scale down the verticies until their outline approximately matches the outline of the template cylinder. Repeat this process for each horizontal slice. On the final verticies, do not scale them down to 0, leave a bit of extra space: you will later cap off the hole with another brush.
Article image


Now create a small cylindrical disk at the location of the hole, and vertex scale it until it "caps off" the hole correctly.
Article image


There you have it! You now have a handy-dandy hollow sphere. Be sure to delete the template cylinder when you are done, and dont go overboard on detail or you may find yourself face to face with HOM's, rounding errors, clipping errors, and high wpoly. Plus ZHLT's phong shading will make it look smooth (your mileage may vary). And don't forget to check for errors before compiling!
Article image

Discussion

Posted by SourceSkyBoxer on Sat Apr 20th 2013 at 11:10am

Soooooooooooooooo badddddddd.

CSG gets after compiling error.
Haha I would like to win again you :P

I have improved sphere or tows mapping with in or out. I will create article for Half-life Mapping :P and sphere or tows types would like to support same compiler like vhlt or zhlt better.

:D
Posted by MacD on Fri Sep 7th 2007 at 3:09pm

Great Tutorial. Im making a zombie map for css and this is by far more efficient than the cruddy sphere and hollow tools valve gave us :)

Followed it word for word and it works perfect. Anyone having troubles havnt followed the tutorial properly :P
Posted by gtamike on Mon Apr 9th 2007 at 10:17am

Posted by mazemaster on Thu Apr 5th 2007 at 8:50am
[Author]

Hlfix fixes some brush errors, and outputs floating point coordinates. It can sometimes fix brush problems, especially for small brushes.
http://extension.ws/hlfix/
Posted by Darth Sailor on Thu Apr 5th 2007 at 4:17am

I have a heck of a time making the sphere say, the size of a small bathroom. I can't even line up the verticies. For some reason two get grouped together under certain situations and you can't have both lined up to grid one. Anyway, point being don't make the sphere too small!

My question for posting is, what is Hlfix and where can I get it?
Posted by Elon Yariv on Tue Feb 20th 2007 at 8:12pm

It didn't hurt my hollow spheres one bit when I snaped the verticals a quarter of a unit, you just have to choose wisely then you wont create concave brushes. Of course you can always use Hlfix instead.

Many people get leaks using your method, you should warn them about it and explain them how to fix it.
As far as I know there are three methods to fix these leaks: Snaping veticals, Hlfix and creating a nulled box around the sphere and turning it to a func_entity.
Posted by mazemaster on Sat Feb 10th 2007 at 8:29pm
[Author]

If you snap manually, then some faces will be concave (they become skew quadrilaterals). You have to be ok with non-grid locations if you want a sphere with convex faces.
Posted by Elon Yariv on Sat Feb 10th 2007 at 6:12pm

Just a little tip for anybody who uses this tutorial. The ALT+E option totally ignores the grid. If you use it you are likely to have off grid verticals.(that aren't on the size 1 grid) In hammer it looks ok but Hl can't cope with them so the engine snaps them to grid. In this procces Hl might create invalid solids or leaks.(if the sphere is open to the void)

My suggestion is to lower the grid size to 1 and with vertex manupilation snap each vertical to the grid.

Another thing is that 12 sided cylinders have off grid vertex too, they shouldn't be used unless you snap those verticals.

Apart from that there is nothing wrong exept that you could have used the arch tool at the start, it is a very good tutorial and easy to understand.
Posted by Le Chief on Sat Aug 26th 2006 at 8:08am

Good on you man. Next step is low ploygon, outdoor hills anf stuff.
Posted by Fjorn on Mon Sep 19th 2005 at 11:09pm

This is the greatness :D