Jump to content

func_rotating


Recommended Posts

Posted

I'm making a reactor core and would like to make some rotating things around it. Can I assign this function to a patch like a cylinder or bevel or something?

 

The manual just says:

Game Function: Solid entity that rotates continuously. Rotates on the Z axis by default and requires an origin brush. It will always start on in the game and is not targetable.

 

 

Posted

I got it working but it seems my patches are wobbly when active. I have a ring that I thickened to 8 units and it is supposed to rotate between 4 pillars, one at north, south, east, and west. Seems half the turn is good then the other half is off, but, the ring is 688 x 688. Shouldn't it be a pretty symetrical turning action?

Could it be the origin brush?

Posted

More than likely it's the origin brush.  Sometimes I do add the origin point to the origin brush as well.  Such as:  key: origin   value: 1204 320 408  to specify where the origin is.  Just having an origin brush can be a little tricky at times, adding the origin value cements it in stone.  I have found I select everything I want to rotate, then I deselect the origin brush and reselect the origin brush then turn the brushes into a func_rotating entity.  Doing this will create the entity rotating on the correct origin brush you want to rotate the object on.

 

 

And a reminder that a negative speed value will have the rotating brush rotate the opposite direction.

Posted

I have found I select everything I want to rotate, then I deselect the origin brush and reselect the origin brush then turn the brushes into a func_rotating entity.  Doing this will create the entity rotating on the correct origin brush you want to rotate the object on.

 

That's like untying your shoes to tie them, to untie them again, and then use the velcro straps.

Posted

That is not so Moondog.  If you have many brushes you are turning into a rotating object, you can't just draw a box around them, select inside  turn them into a func_rotating and have them work every time.  Radiant may not set the rotating object to rotate around the correct brush.  An origin brush isn't automatically set as a brush to rotate on when you are rotating multiple brushes.  I have a lot of experience with rotating objects and that strategy works the best for me.

Posted

That is not so Moondog.  If you have many brushes you are turning into a rotating object, you can't just draw a box around them, select inside  turn them into a func_rotating and have them work every time.  Radiant may not set the rotating object to rotate around the correct brush.  An origin brush isn't automatically set as a brush to rotate on when you are rotating multiple brushes.  I have a lot of experience with rotating objects and that strategy works the best for me.

 

I've made rotating, moving, destructible etc... objects in JKO, JKA, Doom 3, COD4 and ************* and never had to follow any such strange ritual when grouping with an origin brush.

Posted

Some times problems do occur and some of those solutions I describe above may help Jeff or someone else get their object to rotate correctly.

 

Using my method, if you have a central brush for your brushes you want to rotate you don't need to use an origin shader/brush which contains the q3map_origin parameter.  It's just another way to get things done.  Someone can even change the position of the rotating object by only changing the origin key value although I don't recommend doing that because it can cause a little confusion.

 

I will also add, if an origin key is assigned and the rotating object is moved, a new origin value will need to be created to reflect the new position in the map.

 

I will also add again, a quick painless way to get an origin key value, copy the middle brush you want the object to rotate on (origin brush etc) paste the brush.....delete the brush then add an info_notnull by right clicking the middle of the brush looking from the top view in radiant. (works with target_teleports and others that require and origin value).  Copying, pasting, and deleting is an old trick I learned with GTK radiant to match up a few things when editing a map. The next brush you create will be created at approximately the same height and width of the brush you copied, pasted and deleted.  Doing that and making an info_notnull will place it in the center of the brush to get the correct origin value.

 

Also, a little unrelated, if you copy, paste and delete a curve, select the texture you want to use for a bevel, reselect the curve then create the bevel or even cylinder cap, The texture should align with the default scale in radiant.  Just another editing trick I found in Radiant that is somewhat related to the origin value trick listed above.

Posted

I tried what you mentioned above but no luck. The origin brush is working properly. I took the grid units and added them to the origin/value thingy from the editor and it was the same. I also did the info_null thing, which is really good to know, but my numbers I got from the editor grid were the same. Also, thanks for telling me about -speeds for other directions. I was going to ask that eventually.

 

I'm really thinking its my patch. I'm going to try and make something other than rings from regular brushes and see what happens that way when used with a func_rotating. 

Posted

The whole point of having the origin texture is for defining origins. If it were a matter of order you could just use nodraw. But you can't, because that's what origin is there for. I would very much like to get a step-by-step reproduction or a video for the problem you're having...

 

The only problem related to selection I'm aware of is with copying - if you clone an entity, pressing N will edit the original's properties, not those of the selected copy.

 

Anyway, as for wobblyness, that may be due to patches being hard to make perfectly round due to math.

Posted

Well, it was the patch after all. I made 4 tall pillars and made them move around the reactor and they moved in a circle with no wobbles.

Posted

My method may be a bit strange to comprehend by simply reading it. But sounds like that wasn't what was going on with you.

 

In radiant if you make a curved patch or cone out of a brush it's not exactly a circle. (It's a little hard to explain this without actually showing you).  You can bring the corner vertex  for the curve in just a little and it will round this out a bit.

 

One example of this you can try is making a sphere out of 2 cones.  From overhead it looks a bit blocky but on the cone, bringing in the corners and not the middle verticies it will start to round out a bit.  I was doing this for a recent map I was working on to make a rotating deathstar high above the map with a rotatiing star destroyer around the deathstar rotation in the opposite direction.

 

Another way to check the roundness (and probably the best way for your application),  Find a texture with a round feature within the texture.  Make a brush, apply and fit the texture to the brush.  Next make a cylinder or curve etc (or use the patch you have in question and make the brush to fit your patch) then take that and put it over the circle on the texture.  You should be then be able to see any dependencies comparing the 2.

Posted

The whole point of having the origin texture is for defining origins. If it were a matter of order you could just use nodraw. But you can't, because that's what origin is there for. I would very much like to get a step-by-step reproduction or a video for the problem you're having...

 

The only problem related to selection I'm aware of is with copying - if you clone an entity, pressing N will edit the original's properties, not those of the selected copy.

 

Anyway, as for wobblyness, that may be due to patches being hard to make perfectly round due to math.

 

All I did was make a brush 688x688 and turn it into a cylinder.

Then, adjust the height so it looks like a ring, say 64 units tall. Again, neither of this matters as I've tried them with different sized patches.

Next, thicken this to 8 units.

After that is done, place an origin brush in the middle of the ring on the grid.

Select all of them and turn into a func_rotating.

In entity view, check start on and add speed 50

Compile and watch a wobbly orbit.

Posted

circleoddity_zps46a43424.jpg

 

I made that cylinder out of a square with a round texture below.  There is a gap there in the corner.  Is that the sort of wobble you describe?  If so you can use the technique I describe above to round the corners and get them closer to a circle and reduce your wobble.

Posted

Yeah, I actually think that might be it. I'll have to try that method with the texture you used in the future. 

 

I did change my design a bit for the better. I'm still using Func_Rotating but I have 12 sided brushes, 5 stacked on each other with a cylinder in the middle,  rotating at varying speeds and direction. This is enclosed partially with thickened bevels and some brushwork which makes it almost look like an electric motor armature with brushes around it in a partially open housing. 

 

Have no freakin clue what it does but it'll look cool with power cables and pipes and lights on it... hehe. 

 

Gotta keep moving on and can't get bogged down with some of this. I appreciate all your help on this.

Posted

Mrwonko mentioned the difficulty of the math earlier but I think the illustration I made kinda gives you a better idea of what is happening turning a square into a cylinder.  Computers don't like to draw circles well.  They have a type of "pixelated" approach to making a circle.

 

Basically just click and drag the corner vertices until they get as close to circular as they can get.  Leave the middle vertices in place because they are where you want them and don't need to be modified.  Make sure you move the corner vertices at a 45 degree angle or else your circle will get messed up.  You can change the grid snap to get the vertices as close as you can and duplicate the drag for the other corner vertices to keep everything proportional.

 

Cones or spheres are a little more technical, the corner vertices must be dragged in multiple planes (x, y, and or z) to get them to resemble a circle.

Posted

I just made a rotating fan made out of patches, incase if anyone needs the info:

 

1. Create the object(s) you want to rotate (in my case, fan blades from simple patch mesh)

2. Create a box that has its centre matching up with your object(s), then slap an origin texture ALL over it. This is now the origin brush

3. Select the object(s) and the origin brush (in step 2) and make them func_rotate

4. Set any flags you want and the speed in the entity properties

5. Enjoy

 

NOTE:

 

If your origin brush doesn't share the same centre as the object(s) you want rotating, you will have a poor result.

Posted

This is giving me an idea to make a short tutorial on making a rotating object without using an origin brush.  Why make one?  Ya never know when it might come in handy.  I taught myself how to map many years ago and I discovered a trick or 2 using radiant to make things work that doesn't seem to be common knowledge.

 

I am also glad to be here on JKHub with so many people who have such strong knowledge with Radiant and other modding tools for the games we enjoy.  I am sure I will learn a lot during my time here :)

Tempust85 likes this
Posted

Computers don't like to draw circles well.  They have a type of "pixelated" approach to making a circle.

It's not a general problem like you phrase it, it's just a matter of what equation you use to calculate the curve based on the control points and the one used by Quake 3 makes circular shapes difficult.

 

Why make one? Ya never know when it might come in handy.

I guess it'd never come in handy. If Q3Map2 is even half-decent it'll just calculate the brush's position and then discard it so there should be no difference in the result between manually setting the origin and using an origin brush. So you can't even argue with brush count. (And if that is in fact a problem I'll go and fix it in Q3Map2 so it isn't.)
Posted

Func_rotating can take key/value origin/# # # just like every other, I just use ref tags to get the origin value and copy paste it. I cannot stand origin brushes, they piss me off. o.o Makes sense though, I wouldn't have to fix the origin value if I move it. I still do it anyway. bad habits?

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...