Jump to content
The Dark Mod Forums

Manipulation Of Func_statics


Recommended Posts

I finished what I began yesterday: the "Revert to worldspawn" command (default: Shift-G / OrthoContextMenu) is implemented.

 

I discovered yet another issue with func_statics: child patches don't seem to be affected by the func_static translation, they always stay where they are.

 

I'll look into the above problems in the afternoon, I'll have to make some progress on my thesis...

Link to comment
Share on other sites

  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

I could fix the issue regarding the ineffective texture lock of child brushes. There was already sorf of a framework for this, although it's more of a hack really. Not that this is surprising. ;)

 

I'll look now into the Patch problem. This may pose some harder problem, as no "framework" like the one for Brushes exists here.

Link to comment
Share on other sites

Ok, I've found a way to fix the manipulations of child primitives (based on Orbweavers suggestion to propagate the call to the children), although at the cost of having the func_static origin fixed during manipulation (i.e. it does not move along with the group). Converting to func_statics and back to worldspawn is working as well without any jumps of the primitives.

 

I'll try to dig into it and see if I can do anything about the origin.

Link to comment
Share on other sites

Gah! I almost feel like giving up on this! I was so close and now several things seem to be broken that've already been working. This cursed Instance/Node stuff and all those hundreds of TransformChangedCallers are driving me nuts. I wonder what the DoomEdit guys did to get the func_statics working... (apart from the obvious daily rampage)

Link to comment
Share on other sites

No, luckily I could solve this one. It's the implicit dragging of the origin that doesn't work (and it does work in DoomEdit). If you drag around the func_static and the origin gets updated all the child brushes move along as intended. However, this makes it impossible to transform the group using the rotation manipulator (the stuff moves around like mad).

 

I could work around this by propagating the transformations down to the child primitives, which seemed to work, but with the payoff that the origin stays unchanged while transforming (you'd get a double-translation otherwise).

 

I tried to combine both behaviours, but this attempt completely screwed up. I was nearly there, but then the method "convert to func_static" and "revert to worldspawn" broke because the child brushes not always get notified of the origin changes (they jump around afte rreverting them to worldspawn).

 

There must be a way around this, I just haven't a good idea yet. Everything's so entangled with callbacks it's really hard to tell what's actually going on. This is frustrating.

Link to comment
Share on other sites

This is probably no help, but just an observation. In DoomEd when moving an object which displays the origin, it all moves as one, all the time. Only when it's dropped, can the user edit the origin key to move it, and not the rest of the object.

 

In DR, I've noticed that;

1. when you drag one of these objects, the origin lags behind - it doesn't snap to the object until I release the mouse,

2. (known) when you reposition the origin by typing a new value, the object itself moves as a whole, and to move the origin, you must first move the object as a whole, and then move the parts away from it.

 

So it's being handled in a backwards manner w/r/t DoomEd. Maybe that's at the source of the difficulties.

Link to comment
Share on other sites

1. when you drag one of these objects, the origin lags behind - it doesn't snap to the object until I release the mouse,

I could fix that one already. :)

2. (known) when you reposition the origin by typing a new value, the object itself moves as a whole, and to move the origin, you must first move the object as a whole, and then move the parts away from it.

 

So it's being handled in a backwards manner w/r/t DoomEd. Maybe that's at the source of the difficulties.

The main evil is the design. I suspect that the DoomEdit programmers had to change more than I did to get this to work. Maybe they even rewrote that whole transformation part and got rid of all the callback shit.

Link to comment
Share on other sites

Finally! The build snapshot on FTP should resolve all those issues now. This was really hard, but in the end I even could simplify things a bit (there's still room for improvements, though). The code cleanup is not yet done, but at least we could get rid of the BrushDoom3 node definition, which was used before to hack the func_static "support" into the Doom3Group.

Link to comment
Share on other sites

Btw, the Doom3Group acts more or less like a real container now. It propagates all transformations to its children and the helper class Doom3GroupOrigin takes automatically care of the origin substraction/addition when new children are added. Hence the map::selectedPrimitivesSubtractOrigin() method doesn't need to be employed anymore.

Link to comment
Share on other sites

Ok, I don't what it is, but it seems to be related to these two code passages in scenelib.h:

 

class BrushDoom3
{
public:
 STRING_CONSTANT(Name, "BrushDoom3");

 virtual void setDoom3GroupOrigin(const Vector3& origin) = 0;
};

and

inline BrushDoom3* Node_getBrushDoom3(scene::Node& node) {
return NodeTypeCast<BrushDoom3>::cast(node);
}

Removing those two makes my DarkRadiant build crash upon map change, although nothing is using these two. Perhaps there is something with the NodeCastTable stuff that depends on it, I just don't know.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 5 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...