Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I'm focusing so heavily on this because i'm trying to build each room to a final state before moving onto the next (a better mapping technique in my opinion) so I just want to make sure this is done before moving on.

 

Personally, I avoid that approach like the plague. As a map progresses, it invariably is going to require some architectural changes, especially when dealing with lines-of-sight and visportals and performance needs. When that time comes, you'll be glad you didn't spend oodles of time detailing the stuff you now have to delete or move out of the way.

Link to comment
Share on other sites

Well my base geometry is done, you can run from the start of my map to the end and everything is there, windows, doors, walls, supporting beams, outside walls,gates, and some areas are pretty much finished as well. What i'm doing now is picking the right textures and adding that lived in feeling with decals, objects, etc. That's what I meant be focusing on one "room" at a time. And by room I guess I mean building not just a bedroom/livingroom moreso the armor shop, warehouse, home, etc.

 

I find just openly detailing like how you guys mention it doesn't work for me because I need to get into the mindset of that house and just build with the flow.

 

edit: but with all that said I guess I will just leave the decals until the end and focus my efforts on another building/room because maybe that is better to do now as i'm not really making much progress with these decals. I'm also doing this map purely on my own this time (the building side at least), with my first map I had the amazing help of Bikerdude who did most of the detailing so this time around I have to learn it for myself.

 

Thanks for the advice guys!

Edited by Goldwell
Link to comment
Share on other sites

But you don't need to check the pointfile to find out whether you had a leak. Hope that made sense

 

I have one house in my map that is giving me fits. My sounds do not turn on and off properly. Everywhere else they work fine. I have done everything I can think of to check for a leak. I was using the technique Airship Ballet suggested to look for a leak. By copying all brushes and moving it outside my map. But when I did that, I got the cannot run pointfile error message???? Very confusing...

Quando omni flunkus moritati" ("When all else fails, play dead")

Halloween Contest Winner 2014

Link to comment
Share on other sites

@Goldwell. You have a couple of texture misalignments on the wood beams.

 

However, I suggest adding beams at the corners and in the frames, it looks very blocky and unstable by now.

 

In regardence of dirt decals, I would agree with Spring and gman. If you do not have a detailed plan of your mission with performance taken into consideration beforehead, you ay have to change things. So detailing the mission after the basic work is done is the better approach. As you seem to have used filter decals, you may be aware that you can create them very easely yourself. I've explained that in one of my let's maps (forgot which one).

 

I may upload a tutorial if wanted.

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 have one house in my map that is giving me fits. My sounds do not turn on and off properly. Everywhere else they work fine. I have done everything I can think of to check for a leak. I was using the technique Airship Ballet suggested to look for a leak. By copying all brushes and moving it outside my map. But when I did that, I got the cannot run pointfile error message???? Very confusing...

 

Thinking... dmap will only error and make a pointfile for an external leak, not the leak of a building inside the map, but you have that covered when you copied the building out into the void. One thing to check: did you put at least one entity inside the copy of the building outside the map? You need to, or dmap will ignore it. What dmap does to check for leaks is to find everywhere in the map that the entities in the map can reach without passing through a solid wall. Any spaces that can't be reached by at least one entity will simply be ignored during dmapping.

 

Have you tried the console command r_showportals 1? If there's a visportal missing or permanently open, you know for sure that you have an internal leak, although it won't tell you where it was.

  • Like 1
Link to comment
Share on other sites

Just after some opinions on the walldirt, I have left my map for a day or so and come back with a fresh mind and after placing dirt decals on the walls I don't really think it suits it.. I changed the wood texture on the wall and I think it just doesn't need it.

 

I'm focusing so heavily on this because i'm trying to build each room to a final state before moving onto the next (a better mapping technique in my opinion) so I just want to make sure this is done before moving on.

 

OK now I will sound critical. :-) Indiscriminately placing dirt decals on the wall doesn't help. Where would smudges and dirt be? At corners by entryways where people put their greasy hands on the wall. Soot by candles. Near floors. In corners where spiderweb collect dust. It's not what you pictured, which more like graffiti vandalism than dirt.

 

I once showed two versions of the same picture of a woman to some teenage boys, asking which they found more alluring. They all chose the exact same image. None could tell me why. The difference? The amount of color on her lips.

 

That's why I described dirt decals like make-up previously. It needs to enhance, not obscure; it should blend in, not stand out. The viewer's eye isn't drawn to the eye-liner and eye-shadow, but to her eyes. In your case, you are drawing the viewer's eyes to the wrong element. You are right, it looks worse than the untreated version. But the naked version looks plastic, clean, not like a lived in shack; rather like a mannequin instead of living person.

 

Imagine instead a dirt decal that darkens the bottom of the wall, turning clear toward the top, that would add a lot of dimension. Just like adding furnishings to a room, add decals to each wall, floor, and maybe ceiling. The version you picked could work for a floor (or ceiling if more transparent).

 

PS: Unlike others, I do decals while I'm there too.

"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 have one house in my map that is giving me fits.

 

I find it easier to do the reverse sometimes. I'll wall off a section and test it, blocking visportals/walls/etc. No problem then? I slide the wall back a bit, test. Keep going. If the problem doesn't reveal itself until my artificial blockade is slid all the way off, start from the other side, or perpendicularly, as the internal leak is likely in the corner of that far wall.

 

I've found multiple leaks in others' maps that way.

 

However if you didn't get a pointfile generated with it mapped separately, there might not be a leak but another issue perhaps? I'd double-check that first, as I once spent time trying to track down a leak that didn't exist in my first map, having needed another location separator on a visportal or something like that instead.

  • 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

It sounds like a lack of an entity inside the room. A leak is generated when the computer can draw a line from an entity into the void. No entity, no line.

 

Another possibility is that there IS no leak, but there is a disappearing brush somewhere (when brushes overlap and create slivers, especially on diagonal lines, or when brushes are off-grid, they can disappear when running the map). Turn everything but your large sealing walls into func_statics.

  • Like 1
Link to comment
Share on other sites

I need a light with constantly rising brightness. There are a variety of light materials with different "table" parameter, but I'm not sure with one will give me constant brightness adjustment instead of some sort of sinusoid.

 

 

lights/erh_round_pulseslow
{
{
 forceHighQuality
 map lights/biground1
 colored
 zeroClamp
 red	 ((9 * blinktable [(time * .0005 ) ])  ) * Parm0
 green   ((9 * blinktable [(time * .0005 ) ])  ) * Parm1
 blue    ((9 * blinktable [(time * .0005 ) ])  ) * Parm2
}
}

 

 

And heres all posibilities:

table strobetable { { 0, 0, 0, 0, 1, 1 } }
table blinktable { { 0, 1 } }
table blinksnaptable { snap { 0, 1 } }
table flashtable { { 0, 0, 0, 0, .5, 0, .5, 0, 0, 0, 0, 0, .5, 0, .5, 0, .5, .5, 0, 0, 0, .5, 0, 1, 0, 1, 0, 0, 0, 0, .5 } }
table blinktable2 { snap { 0, 0, 0, 1 } }
table blinktable3 { { 1, 1, 1, 1, 1, 1, 0 } }
table blinktable4 { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 } }
table blasttable { { 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, .6, .9, .3, .5, 0, .2, 0, 0, 0, 0, 0, 2, 2, 1 } }
table stormtable { snap { 1, 1, .3, 1, .1, .3, .1, .1, .4, 1, 1, 2, 1, 1, 2, 1, .1, .1, .1, 1, .1, .3, 5, .2, .2, 1, .5, 1, .1, 1, .2, .6, 1, 1, .2, 1, 1, 1, 1, .1, .6, 1, .1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0.4, 2, 2, 2, .2, .1, 1, 1, 1, .5, 0, 1, 1, 1, 1, 1, .1, .1, 2, 1, 1, 1, 1, 1, 1, 1, .1, 2, 1, 1, 1, 1, 1, 1, 1, 1, .1, 4, 1, 1 } }
table flickerblink { { 0, .3, .1, .5, .3, .8, .9, .5, .2, .1, .7, .4, 1, .2, .5, 0, .2, .7, .5 } }
table bathroomtable { { .7, 1, .6, .8, .6, .6, .6, .7, .8, 1, 1, .9, .7, .8, 1, .7, .7, .8, .6, .7, .7, .8, .6, .9, .7, .9, 1 } }
table bathroom2table { { .9, 1, 1.6, .8, 2, 1, 1.5, 1.7, .8, 1, 1.2, .9, .9, .8, 1.3, .8, .9, .8, 1.6, .7, 1.7, .9, 1.1, .9, .8, .9, 1 } }
table blinktable5 { snap { 0, 0, 0, 1, 0, 1, 0, 0, 0 } }
table storm2table { snap { 1, .1, 1, 0, .7, .1, .1, .1, .1, .1, .1, .1, 0, 1, 0, 1, .1, .1, .1, .1, .1, .1, .1, .1, 1, .1, .1, .1, .1, .1, .1, .1, 1, 0, 1, 1, .1, .1, .1, .1, .1, .1, .1, .1, .1, 1, 0, .7, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0, 0.1, 0, 0.1, 0.1, 0, 0.1, 0, 0, 0.1, 0, 0 } }
table shearTable { { -1, 0, 1, 0 } }
table scaleTable { { 1, 2 } }
table blamptable { { .9, 1, .86, .95, .87, 1 } }

table meattable { snap {  0, .1, 0, 0, 0, 1, .5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 , 0, .3, 0, .3, 0, .7, 0, 0, 0,.1,.1,.1,.1,0,0,0, 0, .3, 0, .3, 0, 1,1, 0, .3, 0, .7 } }

 

Is there any simple parameter to raise brightness?

S2wtMNl.gif

Link to comment
Share on other sites

What do you want to happen when it hits max brightness? Snap back to 0?

 

You could make a new table that counts slowly from 0 to 1. Or try a formula instead of a table. Here's an example:

 

red     (((time * (1 / 5.25) * 255) % 255) / 255) * Parm0
green   (((time * (1 / 5.25) * 255) % 255) / 255) * Parm1
blue	(((time * (1 / 5.25) * 255) % 255) / 255) * Parm2

 

You'd set the _color in DR to be the colour at maximum brightness. The time taken to cycle is the 5.25 in the above formula: 5.25 seconds, which you can adjust as needed.

 

The reason for multiplying everything by 255 then dividing it again is that the material shader's modulus function will only give whole-number results, for whatever reason. So if you try to do it without multiplying first then dividing after, it always comes out at zero.

 

ps. You should remove the "colored" keyword in your material def by the way. It's a shortcut that sets the red/green/blue channels to parms0,1,2 so it conflicts with your more precise definitions. Not sure whether it'll cause problems, but it can go.

Edited by SteveL
  • Like 1
Link to comment
Share on other sites

lights/erh_round_slowraise
{
{
 forceHighQuality
 map lights/biground1
 colored
 zeroClamp
 red	 (((time * (1 / 40) * 255) % 255) / 255) * Parm0
 green   (((time * (1 / 40) * 255) % 255) / 255) * Parm1
 blue    (((time * (1 / 40) * 255) % 255) / 255) * Parm2
}
}

 

So this one will turn from 0 to 100% in 40 seconds, and stay at 100% ? And if I want a burning light value, similar to putting few light sources in one place?

S2wtMNl.gif

Link to comment
Share on other sites

No it won't stay at 100%, it'll start over from 0. Setting one up to stay at 100% isn't difficult, but how will you tell it when to start? If it's not at map start, then it will be 100% when the player first sees it.

 

EDIT: If you want to trigger a light to turn on slowly and stay there, use the script event fadeInLight instead of tweaking the shader.

Link to comment
Share on other sites

No, I don't think that's possible. The only way materials can count time passing is by using the time since map start, so you're stuck using that if you amend the material file.

 

What you need is a target_callscriptfunction that calls a 1-liner script that causes the light to fade in.

 

If you already have a .script file for your map, add this to it. If not, create a "mymap.script" in the same folder as your "mymap.map" file. Change the name so it matches the name of your map

 

void fadeInSpecialLight()
{
  $mylight.fadeInLight(40);
}

 

change "mylight" to the name of the light in your map.

 

Then create an entity target_callscriptfunction and give it this spawnarg:

 

"call" "fadeInSpecialLight"

 

Then target the target_callscriptfunction from a trigger or a switch, whatever you want to use to start the light turning on.

  • Like 1
Link to comment
Share on other sites

Hmm I've just been messing with it in my test map (I was testing lights anyway) and I think I found a problem with the fadeInLight() script event. In my tests, the light flashes at full brightness before it starts the fade in. That's no use. There's no bugtracker issue for it though, so maybe it's just my setup.

 

In the meantime, if you get the same problem, here's a fix. Just use this in place of the original script I posted above. No need to change anything else about the setup.

 

void fixedFadeInLight(entity light, float seconds)
{
vector col = light.getVectorKey("_color");
float level;
for ( level = 0; level < 256; level++ )
{
	light.setLightParm(0, col_x * (level / 255) );
	light.setLightParm(1, col_y * (level / 255) );
	light.setLightParm(2, col_z * (level / 255) );
	sys.wait(seconds / 255);
}
}

void fadeInSpecialLight()
{
  thread fixedFadeInLight($mylight, 40);
}

  • Like 1
Link to comment
Share on other sites

I'm in the process of optimizing, and have a few questions. These may have subjective answers.

 

When it seems logical to group together worldspawns, I'm grouping them into func_statics. But should I be doing this with every non-perimeter brush (converting them to func_static, that is)? Does this go for patches as well?

 

I also have a couple overlapping light fields. I know that's one of the suggestions for optimizing, but it's not a dealbreaker, yeah? I tried not to have it happen any more than necessary given the architecture and lighting of my level.

 

It's a small-ish level. I can't imagine it will give anyone problems regardless of what I do. But I want to learn proper practices as much as possible anyway, for future reference. Thanks.

Edited by Digi

"Fancy burricks are afraid of dogs, if they encounter each other the dog barks and the burricks poop." - Thief: Deadly Shadows Game Designer

Link to comment
Share on other sites

When it seems logical to group together worldspawns, I'm grouping them into func_statics. But should I be doing this with every non-perimeter brush (converting them to func_static, that is)? Does this go for patches as well?

 

My rule of thumb is to do it unless there's a good reason not to. Just remember AI will ignore func_statics, so you have to guide them with monsterclip.

Link to comment
Share on other sites

My rule of thumb is to do it unless there's a good reason not to. Just remember AI will ignore func_statics, so you have to guide them with monsterclip.

 

Fair enough. I was hoping to get out of a bit more work, but no such luck. Brush by brush it is!

 

Also, I didn't know that about AI, and was curious what the monsterclip option was for. Thanks.

"Fancy burricks are afraid of dogs, if they encounter each other the dog barks and the burricks poop." - Thief: Deadly Shadows Game Designer

Link to comment
Share on other sites

Fair enough. I was hoping to get out of a bit more work, but no such luck. Brush by brush it is!

 

There won't be anything to gain in going back through your first map and building it a second time in caulk and clip brushes, just in case you were thinking of doing that. There are all sorts of reasons that people use FSs in place of worldspawn: performance can improved when you group surfaces with the same texture; it can solve some occasional problems with dmap, but no need to do that if you've finished a map and don't have problems; it gives you options for controlling things like shadowcasting; it can simplify things for ai if they are having trouble getting past your geometry; it saves you having to worry about edges being flush and sealing when you're working on complicated bits, if your sealing walls are invisible and your visible ones are completely separate; it lets you pull off tricks like seeing parts of your geometry through closed visportals, and build rooms that aren't box shaped, and plenty more. Even if you were doing all that, you'd still have uses for visible worldspawn. You probably wouldn't convert a flat square floor between building levels to an FS and then duplicate it with a caulk brush, for example.

 

The lights question: I've no experience of optimizing a map I must admit, but I've read other threads where the guideline comes out at limiting lights hitting a surface to three as a good rule of thumb. But again, it comes down to performance. Light overlap causes surfaces to be drawn multiple times, so avoid it wheres there's no good reason for it, and make an effort to reduce it in spots where a map slows down.

  • Like 1
Link to comment
Share on other sites

Yes, avoid overlapping lights when possible. Two lights overlapping isn't a problem for most peoples' systems though.

 

However, three overlaps starts to show lower performance for many. Four overlapping tends to show slower FPS for most, which we try to avoid.

 

If you haven't read this wiki page, Performance: Essential Must-Knows, you'll wish to! There are commands to evaluate the results of your lights and whatnot.

 

PS: A key advantage of converting things to func_static is to enable noshadows to avoid shadow calculations and make them non-solid to avoid physics calculations.

  • 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 have, at most, two overlapping lights, unless someone decides to pick up a candle and bring it to a couple very specific locations. So no worries there, apparently. As mentioned, I didn't overlap unless it seemed unavoidable. Thanks for the general guidelines though. My system doesn't seem to have any problems (I'm pretty much always > 60fps), but I also gather that my system specs are a bit better than some.

 

Also, will making patches func_statics cause the AI to have trouble navigating them? I have some patch-bumps along the paths of 1-2 of them.

 

Yes, avoid overlapping lights when possible. Two lights overlapping isn't a problem for most peoples' systems though.

 

However, three overlaps starts to show lower performance for many. Four overlapping tends to show slower FPS for most, which we try to avoid.

 

If you haven't read this wiki page, Performance: Essential Must-Knows, you'll wish to! There are commands to evaluate the results of your lights and whatnot.

 

PS: A key advantage of converting things to func_static is to enable noshadows to avoid shadow calculations and make them non-solid to avoid physics calculations.

 

That's the tutorial I'm using as a guidepost for my optimizing, so yes, I'm doing as much as I can from it.

 

And I've been making a lot of stuff "noshadows = 1", but I didn't think it was limited to just func_statics and your "PS" has me curious. Can worldspawns not be noshadowed?

Edited by Digi

"Fancy burricks are afraid of dogs, if they encounter each other the dog barks and the burricks poop." - Thief: Deadly Shadows Game Designer

Link to comment
Share on other sites

If you put a spawnarg on a worldspawn brush, you'll see it on EVERY worldspawn brush. Worldspawn is kind of "one thing", it doesn't have individual attributes like entities. I know tutorials don't explain the difference very well, it was a learning curve for me too.

 

PS: Func_stats also have a neat trick for roof lines, as they'll render in front of caulk sky, so you can poke up above that way (if this makes sense).

  • 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

And I've been making a lot of stuff "noshadows = 1"

 

You'll hear different opinions on this, but I don't think it's especially useful to do that on regular geometry unless you have AI with torches walking around. Otherwise, things not being lit directly by lights aren't casting shadows anyway, and things that are directly in the light SHOULD be casting shadows. And the amount of performance saved is likely to be minimal unless you have very complex func_statics.

  • Like 1
Link to comment
Share on other sites

I tend to copy/paste things with the attributes already set, so like baseboard trim, I'll make nonsolid and turn off shadows, then copy/paste that piece around the room and throughout. Not only is it less work, but it reduces human error. Those who use a modular building style do the same, but with complete wall/trim assemblies of a specific size, and just copy more times.

"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

If you put a spawnarg on a worldspawn brush, you'll see it on EVERY worldspawn brush. Worldspawn is kind of "one thing", it doesn't have individual attributes like entities. I know tutorials don't explain the difference very well, it was a learning curve for me too.

 

PS: Func_stats also have a neat trick for roof lines, as they'll render in front of caulk sky, so you can poke up above that way (if this makes sense).

 

Ah, ok. So maybe DON'T noshadows an individual worldspawn. I don't want it on all of them. Thanks.

 

You'll hear different opinions on this, but I don't think it's especially useful to do that on regular geometry unless you have AI with torches walking around. Otherwise, things not being lit directly by lights aren't casting shadows anyway, and things that are directly in the light SHOULD be casting shadows. And the amount of performance saved is likely to be minimal unless you have very complex func_statics.

 

In that case, I may have done enough already (or too much). I'll do some tweaking based on this suggestion. Gracias.

"Fancy burricks are afraid of dogs, if they encounter each other the dog barks and the burricks poop." - Thief: Deadly Shadows Game Designer

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

    • 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
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...