Jump to content
The Dark Mod Forums

Lux's mapping thread


Lux

Recommended Posts

Hey guys, as suggested by Demagogue, I'm creating this thread to answer things I come across while creating my FM. I'm sure you guys/gals are familiar.

 

So this is brought over from my other thread where it was misplaced:

______________________________________________________

 

Hey, I noticed in the Radiant editor when I select "P" for preferences > Camera > uncheck "Enable far-clip plane", everything in the Camera view window turns to the "Shader not found" texture. I fixed it by exiting and reloading the editor, however after changing this setting, when the DarkRadiant editor launches its asks me again to configure the Engine path.

 

I've subsequently noticed that if I change the Camera Settings > Movement Speed (game units) slider from the default to anything, e.g. moving it 1 notch either direction, it does the same thing to the camera view.

 

I'm assuming this is because I have Doom3 and TDM installed in the Steam directory and its looking in the default location C:/Games/Doom3 and can't find it.

 

After editing the path back to the Steam directory and then reloading the map I was working on, now the setting is correctly enabled/disabled however the picture I hung on the wall shows the "NoDraw" texture for the picture inside the correctly textured frame. The Necklace on the table is just a green blob which I'm assuming is the "collision" texture because it has been added to my Texture Browser. And the stone and wooden floor textures have been scaled way back and are now tiny repeating textures. Pulling up the Surface Inspector and re-selecting the brushes and clicking the Modify Texture > Natural button fixes them. Default Scale is set to .3, I believe it was .5. It appears its a good idea to set the preferences prior to starting brush creation? If a preferences change is made later will this create many issues on the map?

 

It appears I was looking for "cubic clip the camera view" and instead changed the camera option in the prefs instead.

 

Repeating this causes again all textures in the camera viewport to render as "shader not found", checking the game engine path again in Preferences > Game > , it has been blanked.

 

Relocating game engine path using the "..." button restores all textures except the picture in the frame (no draw texture) and the necklace on the table (collision texture). Is this a known bug?

 

The map complies fine with no red error messages and the textures are there once the map loads. Also the necklace looks fine and is frobbable and not jittering around like its colliding with the table.

 

______________________________________

 

Not sure if that is just Nvidia's latest WHQL driver issue not updating the 3d viewport or something that pertains to a Steam installation or what.

 

First of all, thank you Fidcal for an excellent and methodical tutorial!

 

Also, Im guessing either I'm misreading directions or some of the info on the A-Z tutorial is outdated because of 1.08 game engine update changes? I've run in to a couple issues so far and these questions will pertain to the A-Z tutorial.

 

1) Fog - bottom of page 3

Created as indicated in the testMap yard.

  • Create a light in the normal way in the centre of the yard and drag out its box to fill the yard north to south and from the east wall the wall with the door. It should have the height from floor right up to the sky.
  • J for light properties
  • Give it a brightness VALUE 25
  • On the right is the list showing fogs and lights so choose fogs and select delta1_fog. You can try others but there is not a lot of difference and some do not seem to work.
  • J to close light properties.
  • In Entity Inspector give it the property shaderParm3 and a value of 600. This is the distance in units beyond which the fog is completely opaque. Our yard is about 640 units long so if you look from one end then the farthest wall is whited out. Take a few steps and it starts to appear.

When this renders it looks like you're walking through a solidish block of translucent white/grey z-fighting mess. Tons of flickering and no puffy areas or clearish areas, etc. Very homogeneous throughout the air. Does an alpha mask need applied to this? Have the settings for this changed or is this graphic driver related?

 

 

2) Performance: Hiding Distant Rain

 

If you change the rain and splash patches to func_static entities you can add some properties that hide distant rain so improving performance. I used it in the extended released version of Thief's Den but it is not critical in this small yard so I will only mention it here briefly...

  • hide_distance n = distance in n units beyond which a rain patch is 'switched off'.
  • dist_check_period n = how often in milliseconds the distance is checked. Too-frequent testing reduces performance; too-infrequent will cause a visible delay. For rain I used 0.25.
  • dist_check_xy n = if 1 then only horizontal distance is tested not vertical. Set to 1 for rain/snow.

Hung up here on changing the Rain and Splash patches to func_static entities. I Alt-Shift select them one at a time and the Entity properties are "classname: worldspawn".

 

If I select that I get the "Choose entity class..." at the bottom where I can select Func_Static and hit the Add button to close that dialogue. Nothing is apparently added though. The classname remains "worldspawn". Also tried altering to func_static after adding the 3 parms above however no change is apparent. I also tried typing it in directly in the lower entry boxes with no change.

 

Also, I noticed at the bottom of the "choose entity class..." dialogue when you initially open it and "worldspawn" is selected, it reads, "Every map should have exactly 1 worldspawn". So now after I've added the three parameters, they're obviously being applied to all brushes classed as worldspawn. If I alt-shift select any brush in the world now, they all have these three parms, hide_distance, dist_check_period, dist_check_xy, so clearly I'm doing something wrong in that I can't get the Func_static class to apply to the rain and rain_splash patches.

 

 

EDIT: Looking at a door that I have added the "mover" entity property to and changed the classname to "atdm:mover_door", I see "func_static7" is added to this Entity, so in the same way do I need to add the parm "name" and then assign it the "func_static" value? Does the "classname" remain "worldspawn" or does this need altered?

 

 

Note: The rain and rain_splash patches are correctly rendering in-game and compiling without errors to my knowledge.

 

Note2: When I launch TDM and pull up the console I get 147 warnings about file missing, various sounds (Thunder), materials, etc.

 

Note3: When I dmap my test map, the only warnings I receive are are (3) Warning: Node without a volume under the "TreePortals" section of three different areas.

Edited by Lux
Link to comment
Share on other sites

1.) Make sure that the fog does not end exactly on the walls, but extend its bounds a bit into the walls, or you'll get z-fightings. If the fog seems to thick, increase the shaderParm3 value.

2.) To create a func_static out of worldspawn, select the worldspawn, than right-click in the ortho-view and select "convert to func_static". Add the spawnargs afterwards.

The name is irrelevant, as long as you don't want to refer to it via scripting or objectives/triggers. The warnings in the console are normal, just ignore them.

 

Btw.: I think fidcal also uploaded some tutorial videos on youtube. You can also check out these if you get stuck with the written tutorial. :smile:

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

Ok, so I expanded the fog just past the boundry walls and this ended the z issues and it renders properly.

 

As the example in the tutorial illustrates, the courtyard that we were adding fog to is shaped like an L so there are 2 fog lights needed to cover the entire courtyard.

 

The boundry between them I tried a few different things.

 

1) using exact same boundry line

2) allowing slight space between them

3) overlapping them

 

All produced different rendered results but the same general "awful" effect, either a definite boundry or a "gap" with no fog when the player crosses the divide.

 

Is there a solution for this or is the best measure generally just to avoid using multiple fog lights in a single area thereby constraining the area to that which best suits the rectangular fog boundry area?

 

Also, in doing this I noticed when the boxes overlapped it created the effect that the fog as it extended up in to the skybox made the skybox look appropriately foggy where as with no overlap the fog ends bascially where the wall does and does not extend up in to the "air" giving the player a sense of atmosphere.

 

I tried to use this "overlapping" of fog boxes which generated the fog plane by creating multiple other fog lights surround the initial 2 so there would be fog light boundries overlapping up in the night sky.

 

I don't know if I'm explaining that clearly or not. In any case, it had no effect. The boundries were not observable against the skybox no matter what, so the sky still looked devoid of fog. Is there a work around for this or is it generally good practice to also avoid?

Edited by Lux
Link to comment
Share on other sites

There is no real good workaround for foglights. If you really want to use it, you should try to stick with cubic shaped outside areas. If you set shaderParm3 high enough, so that the fog isn't so thick anymore, this may also reduce the problem. Other workarounds are are as following

  • Don't put lightsources next to the fog edges. The more light, the better it can be seen.
  • Try to cover it by placings things that are visible but not necessary solid, like bushes (this only works good if the fog is limited to the ground).
  • Try to distract the eye from such glitches so they are not as obvious

As Spring already said, fog is tricky.

 

I guess there are particles you could use to achieve a fog-like effect, but I never tried out and they have a high performance impact. Maybe it's best you keep the fog for later on ;)

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

Fog is very tricky.

You must have one big foglight. You cannot put several next to each other and make it look good.

In glenham, I had one big foglight. When the player goes in, the light is teleported elsewhere to get rid of it. You cannot switch them off and make them look good. The boundary of areas where the fog is turned on and off can be masked by particle fogs.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Thanks guys, yeah... fog for later ;) Yeah I'm just curious about these things as I go through the tutorial and I sincerely appreciate the feedback.

 

Its nice to know some of the pitfalls ahead of time. It will help me make decisions when I get to that point and save me time and double work as I look ahead.

Link to comment
Share on other sites

One thing I saw at doom3world about fog was that you can control its distribution with a custom projection image. If you are good at photoshop you could capture an ortho view of your map then make what amounts to a fog intensity map by choosing lighter tones for more density and darker for more clarity (alpha). Not sure if this still works though.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I may look in to that a bit later but sounds feasible. Thanks for the mention, nbohr1more.

 

Is there any way to change the scroll wheel ortho view zoom so that you can point at anything anywhere in the view and when you zoom IN whatever the cursor is over zooms in to the center of the view and when you zoom OUT the view zooms out towards where ever you have the cursor pointer? That is how mastercam works and wow does it aid navigating around. Is this adjustable?

Edited by Lux
Link to comment
Share on other sites

One thing I saw at doom3world about fog was that you can control its distribution with a custom projection image. If you are good at photoshop you could capture an ortho view of your map then make what amounts to a fog intensity map by choosing lighter tones for more density and darker for more clarity (alpha). Not sure if this still works though.

 

You can also do a particle based fog that is affected by lights with this little mod.

 

http://www.doom3world.org/phpbb2/viewtopic.php?f=26&t=24150&st=0&sk=t&sd=a

 

Nobody appears to have done any work on it for some time, so I'm sure it could be improved by now.

Link to comment
Share on other sites

I worked on a way to change a foglight depending on ambient light. It uses the zone system. I pm'ed Moonbo how to set it up, but I can also post it in my mapping thread in the next days.

 

This way, you only have one fog light spreading over the whole map (similar to the ambient_world light) and change it using the zone system and a little script. It provides quite good results, and as there is only one fog light used, you don't have the glitches you get using several foglights.

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 worked on a way to change a foglight depending on ambient light. It uses the zone system. I pm'ed Moonbo how to set it up, but I can also post it in my mapping thread in the next days.

 

This way, you only have one fog light spreading over the whole map (similar to the ambient_world light) and change it using the zone system and a little script. It provides quite good results, and as there is only one fog light used, you don't have the glitches you get using several foglights.

 

Fantastic! Adding a fog component to the location system would be most handy. Will the fog slowly intensify on and off, similar to the location system ambient light color change? It would definitely be a good addition to the core-mod location system.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Fantastic! Adding a fog component to the location system would be most handy. Will the fog slowly intensify on and off, similar to the location system ambient light color change? It would definitely be a good addition to the core-mod location system.

Yep, it does. You can also slightly change the fog density from location to location. I use it in inside locations, too, where it adds a lot of athmosphere.

 

post-11230-0-75091300-1367568479_thumb.jpg

 

post-11230-0-51173000-1367568489_thumb.jpg

  • Like 1

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

If you set the fog density a bit higher, it looks like TDS :P

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

You know, I know there were many things done wrong in TDS, but there were many many things done right too. I really enjoyed it.

 

Note to self: DO NOT SNAP SKYBOX.PFB TO GRID ... lol screws up all the positioning within it and you get multiple pieces of moon :o

  • Like 1
Link to comment
Share on other sites

Is there any way to change the scroll wheel ortho view zoom so that you can point at anything anywhere in the view and when you zoom IN whatever the cursor is over zooms in to the center of the view and when you zoom OUT the view zooms out towards where ever you have the cursor pointer? That is how mastercam works and wow does it aid navigating around. Is this adjustable?

 

I'll take this as a "non adjustable"?

Link to comment
Share on other sites

If the fog parameters are adjustable by script, my intuition is might be best handled by someone just making an external script and using the location script calls to call it at the transitions... And then if they want it to be adjustable, so it's multipurpose & other mappers can use it, you'd make a dummy object with all the parameters you want adjustable as spawnargs (set to a default value), and the script will just grab all its parameters from the spawnargs on that dummy object. Then if it's successful, it's very easy to integrate the whole thing into the mod (the new script & def files).

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

So how do you "add a fog component to the location system"?

I never said that. I said I change the fog color depending on the ambient color.

If the fog parameters are adjustable by script, my intuition is might be best handled by someone just making an external script and using the location script calls to call it at the transitions... And then if they want it to be adjustable, so it's multipurpose & other mappers can use it, you'd make a dummy object with all the parameters you want adjustable as spawnargs (set to a default value), and the script will just grab all its parameters from the spawnargs on that dummy object. Then if it's successful, it's very easy to integrate the whole thing into the mod (the new script & def files).

Basically it works like that. But I didn't wrapped it up into a scriptobject yet, as I was working on something for Sotha. I'll do that and post it, be patient. :smile:

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 never said that. I said I change the fog color depending on the ambient color.

 

Right. That was Sotha's encapsulating phrase for your suggestion. I'm just curious to see how it's done. Will patiently wait for the post.

 

I think someone mentioned upthread (I think it was this thread, maybe not) that turning a fog light on and off depending on where the player is doesn't work well. I've used that method successfully, so I know it works fine. Changing colors isn't something I've experimented with, though.

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 0 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • 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.
      · 7 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
×
×
  • Create New...