Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

A trick I used to get rid of sparkling lines was to create horizontal subdivisions and then bulging the patch outwards in the center slightly. I did this for A House of Locked Secrets several times and it always worked.

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

The screenshot is a good example for rounding errors caused by badly conditioned triangles. Change the subdivision so that the triangles are less stretched. In your case you would have to increase the vertical subdivision. Bulging the patch does the same as a more fine subdivision will be used in that case anyways.

 

Models seem to suffer less from this issues, so exporting the geometry in question into a model and using that instead might also work (without having to add additional tris).

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

 


Attempts to add vertical subdivisions just create more/other seams.

That's interesting, could you post a screenie?

 

Another advice would be to build your mission so that the world origin is roughly at the center. Rounding errors normally increase the farther away from the origin an object is.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Hey fellas, so I had an interesting question. I wanted to setup some building interiors (completely sealed off from the outside) with a trigger volume. I heard it's not supported in the idtech 4 branch but I was hoping to use a trigger_touch, so that only while the player occupies it; the trigger kicks off a relay. The relay in question would basically turn off all outside lights (specifically shadow casters) to help keep the frames up. I'm using several large parallel lights and they're pretty decent at their job until I have to go indoors and then my frames tank.

 

I was sincerely hoping there was a convenient trigger volume to accomplish this, as then I wouldn't see all those extra shadow calculations when I run the visual debug indoors.

 

EDIT: In response to Duran, are you using caulk in between those brushes? I've heard it can create seam-line errors like that, you may want to apply the detail texture over the entire model if so.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

All triggers normally respond to the player. Trigger_touch is intented to be used with non player entities. Most lights won't cause an issue if the area they are in is completely sealed off. So unless the light volume reaches through a visportal into an area that is visible from you position (thus meaning the visportal leading to that area is open), the light won't be taken into consideration for rendering and therefore no shadow calculations will be performed.

 

If you still want to disable the lights when the player exits an area, I would suggest using the location system. But as said, it seems like a big effort which will most likely not have a considerable or even no effect on performance.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

All triggers normally respond to the player. Trigger_touch is intented to be used with non player entities. Most lights won't cause an issue if the area they are in is completely sealed off. So unless the light volume reaches through a visportal into an area that is visible from you position (thus meaning the visportal leading to that area is open), the light won't be taken into consideration for rendering and therefore no shadow calculations will be performed.

 

If you still want to disable the lights when the player exits an area, I would suggest using the location system. But as said, it seems like a big effort which will most likely not have a considerable or even no effect on performance.

 

The parallel lights in question cover most of the map and seems to have a tendency to run even when most of the outside map is sealed off. It may be peeking in through a cutoff hallway just slightly, but nevertheless it draws considerable performance drops because it considers every object in the building (whilst having no reasonable effect to do so). It's a three story building with a lot of mechanical equipment inside. Since the perf drop only occurred when I added the new moonlight parallels, it's safe to assume that would be the cause. Thankyou for the tip though, I had heard the location system mentioned numerous times so I'll look into that right away.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

A huge parallel light covering the whole map isn't really a good approach, to be honest.

 

However, it isn't that important whether the light can be seen from the insight. If there is a chance that the light might hit a surface or cast a shadow in one of the areas that are visible from your position, even if would not see the light or shadow in the end, means that it will be taken into consideration, even if it doesn't get rendered.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

A huge parallel light covering the whole map isn't really a good approach, to be honest.

 

I have several that are covering different sections of the map (one per section). Each section is area portaled so they shouldn't be intersecting or ever running at the same time. I'm all ears if you've got a better method for good moonlight though.

 

 

However, it isn't that important whether the light can be seen from the insight. If there is a chance that the light might hit a surface or cast a shadow in one of the areas that are visible from your position, even if would not see the light or shadow in the end, means that it will be taken into consideration, even if it doesn't get rendered.

 

That's why I want to have a manual override trigger to make sure it stays off when not in view ;)

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

 

  1. I have several that are covering different sections of the map (one per section). Each section is area portaled so they shouldn't be intersecting or ever running at the same time. I'm all ears if you've got a better method for good moonlight though.
  2. That's why I want to have a manual override trigger to make sure it stays off when not in view ;)

1.

  • This heavely depends on how your outside area is build up. But assuming buildings I guess several small lights for each of the roofs would be an option.
  • The most performance efficient approach would be to use different materials on the outside, were the effect of moonlight is faked via the material itself instead of using actual lighting. However, this would mean that all of those materials would need to be written, which is probably not feasible unless you restricted yourself on a very low amount of different materials on the outside.
  • Another approach I was experimenting with a while ago was to use the ambient_world light for that stuff, and use shadow lights on the inside to darken those areas. It worked in general, but I can't say much on how this approach would work out performance wise. In addition, this would require the outside light to be constant, so no cloud scrolling or similar.
  • Yet another approach would be to use the ambient_world together with the spectrum keyword. This keyword allows you to determine which surfaces are affected by which light. I'm not sure how it affects performance, though.
  • Decals might be an alternative either. A while ago we had an discussion on how to create white dirt decals, that brighten up the surfaces underneath instead of darkening them. Would have to search for that discussion, though, as I don't remember the material setup anymore.

2.

As said, use the location system. You can specify functions to get called everytime the player enters or leaves a location via the "call_on_entry" / "call_on_exit" spawnargs on the info_location entities. The script could then take care of switching the light accordingly.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

It's a pretty tough guess to see how this is going to go. All of my details (I mean literally everything) is being modeled from scratch, so a lot of things I'm able to disable shadow draws on or use shadow2 on. The other tactic I've taken up is dividing the open spaces into three different sections. There should only be one section drawing dynamic shadows at a single time. It's still a balancing act for the performance and until I start throwing some AI in the scene I can't really say how much of a drop there will be. Lastly on AI, I've also made the consideration to keep the primary encounters indoors. So if I play my cards right I can successfully filter the two out so that most of the outdoor experience is exploring and the joints between other heavier gameplay sections. I've been rather strict about my buildings not being able to have clean line of sight out, partly for a more claustrophobic feel and to be able to seal every major building into it's own area portal.

 

That said, I'm having a go at the locations route first. Never used this system until now, so I'm completely new to the concept but I like where it's going so far. A brief rundown on the building in question is a three story factory with three different entrances. I'm only working on two doors right now and the third shall be added in later once that section is finished. I'm still trying to get the hang of the flooding method it uses, as I know adjacent area portals are considered unless marked. Just the outside location kicks in as apparently this error is preventing the two doors to function...

af4e3ebf924ae8e306fe4db26859867d.png

 

Alright now several things.

 

1: I had this same setup (only one a single door) working in a test map)

2: The current building in question appears to be properly sealed as the area portals still function correctly and cull the interior.

 

Not sure what I'm doing wrong to get that error because this is how the first door is setup...

 

2e48eb42ef0287e14e7e33887b0cce4b.png

 

The second door has used the same or just location separators on each side, but it still only runs the outside zone. Maybe I'm just blind and missed something on the wiki page? Dunno but hopefully the details provided can help us sort this out.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

In the photo example on my wiki page, you can hopefully see it's just one info_locationseparator that's piercing the visportal, so you see the two sides of that one entity. But if it's confusing for you it may be for others too, so I can reword it a little to make it clear there's just the one separator entity per portal. Edit: And done.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

  • The most performance efficient approach would be to use different materials on the outside, were the effect of moonlight is faked via the material itself instead of using actual lighting. However, this would mean that all of those materials would need to be written, which is probably not feasible unless you restricted yourself on a very low amount of different materials on the outside.
  • Yet another approach would be to use the ambient_world together with the spectrum keyword. This keyword allows you to determine which surfaces are affected by which light. I'm not sure how it affects performance, though.

It's pretty efficient according to this. However, I don't think it'll be flexible enough for many use cases: presumably the player lantern won't illuminate surfaces with a mismatched spectrum, for example.

 

 

  • Decals might be an alternative either. A while ago we had an discussion on how to create white dirt decals, that brighten up the surfaces underneath instead of darkening them. Would have to search for that discussion, though, as I don't remember the material setup anymore.

 

http://forums.thedarkmod.com/topic/17593-decal-request-white-dirtslime/ (That's odd: my image attachment in that thread has gone missing. Yours too by the look of it.)

 

The question in that discussion was whether we could find a blend mode that did the job without blend add's glow-in-the-dark tendencies. For moonlight, additive blending might be just fine (and we already have moonlit window materials). I imagine blendlights (like your shadow light suggestion, but brightening) might be the simplest way.

Edited by VanishedOne
  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Oh yeah that helps a bit. Also helps if I make sure my inside portals are working correctly I suppose too. :rolleyes:

 

I ended up having the external ones proper but my inside portals (where I was using the location system) weren't connecting because of the floor insulation material I was using. Welp lesson learned.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

 


... but my inside portals (where I was using the location system) ...

That's a bit of a contradiction. You either use the system for the whole map or not at all. Btw., the console warnings tell you quite exactly where your mistake was. Entities not touching a visportal (the visportal is the plane textured with the visportal material, not the whole brush). Whether a door is touching a visportal is completely irrelevant for the location system. The location overlapping either means there is a leak or that you missed a seperator somewhere.

 

@VanishedOne: Thanks for the links.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I think you misunderstand my meaning there. I simply meant to imply that the secondary layer of area portals (inside view cutoff hallways) weren't actually working. I accidentally used the wrong tool texture for the floors so it was treating the whole interior as a single area. Which is why I was getting the error because the entities were both occupying the same space. I got it all working now but that being said I should probably bind the nifty portals debug to a hotkey so I don't have to keep looking the command up for this. Thanks for all the quick responses though, makes this whole designer part a hell of a lot easier. :D

Modeler galore & co-authors literally everything

 

 

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!
      · 0 replies
    • 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...