Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Obsttorte:

 

Yeah, I meant skin files. The main parts I'll use over and over again are the wall segments. Maybe I'll make those models and then use them in prefabs so I can get the caulk and decals in one shot? I might just stick to just prefabs though too.

 

I'm really set on making a city map for my first mission and I know keeping performance in mind when I'm mapping is crucial. I'm hoping I can get some general feedback when I get to the point Im blocking out the map. I've read about what I can do to test it so I'll include lots of lighting and AI, watch the FPS, shadows, visportalso inside visportals, and tri counts. (If I got something wrong there or am missing something it's just because I don't have the wiki article open.) I'd just need advice on areas I can't figure out. Along the lines of "if you put a corner here, NEVER make that door openable, only have two lights max casting shadows, etc." Those are all things I know I should try first though so I should be decently covering my basics.

 

Springheel:

Yeah, between your advice and Obsttorte's it sounds like the best approach is gonna be light on my own models and heavy on the prefabs. I have some experience with Blender so I could be up for tweaking models. Probably not at first though. There's going to be enough to figure out and do without adding that work into the equation. That's also reason why I've cooled it on my idea for advanced AI patrolling. That stuff will be a good addition for v2 :)

 

I've had a lot of free time today and more tonight so I've been working on a prefab map. Would that be something I could share in a bit? I'm trying to make them as useful as possible and I know how important it is to get it right. Would I just zip up the .map? I could also include a folder with my prefabs, but since it's the construction of the pieces that matters it seems redundant.

  • Like 1
Link to comment
Share on other sites

You can always do some tests to see how the engine performs on your machine, the FPS counter and r_showPrimitives 1 command will give you some info on that. You'll see that number of triangles alone isn't the problem; drawcalls, shadows, AI pathfinding, lights per model, overlapping lights, number of materials per scene, all of that works together to bring your FPS down ;) Making your own models is definitely a good idea. Idtech4 benefits from modern modeling and level design techniques. So you can greybox your level first, design and add your structural and decoration models later, just like in usual workflow.

 

As for the mission, I agree with Obs that limiting your scope for your first one is a good idea. Making one location, a mansion, cathedral, bank, etc. would be more "careful" choice. You could limit yourself even further, and focus on interiors only. It would be easier both from level design perspective, but also in terms of a theme, since TDM has plenty of citysection missions already. Making one that will stand out is not an easy thing :)

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

I've got a secret door that I want to open only if two separate switches are thrown. I've got it working with a single switch, but I can't figure out how to tie it to two switches. I did some searching and found this but I don't think that quite covers what I want. I also thought about using trigger_count but I couldn't figure out how to make those work in this case. Do I need to use a script? Any suggestions would be greatly appreciated.

 

Jeff

Link to comment
Share on other sites

Does it matter which order the switches are triggered? If it does, you could always make one trigger inactive until the other is frobbed.

 

If not, you could use the objective system--create an invisible objective that is triggered when both switches are pulled, and then have that objective trigger the door. That's probably not as robust as a script would be though.

Link to comment
Share on other sites

Does it matter which order the switches are triggered? If it does, you could always make one trigger inactive until the other is frobbed.

 

If not, you could use the objective system--create an invisible objective that is triggered when both switches are pulled, and then have that objective trigger the door. That's probably not as robust as a script would be though.

 

I'd like order to matter. I set up a frob stim/response on the first switch, the response did an Add Target (Entity: second switch, Target: secret door). Maybe not the optimal solution, but it seems to work fine - second switch doesn't open the door until you frob the first one. Thank you!

 

Jeff

Link to comment
Share on other sites

As for the mission, I agree with Obs that limiting your scope for your first one is a good idea. Making one location, a mansion, cathedral, bank, etc. would be more "careful" choice. You could limit yourself even further, and focus on interiors only. It would be easier both from level design perspective, but also in terms of a theme, since TDM has plenty of citysection missions already. Making one that will stand out is not an easy thing :)

 

I appreciate the advice. At the moment I am just working on one interior, and a tiny one at that. There's definitely a lot I need to learn with DR before I make a final decision about where my first FM will take place. I have a number of missions in mind that form a campaign and the first one would serve as the general introduction. That has to be a city map, but it doesn't have to be the first FM I make in the series.

 

As for "standing out" I'm not worried about that. It'll stand out, but whether it's good or bad is gonna depend on the player's personal taste.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Rooz - Have you read this tutorial yet? Should help you plan out your first few exterior scenes. http://wiki.thedarkmod.com/index.php?title=City_Street_Visportal_Tutorial

 

A question, guys: Im getting an error when dmapping a map, it says "unknown token. 'MESH_FACE10000:' while parsing MESH_FACE_LIST". Never got this one before. I am trying to test a bunch of .ase models, they do load fine in DR, but this gives me no clue what is wrong with them and which one(s) it is.

Link to comment
Share on other sites

This error is thrown by the code if the line does not start with (or contain or equals, a bit unsure here) equal "*MESH_FACE". From what you've posted it seems the * at the beginning of MESH_FACE is missing and there is no space between MESH_FACE and the following number. This is probably caused by the formatting of the exporter you've used to create the model.

  • 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

RPGista- yes, I saw that tutorial and planned to work through it before I start blocking out my map. That will be my next focus now that I'm back on my desktop and have two displays.

 

The past two weeks I've mostly beend learning the objective editor and how to add skins and models. At this point my map consists of the starting location and the various readables that reveal the objectives (on close) and then the items you have to collect to complete those objectives.

 

Twould of them are the standard "collect x loot and drop it off in x location" another is "collect x number of items" (which in my mission is restocking your wine supply.) The difficulty levels on those involves gathering more loot and getting more wine. The last objective is a bit more creative. You have to steal a birthday present for a friend so it's a "get item x" but the way I handle it between difficulty levels is reducing the number of items that satisfy the objective. So there's 8 paintings total and when playing on easy you only need to get one of any of then, on medium there's only five that count towards it and only hard you have to get one of only two. I'll put the paintings in locations with various levels of security, so on expert you'll have to break into the new art dealer's gallery instead of finding any old one in a regular house.

 

I'm glad to have all of that figured out because after I build out the map I just have to scatter the items and put in basic AI and paths to have a playable mission, at least in beta form.

  • Like 1
Link to comment
Share on other sites

This error is thrown by the code if the line does not start with (or contain or equals, a bit unsure here) equal "*MESH_FACE". From what you've posted it seems the * at the beginning of MESH_FACE is missing and there is no space between MESH_FACE and the following number. This is probably caused by the formatting of the exporter you've used to create the model.

 

That was exactly it! Thanks, my smart friend. Changing the exporter solved it.

  • Like 1
Link to comment
Share on other sites

I have a basement reachable only through the prefab elevator (E).

 

If I connect the relevant path corners, the AI does no react and remains at its original location.

 

What can I do to make the AI use the elevator to go to the basement?

 

post-37993-0-09563000-1528576456_thumb.jpg

Link to comment
Share on other sites

Hello grayman,

 

Thank you for the prompt response. I have now placed and entity in the floor, but still no effect.

 

The connections betweens the entities is as follows:

 

path corner --> path anim --> button to call elevator (because it could already be in the basement) --> path wait (5 sec) --> path corner - path anim --> button "down" --> path wait (5 sec) --> path corner ---> etc.

 

 

post-37993-0-80821900-1528612588_thumb.jpg

 

The AI stays in front of the button, but does not press the button and remains in this position.

Link to comment
Share on other sites

 

That was exactly it! Thanks, my smart friend. Changing the exporter solved it.

Not as smart as you may think. I searched for the error message in the source code :P

  • 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

In terms of the engine, lets say inside a visleaf, what is better for performance:

 

a ) 10 models x 10K tris each (1 mesh for model) - all single models are scattered around the room;

b ) 4 models x 25K tris each (2,5 meshes per model) - meshes are scattered around the room, but are grouped into 4 models;

c ) 1 model x 100K tris (10 meshes per model) - meshes are scattered around the room, but are grouped into a single model;

 

In all situations, you would have a total of 100k in a scene. Models would share a couple of materials between them. I might use vertex blend, so other materials might be introduced. So far Ive been working with an ambient light and a fog.

 

Are tris culled regardless if parts of the model are being rendered on screen? What about calls, are less models better? Or are smaller models better, even if there are more of them? What about when you are going from one visleaf to the other (also with the same amount of models)?

 

Im putting together some exterior scenes together, and wanna make sure I manage the models and meshes ok. Because of the amount of work and some of the effects being used, I would need models with as many meshes as you can get away with.

 

Either way, unique models will be released as single entities when the work is done.

Edited by RPGista
Link to comment
Share on other sites

If you use multiple tiling textures and materials on one mesh, the engine will break down that into one mesh per material, regardless of how many meshes there will be in the scene. If you want to work towards fewer drawcalls, you need as few models, with as few materials as possible (and as simple materials as possible, ideally just image stages). If these are modular meshes, or repeated ones, like bushes, grass or trees, the number of materials should be 1-2 max. For a hero mesh you could up this to like 4. Complex material stages, multiple materials, number of lights hitting a model – all of this acts as a multiplier, both to drawcalls and tris.

Edited by Judith
Link to comment
Share on other sites

The answer's (kind of) in the question itself. There's no universal "better", you balance manual batching based on visibility. So if the models are usually in view simultaneously, it's nice to tuck them all into a single model to share drawcalls. And vice versa, if you're only seeing a couple of trees at a time through a window, it would be wasteful to render the whole forest at all times. In both examples tris also get culled by portals anyway, but they still cause extra "thinking" the more there are of them.

the engine will break down that into one mesh per material, regardless of how many meshes there will be in the scene

Define "scene". Right now it reads as "map".
Actually, I'm not even sure if meshes (with same material) get batched within a single model. I've been assuming they do, but I haven't tested it myself.

Edited by chedap
Link to comment
Share on other sites

Less models with the same material means less drawcalls, although I would guess that there is a limit of how many tris can be put into one drawcall. Not sure, though, as I haven't looked it up in the code. However, the first step of model culling is to check whether its bounding box is inside the players fov (after it has been culled by visportals). So if you are using more models, its more likely lots of them can be discarded pretty easely. Checking whether the bounding box (its a cuboid) is inside the fov (which is a cone) is a pretty simple arithmetic operation (simple in terms of the amount of operations needed).

 

So as chedap says, there is no better, it highly depends on the scene.

 

And as I am using this term here, too, what I understand as a scene and what Judith probably means, too, is what is provided to the graphics backend for rendering. So more or less the stuff that gets rendered on the screen.

  • 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

Define "scene". Right now it reads as "map".

 

Nope, it always means "what's rendered / seen", not sure where you got "map" from.

 

 

Actually, I'm not even sure if meshes (with same material) get batched within a single model.

 

Not sure about instancing either, but I am sure about using multiple materials or complex shaders, I tested it.

 

As for complex models, the highest tris count I have for a model is 28k, the model works fine :)And it's not like I got a warning or an error, just didn't need more at that time. Actually, I did some tests, it looks like 2.05 crashes at spawning entities, if the model has more than 28k tris. I could swear the limit was higher though...

Edited by Judith
Link to comment
Share on other sites

Hmm. I thought Judith meant 3dsmax scene, i.e. pre-export. By "map" I meant something in-game, as opposed to a "model".

 

So are you both on the same page here: separate func_statics that share materials will share drawcalls? I don't think that's the case, but would be happy to be proven wrong. I assumed each separate instance of a model will make a call of its own (per material stage & light hit). Hence the benefit of grouping several together. If they get batched automatically, there would be a definite right answer to RPGista's question: don't group anything ever.

Link to comment
Share on other sites

Thanks boys. Like I was planning, there shouldnt be too many materials, so I guess I'll have that going for me. The idea is to go for many meshes, and save on the materials. The fog helps with visportals, but I wasnt quite sure to what degree I should have the scenery broken down into separate models. Specially since the fog culling could possibly work better whith individual entitites, but I dont know that for sure.

 

 

Define "scene". Right now it reads as "map".

 

There's that definition of what the renderer can see at a given moment, but usually I refer to scene as what the mapper wants you to see happening inside a limited space. In general this would mean whatever is contained inside a visportaled area, that is readily available to the player to navigate in or look into. For example, I have a map with a big exterior scene that is broken down by invisible visportals, but it is supposed to be a single "scene". The portals are there to help when you are exploring the area, by closing off parts you currently cant see, but from the middle its all a single space. It might also refer to things that are taking place in there, like triggers awaiting the player, AI patrolling, special light setups, etc. These add up to the performance level of that area in particular. This is not a technical term, so sorry for the misunderstanding.

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

Separate func_statics that share materials will share drawcalls?

 

I never said that either. I only meant that even if you have one mesh, but with like 8 materials, that will be still like 8 meshes, even if placed in DR as one model.

 

And of course there's no sense in making one giant model just for the sake of it. But making models with multiple tiling materials isn't a good idea either, since iIdTech4 DC limit is pretty low.

Link to comment
Share on other sites

Oh alright, I read your post the wrong way then. Going to blame you though, you said "one mesh per material", but really meant "one mesh per material per model" - not insignificant in context of batching the models.

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.
      · 1 reply
    • 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...