News | Forum | People | FAQ | Links | Search | Register | Log in
General Abuse
Talk about anything in here. If you've got something newsworthy, please submit it as news. If it seems borderline, submit it anyway and a mod will either approve it or move the post back to this thread.

News submissions: https://celephais.net/board/submit_news.php
First | Previous | Next | Last
Trigonometry And Making Curves 
All of these curves are approximations really, assuming that the original goal was a circle. Even in the simple 8 sided case you run into problems in length. If the perpendicular sides were 4 units long, I think most people would do the 45 degree sides as being 4 up and 4 along. Applying pythagoras' theorem to this you'll find that the angled sides are root two times longer than the non 45 degree sides.

A closer approximation would be to go 3 up and 3 along, as this would give these sides length (root 18), as opposed to the other sides with length (root 16). The problem with this is it's not good for tiling textures.

When you move up to larger numbers things get more complicated. The general way to work out a circle of 4n subdivisions would be to fine 90/n, and then find tan 90/n, tan 180/n and so on. Then you find ratios of lengths that approximate each of these. As it happens, tan 45 = 1, so you can do that exactly. Tan 30 is 1/(root 3), which we approximate to 1/2, then use the 2:1 ratio. This is a pretty good approximation, which is why the 8 and 12 subidivision are so popular. You'll probably notice though that if you are aligning textures to the side, rotating 30 degrees will probably look wrong. arctan is the inverse of tan, and arctan 0.5 = 26.56, so 27 degrees will look better.

So how would we move up to 16, well, we need tan 15, tan 30 and tan 45, the rest are done by symmetry. Tan 15 is 0.268 to 3 dp, which isn't far off 1/4, so the ratio 1:4 is a good one(which I've just seen in the picture you posted...).

So, that's the ratio for the side on the inside/outside of the curve, how do we get the angles of the sides between the brushes? Well, it's a bit harder. The nicest appearance comes from taking the average of the angles of each pair of brushes and finding tan of that. So if the sides were 30 and 60, you'd do an angle of 45 between them, which is exactly what you do in the 12 sided case. Quite a bit harder to do this on the 16 case. tan 7.5 = 0.132, which is probably best to approximate with 1/8. tan 22.5 = 0.414, so 2/5? 1/2? Neither seem that appealing, the former is a wierd ratio, the latter will look quite distorted.

For those interested in maths, there's a rather neat way to get the best "simpler" fraction from a more complicated one, by using continued fractions. You can read how to calculate continued fractions at the wikipedia article: http://en.wikipedia.org/wiki/Continued_fraction
For any given fraction, if you take the continued fraction form, knock off the fraction at the very "bottom" of the representation, then recalculate what you get, you'll get a simpler fraction that's a good approximation to the last one.

As an example
0.414 = 414/1000
= 1 / (2 + 172 / 414)
= 1 / (2 + 1 / (2 + 70/172))
= 1 / (2 + 1 / (2 + 1/ (2 + 32/70)))
= 1 / (2 + 1 / (2 + 1/ (2 + 1 / (2 + 3/16)))
=1/(2+1/(2+1/(2+1/(2+1/(5+1/3))))
So the best approximations are in order:
17/41
5/12
3/7
2/5
1/2
Not bad guesses then : - ).

Ok, facinating maths tangents aside, the last problem is how to do the ratios of different sides relative to each other, which comes back to the problem at the start with pythagoras. Basicallly just chosing a base size like 64 and always making the longer of the two sides this length is probably the easiest way, and has the benefit of being easy to texture. To be fair, the 45 degree example is a bit unfair, as it's the angle most prone to this problem, for all other sides the difference will be of a factor between 1 and root 2. 
Urgh 
I probably didn't make sense. I'll try at home. 
 
Well, there's the tut right there. 
That Is The Tutorial 
I learned to bend and skewer in an orderly fashion when I was getting the hang of radiant, Speedy. I guess I owe you some thanks for it. 
Pie 
Ray, yeah, I remember you liked an "evolution of the curve" image I made a few years ago. I specifically had in mind to write something about domes, too.

Blitz, Say whoot?

bambuz, yeah, start with the 0:1, 1:2, 2:1, 1:0 curve, clip off the vertices to get a 24-sided circle. Note that all the ratios are still 0:1, 1:2, or 1:4 (or the inverse of these). When you start getting off the 1:x ratio by clipping off all the vertices again, then you get some faces which are clearly smaller than the others, and the illusion is hampered.

gibbie seems to favor 12- and 24-sided curves that never have faces with 1:0 or 0:1 slopes, but the downside is that the curves must be much larger. A 24-sided circle using that method must be at least 128x128, whereas the other method lets you get down to 32x32 for a circle and all the vertices are still on integer grid units.

(Where is the pie icon? I need a circle for this post.) 
I Just Use The N-sided Brush Feature And Snap The Result To Grid 1 
No thinkings necessary that way. You do need Radiant though. 
Since The Original Is Missing 
I made some very basic pics for newbies. They were helpful for me at least at the time.
http://skynet.campus.luth.se/~chosen/bam/curvtutt/ 
Self Lifting? 
how is it not posible to stand on a box and not be ablet to lift yourself?

i tried, but this shit doesnt work! it has to work, i mean, how it cant? damn this shit! 
Hmm... 12 Sided Hollow Curved Pipes 
one of the things not mentioned in tutorials (even czgs) is how to create HOLLOW pipes that fit on the grid and can be curved around. In Worldcraft, this is childsplay, but I had problems when attempting it in radiant because the selection method is fundamentally different, and attempting to skew a group of selected brushes usually results in a mess. I heard that the more recent versions have another group selection method, so maybe it is worth investigating again.

SPoG's big Q2 map (spogsp1) had some of the most ludicrous pipes I have ever seen, and it was SPoG who showed me how to make pipes in the first place (as well as a couple of other very cool brush techniques). 
Than 
than, you skew brushes 1 by 1 :|

and why pipes only, u can do things like http://img240.imageshack.us/img240/7074/arena14vw.jpg

(wanted to try such thing, after seeing unreal map with hallways going in many directions from a circular room) 
Hm 
than, you use the three point clipper (in gtkrad).

i once made this template map for inertia (also in gtkrad). it has properly aligned textures on 12 and 24 sided curves and a dome also with aligned textures i think. this dome you can use to make hollow pipes as well.

Curve template map:
http://www.student.vu.nl/h.e.beck/curves_template_map.zip

note: it is wise to uncheck snap to integer grid (prefs -> settings -> brush) before you start with extensive curve editing. 
can't tell what is going on there (a series of arches in a circle?), but the reason I was thinking pipes might be the best thing to use for and explanation is that pipes are probably the most complex yet common shape to make. Anyway, other stuff would also be worth explaining I guess, but curved pipes are one of the most tricky things to make if you don't know the easy way. Making a regular arch is simply a case of slapping a few wedges in the corners of a square doorway :) 
Integer Grid... 
is required in worldcraft unfortunately, which means that some types of curve are impossible to make, and are certainly impossible to make at a small detail level.

Your curvy maps are very impressive, so perhaps you should write a curve tut for radiant/Quark/whatever you are using these days. I'd really like to know how to make easy curves in radiant like you can in Worldcraft. 
 
i've added a simple curved pipe to the curve template map (same link).

all these curves in this template map are on grids >= 1, so these curves should also be possible to make in wc.

ok, i'll think about writing a little tutorial, but atm i'm kinda busy :( 
Than 
Hollow pipes are done same as in my tut - slice then skew. You just need to skew each brush of the pipe individualy, cant operate the group.
Never yoused 3-point clipping, its rather complex. 
The Original Tut 
I think it mentioned how to make a solid cylinder curving.

You take the cylinder sideways and stretch lengthwise, clip the end at an angle, stretch sideways (so it's overwide!) and then skew it (it thins to perfect diameter again!). It was a clever trick how the stretch/skew numbers match, since it goes to grid eventually. I don't remember the technique exactly.

Would extrapolating that to a hollow pipe be not straightforward? 
 
except you dont need to stretch "sideways" if you make the sides parallel 
Well 
This is how I did a hollow 6-sided pipe:
http://skynet.campus.luth.se/~chosen/bam/curvtutt/tutu.html

Result:
http://skynet.campus.luth.se/~chosen/bam/curvtutt/tokamak6.png

The map and bsp are in the dir too. All was shown originally in czg's tutorial that is not online now. All glory unto him. 
So, Prey Released 
...Team Fortress 2 on the way...

http://www.gamespot.com/news/6153984.html

...DNF soon?

Soon we won't have any vapourware to bitch about. :( 
There Will Always Be Vapourware To Bitch About... 
Even if TF2 DNF and any other games I can't think of right now come out we will still be able to complain that they should release the earlier versions from before restarts. :) 
New Discuss Thread Opened! 
 
yeah cheers we saw it.

those damn quake bugs always ruining my game and shit 
I Think 
One bad bug is the clipping hulls not always working right with funny angled brushes. Could someone look into that? Is that a qbsp issue or engine? 
Than 
In Worldcraft, you can always cheat. What I mean is the curves don't have to be exact to look good. Look at headshot's Bless, it's created with WC only, yet he managed to get the curves to look great without any fancy editing tweaks. 
Circular Reasoning 
I'd also say, there's no real need for every curve in a map to be aspiring to be a circle, you could do some very nice things with a parabola instead for example. The parabola is also nice because you get exact integer results very easily, since it's just some scaling of y = x * x. The step sizes in the y direction should just count up the odd numbers: 1,3,5,7...while the x step is constant for each segement of the curve. You'd probably want to scale this afterwards though, it's quite steep otherwise. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2025 John Fitzgibbons. All posts are copyright their respective authors.