Jump to content
The Dark Mod Forums

Surface Dialog


Recommended Posts

I started creating the new surface dialog which should combine the functionality of the old Surface Inspector and Patch Inspector dialogs. This is the first draft (left) in comparison to the current one (right):

 

surfacedialogv1rm0.th.jpg

 

What's not yet there is the patch vertex editing stuff (fixed tesselation and such). I'm not quite sure where to put it yet, but I plan to expand the dialog window downwards (perhaps with in a "dropdown" manner like "Advanced Patch Editing >>").

 

Thoughts, comments?

Link to comment
Share on other sites

I don't see any problems there, a couple of possible improvements though:

 

* Use Up/Down arrows for the vertical scale/shift operations rather than Left/Right

* Align widgets using the 6/12 rule from the HIG -- 6 pixel separation for related components (like up/down buttons), 12 pixels for non-related components (i.e the gaps between each line of controls).

* I wonder if we can replace the "Brushes" and "Patches" button with single buttons that behave appropriately whether a brush or patch is selected. For example, perhaps "Axial" and "Natural" could be single control for both brushes and patches. Do we even know what "Cycle CAP" does? I have never figured out its purpose.

* I would be tempted to say don't merge the patch vertex editing stuff in here, because this is currently a purely texture-based dialog, and adding in extra stuff that is not always applicable could confuse the issue. There is nothing wrong with having a separate patch editing dialog, the current problem is that it duplicates texture alignment functionality that should only exist in this dialog.

 

Some more advanced/labour intensive ideas:

 

* Use icons to illustrate each operation, such as a "Flip horizontal" icon on the appropriate button. This adds some colour to the dialog and helps you find the operation you need quickly.

* Lay out the scale and shift operations in a North/South/East/West block with the scale factor in the middle (with nice big arrows on them). This would make it very easy to find the right button to move the texture in the direction you want.

* Use a slider for angle, that runs between -180 and +180 (or 0 and 360, whichever is more appropriate). Dragging this slider would immediately rotate the texture and provide very quick and easy control over rotations.

* As well as the NSEW shift arrows, provide a slider which runs from 0.0 to 1.0 and allows precise and real-time control over the UV offset. This would obviously have to be updated when the world-space shift buttons were clicked in order to keep it in sync.

Link to comment
Share on other sites

* Use Up/Down arrows for the vertical scale/shift operations rather than Left/Right

Ok, I'll put that in, although I fear that may add some confusion, but I'll try it out and we'll see.

 

* Align widgets using the 6/12 rule from the HIG -- 6 pixel separation for related components (like up/down buttons), 12 pixels for non-related components (i.e the gaps between each line of controls).

I tried to keep as close as possible to this sample dialog from the HIG: http://developer.gnome.org/projects/gup/hi...ges/layout2.png

Although this dialog doesn't follow the 6/12 rule either, because it has 5 pixels as distance between the entry fields and far more than 12 pixels for the left indentation.

 

Additionally it's not always perfectly possible to keep that 12 pixel gap between the label and the according entry field, because if anything widenes the dialog window, the alignment gets screwed up. GTK can be a real pain to do correctly what one intends, this reminds me a bit of cross-browser css, but I'll try to do my best.

 

* I wonder if we can replace the "Brushes" and "Patches" button with single buttons that behave appropriately whether a brush or patch is selected. For example, perhaps "Axial" and "Natural" could be single control for both brushes and patches. Do we even know what "Cycle CAP" does? I have never figured out its purpose.

"Natural" is possible to affect both brushes and patches (it would just apply the default scale to the brush, nothing more).

 

"Axial" is not yet done for patches, but I could add that functionality. I planned to desensitise that button when a patch is selected.

 

I think "Cycle CAP" is intended for texturing the end caps and works similar to "Axial", but I have to check the code. Maybe we could remove that one completely in favor of the mouse copy/paste tools.

 

* I would be tempted to say don't merge the patch vertex editing stuff in here, because this is currently a purely texture-based dialog, and adding in extra stuff that is not always applicable could confuse the issue. There is nothing wrong with having a separate patch editing dialog, the current problem is that it duplicates texture alignment functionality that should only exist in this dialog.

That makes sense, so I'll go that way and strip the patch inspector from the texturing controls.

Link to comment
Share on other sites

That looks really nice. And vertical, woot!

 

Only thing I'm wondering, where is 'Match Grid'? (actually I'm not even sure what it does). That's great including texture lock and flip tools. :)

 

I still think I'd want the 'Tesselation' and 'Details' frame contents though... I've actually made use of the 'Details' to correct some texture distortion. And 'Tesselation' by itself seems so minimal that it might not justify a full dialog.

Link to comment
Share on other sites

I just checked the code for CAP Texture and I think it should be the patch equivalent of Axial. But it doesn't work, and I think the command can be ditched along with the weird code. It seems to be trying to calculate a normal out of the control vertices and this normal is checked for its axis dominance (which component of the vector has the largest absolute value). A projection is then performed on to that axis, but this doesn't seem to be functional.

 

Given the fact that we already have better tools to texture such (inverted) endcaps, I vote for removing that thing.

Link to comment
Share on other sites

This is the next iteration of the dialog:

 

surfacedialogv2qe7.jpg

 

I haven't got to putting in the vertical arrows yet, as I'm still unsure of how to pack them most effectively without stretching them to much in the horizontal direction. It would be nice if the up/down controls would align nicely with the left/right ones. Any ideas of how to pack that, OrbWeaver?

Link to comment
Share on other sites

I haven't got to putting in the vertical arrows yet, as I'm still unsure of how to pack them most effectively without stretching them to much in the horizontal direction. It would be nice if the up/down controls would align nicely with the left/right ones. Any ideas of how to pack that, OrbWeaver?

 

I'm not sure I understand your question. I don't think images are stretched normally, instead the button should shrink to fit. If your "up arrow" and "down arrow" images are the same dimensions as the left/right arrows, the buttons should all be the same size.

Link to comment
Share on other sites

Groovy. Agreed on the rotation L/R suggestion.

 

Do I dare ask what happens to tesselation and XYZST? Are they in fact on their own dialog? S,T are texture adjustments afterall, but it'd be silly to break 'em up... I kinda liked the expand/Advanced button idea. I'm trying to think, what if the user is adjusting S and T (with our user friendly new spin controls ^_^) but realizes they also need some texture sizing or shifting? Open both dialogs. :-/

Link to comment
Share on other sites

I was curious and re-enabled the compilation of this ominous TexTool (which was disabled compiler directives) and surprisingly it compiled without complaints. This is what I found:

 

textoollg1.th.jpg

 

Pretty damn cool, if you ask me. It basically visualises the location of the selected brush face in texture space and allows you to manipulate the thing with mouse clicks (translation/rotation). The behaviour is similar to the UV mapper in blender, but without vertex drag manipulation. And it only works for single brush faces.

 

Judging from the comments in the code, it most probably has some major flaws (being the reason why it was disabled in the first place), but I feel an urge to get that tool working!

 

I put up a new snapshot for this tool so that SneaksieDave can have a look at it too: http://208.49.149.118/TheDarkMod/download/...8.x.rev1004.zip

Link to comment
Share on other sites

I opened the issue in the bugtracker as child of the surface dialog issue. :) From fiddling around it indeed seems to be a bit unpolished.

 

I checked the changelog and it seemed to be part of GtkRadiant since 2000, it has been rewritten one or two times and finally been disabled in 2004. Shamus seemed to be the last one who worked on that feature.

Link to comment
Share on other sites

The new Surface Dialog is feature complete and the TexTool is up and running. Do we still need the Patch Surface Inspector (Shift-S) as a dialog window or should I incorporate it into the menu as "Curve > Edit Tesselation"?

Link to comment
Share on other sites

It does make the S and T entries kind of obsolete, because you can drag it per mouse anyway. Perhaps it might be handy to leave the X,Y,Z coord manipulators still there for (rare) editing and diagnostic purposes. I will open the according issue on the Bugtracker.

Link to comment
Share on other sites

That's what the new PatchInspector looks like: I wanted to strip the unused elements from the old dialog first, but the code was hard to clean up so I thought I'd be faster taking the new Surface Inspector as a template.

 

patchinspectorkm8.th.jpg

 

All the controls get inactivated if there is more or less than exactly one patch selected.

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