Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Is there a way to make any entity animate rotation?

Edited by Goldwell
Link to comment
Share on other sites

Example of what you want to do? Not sure what "animate rotation" means.

 

Sorry I should have been more specific. I mean make an entity begin rotating with a command. Perhaps something that is like you create an entity and when it is triggered all targeted entities rotate at the set degrees

Link to comment
Share on other sites

You can have TDM do it for you if you use a func_rotating. You have to test it, though, because it only likes to rotate around one axis: X or Y or Z. And if you give it a large rotation angle, it might rotate in the opposite direction from what you want.

 

You can control the rotation yourself, for any entity, in a script. You'll want to reset the entity's angles each frame depending on the math (angles, speed) in the script. I did this with the dropped skull in In the North and with the mirrors in The Gatehouse.

  • Like 1
Link to comment
Share on other sites

Is there a way to force doors to close/open? I know you can trigger them but I only want them to close if they're open or stay closed if they are already closed and vice versa.

Edited by Goldwell
Link to comment
Share on other sites

What's your use?

 

To close after a time, spawnarg: auto_close_time (although players typically don't particularly like auto closing doors)

 

However, it only works if fully opened, not if interrupted/blocked. (The "interruptable" spawnarg can disable that, but players expect to be able to interrupt doors to crack them partway.)

 

But, "stay closed if they are already closed", meaning the player/AI can't open them?? That's a different ball of wax.

 

PS: It occurs to me after the fact, could combine a trigger with auto_close_time or auto_open_time, that way if you trigger it, doesn't matter which way it goes, the auto will end up taking care of it if it's the "wrong" way.

Edited by RJFerret

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Hi.

I'm making baby steps through A-Z guide, wanted to clear a few things up.

 

1) The guide instructs to put a separate ambient light in the pool of water and then to adjust the global ambient light so as not to intersect with the one in the pool. Is that an incorrect/outdated thing? It causes lighting artifacts for me.

2) Are there any additional selection tools? Say, if I wanted to drag out an area in orthoview to select everything within. Or to only select models (when placing furniture etc), ignoring brushes, but still rendering them.

3) ShowTris revealed that brushes get cut up on intersections, potentially creating a lot of extra tris, e.g. a single brush and a flat wall turn into dozens of polys because of a staircase. Are there any potential problems? Should I generally avoid crossing between brushes? I still haven't read up on what should be kept as sealing geometry and what shouldn't, would that be relevant here, too?

4) Possibly related to the previous one: is this unnecessary? Should I have just put a single brush there and let automatics do their work? Or maybe even just surrounding the whole rendered area with a skyportal box without even touching the roof?

5) Is there a way to change the scale of models in DR? Rotate&scale has the bottom half greyed out, but maybe there's a uniform scale hidden somewhere?

6) Color scheme in orthoview - no matter what color is chosen, brushes keep their black color. A known bug or something with my setup?

7) Any hotkeys involving letters stop working after the language is changed from English, is there a way around that? Ctrl+shift (or alt+shift) is used frequently enough for this to become annoying.

8) Admittedly, I didn't take much time to explore all the sounds, but is there no sound of rain drumming on roof while you're inside?

9) Any pitfalls with non-rectangular visportals?

Link to comment
Share on other sites

Is there a way to force doors to close/open? I know you can trigger them but I only want them to close if they're open or stay closed if they are already closed and vice versa.

One way is to use an atdm::target_callobjectfunction. Give it the door as target, and add the spawnarg

"call" "Open"

Or "call" "Close"

 

It'll have no effect if the door is already in the position you're asking for.

Link to comment
Share on other sites

@chedap

 

1) I've tried it three ways. The first two ways, with the main ambient light encompassing entire map and with the main ambient and pool ambient bottom and top planes respectively on the same grid line. Neither of these methods produce any graphical errors. If the outer planes of the two ambient light boundries intersect though, I do get an odd moving shadow in the area where they intersect. Make certain the bounding boxes do no intersect would be my advice. Adjust your grid size and ensure the two bounding boxes are not intersecting. Otherwise, it could be a graphic driver issue.

 

2) Shift + left click [hold] drags a selection box. Holding shift while selecting individual items adds them to the selection. Use the layer manager to create selectable sets, give the layer a name, select it as active, and create your models/geometry, or select all the stuff you want on the layer and right click one of the selected items in ortho view > move to > select the new layer. Now when you select that layer it selects everything in the layer.

 

3) Correct me if I'm wrong but I believe the engine does that because #1 there are intersections there with the stair corners and #2 there are lights corresponding to those "fans" of triangles (the two hanging from the ceiling). Otherwise the 2 lights would be shining on the same large triangle and that reduces performance. So its nothing to worry about and the engine is doing it for optimization.

 

4) Your worldspawn portalsky brushes/caulk brushes for your bounding box can just be rectangles and be just behind the house or intersect it (provided you don't see skybox in the house). No need to clip them exactly to geometery. Alternatively, for testing purposes, you can just drag a large brush out around the entire map and portalsky texture it (to see the sky box) and it will seal the map from leaks. The texture is irrelevant provided the brushes are worldspawn.

 

5) I believe you can resize models as I've read posts where others have scaled models down/up however it can break the associated shadow mesh. The shadow mesh won't get resized or will go in to odd proportions (not sure which) so that has to be dealt with as well. I would avoid resizing models if you can. If its a simple model you can always create your own in DR or use Blender or other software to create more complex models with collision and shadow meshes.

 

6) After selecting Brush color in DR, close DR and restart the application. Then your brushes should be the selected color.

 

9) Avoid using non-rectangular visportals. Sound propagation is handled through the center of visportals and non-rectangular ones can/will create oddities in the map. e.g. sound coming from a different direction or off-angle from the source. Visportals can also clip through geometry like skyportal/caulk sealing brushes so they don't have to follow world geometery exactly. Use rectangles.

Edited by Lux
Link to comment
Share on other sites

Hi. I'm making baby steps through A-Z guide, wanted to clear a few things up. 1) The guide instructs to put a separate ambient light in the pool of water and then to adjust the global ambient light so as not to intersect with the one in the pool. Is that an incorrect/outdated thing? It causes lighting artifacts for me.

 

Hi and welcome!

When that instruction says "main ambient light" it doesn't mean the global ambient light, it means the light that you just cloned to make the pool fog. That wording could be clarified a bit.

2) Are there any additional selection tools? Say, if I wanted to drag out an area in orthoview to select everything within. Or to only select models (when placing furniture etc), ignoring brushes, but still rendering them.

Shift+drag does the first. I'm not sure whether you can filter your selection by entity type. There are toggle buttons for selecting only group parts, only surfaces, vertices etc, which are handy.

3) ShowTris revealed that brushes get cut up on intersections, potentially creating a lot of extra tris, e.g. a single brush and a flat wall turn into dozens of polys because of a staircase. Are there any potential problems? Should I generally avoid crossing between brushes? I still haven't read up on what should be kept as sealing geometry and what shouldn't, would that be relevant here, too?

In general, don't worry about a few extra tris. Personally I do sometimes tidy up the tris around staircases by one of several tactics:

  • Move the stairs 1 unit away from the wall
  • If AI don't need to use the stair, make it a func_static so its not wordspawn any more
  • If AI do need to use them, make them a FS anyway and give AI monsterclip to walk on instead.

but I doubt the difference will ever be seen in game. A few dozen extra tris won't ever be what makes the performance difference in any map. Avoiding crossover between visible brushes is generally a good idea as it avoids z-fighting and and makes it easier for you to see what you're doing, but it's a rule you can break whenever you have a reason.

 

4) Possibly related to the previous one: is this unnecessary? Should I have just put a single brush there and let automatics do their work? Or maybe even just surrounding the whole rendered area with a skyportal box without even touching the roof? 5) Is there a way to change the scale of models in DR? Rotate&scale has the bottom half greyed out, but maybe there's a uniform scale hidden somewhere?

Can't see the image for (4) I'm afraid. Server declining.

5) Kind of, but it's not useful in most circumstances because it's only the visible model that gets scaled, not the shadowmesh or the collision model. I think you do it by adding a "scale" spawnarg but I'm not sure. Someone will correct me if I'm wrong..

 

9) Any pitfalls with non-rectangular visportals?

Not sure about 6,7,8.

I've heard reports that non-regular visportals, or those made up from several brushes, can cause irregular sound propagation. Sound is funneled from one area to another via visportals which sounds more realistic than sound coming through a solid wall. The usual advice is to keep VPs single, rectangular and not to rotate them because it's sometimes tricky to get them to seal if you do otherwise. Again, that's just a rule of thumb though. If you have an interesting situation you can try portalling at any angle, but make the angled portal by cutting away parts of a unrotated brush so the sealing edges remain square on. Best to avoid rotating a brush that's to be used for a VP as it can be hard to get them square and flush again.

 

EDIT: Crossed with Lux

Edited by SteveL
Link to comment
Share on other sites

Helpful, thanks.

 

...and with the main ambient and pool ambient bottom and top planes respectively on the same grid line. Neither of these methods produce any graphical errors. If the outer planes of the two ambient light boundries intersect though, I do get an odd moving shadow in the area where they intersect.
I made them adjacent, but not intersecting, and what I got can I guess be described as odd and moving.

Doesn't matter really, just that the tutorial is unclear. It's working fine with the global ambient light extended to the whole playable area.

 

A few dozen extra tris won't ever be what makes the performance difference in any map.
Seems like it can effectively triple the total amount of tris if the brushwork is complex enough, and all those tris will take part in shadow calculations. From my basic understanding at least. It's just a basic thing to put into habit before it's too late.
Link to comment
Share on other sites

I'm following this DarkRadiant tutorial, but there are some problems:

 

1. In surface inspector absolute values for horiz/vert scale are grayed out, although it is possible to modify those values (with visible results) using arrows;

2. Grid size can't be changed. It sticks only until DarkRadiant's restart and gives no results, i.e. minimal grid actually remains 1, rooms tool creates 1-unit wide borders and so on;

3. The tutorial asks me to "move inside the room in the camera view", but when I do so camera view becomes completely black and I can't locate floor/ceiling/walls to carry on with tutorial. Do I need some light source inside or something like that?

 

This happens with both compiled DarkRadiant 1.8 x86_64 and 1.7.3 x86 from PPA, what else can I try? Does it work better in Windows?

Link to comment
Share on other sites

Wow, I just tested 1.8 Windows binary - it didn't work in Virtualbox (which is strange, because The Dark Mod itself runs fine there), but I've got it to work in Wine. So, as far as I see, in Windows it works the same way as in Linux - minimal grid size is 1 no matter what you put in configuration and doesn't get saved between restarts, those fields in Texture Properties are grayed out.

 

Has something changed in newer versions there and is the A-Z tutorial obsolete? Can someone else confirm this behaviour in 1.8?

Link to comment
Share on other sites

It's not obsolete! There's the occasional point that could do with updating.

 

I can't check the grid default behavior right now, but note that you probably won't rely on it at all when you get used to using DR. If this is a general bug, that'll be why many of us haven't noticed. Changing grid size to a suitable number is something you do automatically before manipulating anything in DR, using the hotkeys 1-9.

Link to comment
Share on other sites

On rescaling: http://wiki.thedarkm...in_Dark_Radiant

 

(With all the caveats already mentioned above: don't go there, not for movables, avoid physical interactions, replace the shadow, etc.)

 

That said, see the blue curtains over the window in this pic?

InnBusinessOffice.jpg

 

The left curtain is two-thirds its native size, and the one on the right is halved in size (it would be through the floor in length normally), they are both non-solid and the shadow was built separately.

 

They add so much to the natural lived in feel of the space, I felt the time spent was worth it to me.

  • Like 1

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

I'm trying to have an AI stand in front of the player with their arm outstretched (and a letter in their hand). The idea is that when the player takes the letter, the AI puts his hand back down and then goes into his idle animation. Is this something that's at all possible? Maybe with a func_animate?

 

You could use idle torch for this.

Link to comment
Share on other sites

On rescaling: http://wiki.thedarkm...in_Dark_Radiant

 

(With all the caveats already mentioned above: don't go there, not for movables, avoid physical interactions, replace the shadow, etc.)

 

That said, see the blue curtains over the window in this pic?

 

They add so much to the natural lived in feel of the space, I felt the time spent was worth it to me.

I agree. I remember that room! Made me resort to a very rare blackjack. I'm hoping I didn't cut the Gordian knot :)

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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...