| 08-03-2004, 07:16 PM | #1 |
Let's say, for the sake of argument that I'm trying to create a mounted wyvern. Now, if I'm understanding what all available mdl tools we now have, I have several options: -I can merge the wyvern model's geosets with the rider's geosets. If I understand correctly, this would wreak havoc on any animations (such as wing flapping) that I need to keep intact, since the two unts use vastly different keyframes for their animations, not to mention completely different bone structure. If I'm correct, this is pretty much a nonviable option, and unless somebody says otherwise, I'll just move on. -I can attach a wyvern model to the rider via an attachment point. In other words, I can make a rider model, and attach the wyvern model via an attachment point. I've actually done this, and after modifying the wyvern to always play its walk animation, I find this quite convincing with one major problem: since the wyvern is an attached "special effect," it's not selectable. After creating this large unit, the player has to click on the *tiny* little rider to select the unit, which seems VERY user-unfriendly. I've tried adding the geoset from the wyvern to this model with no success (that is, the geoset was successfully added, and I can make it invisible, but the selection didn't change). I don't really care if the "real" wings don't animate since the "special effect" wings will, but I can't find any way to enlarge the selection area of the model, even with the wyvern's main geoset added to the rider model. Any suggestions on how to either fix this problem, or use a totally different approach? |
| 08-03-2004, 08:12 PM | #2 |
The first one would be possible (by rearranging all the keyframes on the rider bones) but a huge pain. For the second one, you can making the collision size larger by doing one of the following. (I'm not entirely clear on these, but I know it's one of them. - Change these things to include a bigger box. You could just double the numbers or something. Code:
Anim {
MinimumExtent { -33.8987, -60.4378, 0.565917 },
MaximumExtent { 59.4171, 66.0918, 93.8774 },
BoundsRadius 73.7855,
}- Change the MinimumExtent and MaximumExtent fields at the top of the MDL. |
| 08-04-2004, 04:26 AM | #3 |
well, one of th emany problems that I subsequently found was that though I'd added the geoset, and changed vertexes to refer to a single bone, I'd forgotten to change the vertexgroups - all 354 of them. I'm fairly sure that was causing the problem, since I'd already expanded the bounds everywhere (animation, collisionshapes, in the geoset). Phew, glad to have this behind me. Thanks for the help. |
| 08-04-2004, 07:53 AM | #4 |
Looks like I now get to explore in depth all of our unanswered questions about bounds radii and collision shapes. Blah. Edited slightly after another run through wc3: It seems that wc3 uses at two different methods to determine the two ways in which you can select a unit. In other words, if you click on part of the unit, that action (I think) is refering to collision shapes to determine if your click actually selects a unit. This also seems to be the way wc3 knows to display a health bar over a unit if the curser is hovering over the unit AND the way wc3 makes the curser start "glowing" when placed over a unit. I've also noticed that if you look very carefully, when you click on a unit (as opposed to lassoing it) you will see a very small lasso appear automatically (or maybe it's just a green that has nothign to do with a lasso). On the other hand, if you *lasso* an area, the game seems to use bounds radii to see if there's a unit within your lasso. This is made even more confusing by the fact that WE seems to do something completely different. In WE, you must click on a polygon in order to select a unit. But (I thinK) that polygon must be within a selection shape. I've had odd cases where I could select something within WE but not within the game itself, leading me to believe that in WE, if any piece of a geoset is within a collision shape, WE will let you "grab" a unit by that geoset. I'm 100% positive that this is NOT true in wc3 itself. In game, this same model is click-selectable on the inner portion, but not on the periphery. I'm actually still testing this, but when this new model I've made has the wyvern's collision shape and a 10-fold increase in bounds radii of animations and geosets, it's still unclickable, yet you can lasso it far away from the physical unit itself, implying that lassoing is controlled by the bounds radii. When I double the size of the collision shapes, suddenly the unit becomes click-selectable. Sooner or later, I'll find some magic combination of values that'll get this unit working. At this point, though, I'm equally interested in what all of these parameters are actually doing. Anyone have any knowledge to add to this? |
| 08-04-2004, 05:05 PM | #5 |
I figured out what one part does. Code:
Model "Acolyte" {
NumGeosets 4,
NumGeosetAnims 4,
NumHelpers 9,
NumBones 32,
NumAttachments 9,
NumParticleEmitters2 2,
NumEvents 7,
BlendTime 150,[u]
MinimumExtent { -.01, -.01, -.01 },
MaximumExtent { .01, .01, .01 },[/u]
}Selection was still entirely normal with those so reduced. --- The next test I tried was deleting all the Anim sections in the geosets. The top part was still set to -.01, etc at this point. I couldn't find any changes. Next, I set the top back to normal and still has the Anim sections of the geoset deleted. Everything seemed to work as if nothing had changed. |
| 08-05-2004, 03:55 AM | #6 |
Hmmm. I discovered that with the animation extents at lower values, and those in the header were at high values, I was unable to "grab" a unit in WE. When those in the header alone were larger, in-game, I also didn't have an expanded area of lassoing, and the unit was cut off before it was fully off the screen. Only when I enlarged all animation extents and bounds did I regain the extremely large lassoing area (that is, if I lassoed an area nowhere near the geoset itself, the unit became selected) and the ability to grab a unit in WE. I'm not sure if bounds or extent are responsible for this (or maybe each does something different). I also can't explain why a model would act normal with those deleted. I did notice that the area over which life bar was displayed when the curser hovered was unchanged, as was the area over which I could "click-select" a unit, making me pretty certain that those are determined by collision shapes. |
| 08-05-2004, 04:57 AM | #7 |
Raising the collision shapes to have 10x their normal dimensions seem to have enlarged the "click select" area, but NOT tenfold (or even two fold). I'm going to basically shrug, and guess that collision shapes can be no larger than the extents of the model. Edit: I made a model that had a collision shape that was Vertices 2 { { -720.7601, -2040.05, 0 }, { 720.7601, 2040.05, 1130.609 }, } and had the following animations: ... Anim "Stand - 3" { Interval { 3667, 7633 }, Rarity 4, MinimumExtent { -24.2496, -22.4602, -201.156 }, MaximumExtent { 18.85643, 22.4507, 184.8557 }, BoundsRadius 23.136, } Anim "Attack" { Interval { 13200, 14067 }, NonLooping, MinimumExtent { -2420.496, -2240.602, -201.156 }, MaximumExtent { 1880.5643, 2240.507, 184.8557 }, BoundsRadius 2310.136, } ... When the unit stands, only the very centermost region is click-selectable. When it attacks, areas *far* outside geosets are selectable. I guess this means that collisionshapes can be no larger than the extents (and bounds?) Further edited: Ok, it IS the boundsradius, I think. I altered the stand animation above to be: Anim "Stand - 3" { Interval { 3667, 7633 }, Rarity 4, MinimumExtent { -242.496, -224.602, -201.156 }, MaximumExtent { 188.5643, 224.507, 184.8557 }, BoundsRadius 23.136, } at which point the model behaved inthe same way. Perhaps there's a hierarchy of (for example) bounds > extent > collision that determines how big collision can be (that is, it can be no bigger than extent, which in turn can be no larger than bounds). I dunno. |
