Jump to content


Photo

Newbie DarkRadiant Questions


8226 replies to this topic

#8176 Rooz

Rooz

    Member

  • Member
  • PipPip
  • 22 posts

Posted 20 May 2018 - 04:40 PM

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.
  • Springheel likes this

#8177 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1270 posts

Posted 21 May 2018 - 01:08 AM

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, 21 May 2018 - 01:18 AM.

  • Obsttorte likes this

#8178 joebarnin

joebarnin

    Member

  • Member
  • PipPip
  • 204 posts

Posted 22 May 2018 - 10:55 AM

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



#8179 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37123 posts

Posted 22 May 2018 - 11:42 AM

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.



#8180 joebarnin

joebarnin

    Member

  • Member
  • PipPip
  • 204 posts

Posted 22 May 2018 - 02:27 PM

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



#8181 Rooz

Rooz

    Member

  • Member
  • PipPip
  • 22 posts

Posted 23 May 2018 - 12:30 AM

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.


  • Judith likes this

#8182 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 08 June 2018 - 05:10 PM

Rooz - Have you read this tutorial yet? Should help you plan out your first few exterior scenes. http://wiki.thedarkm...portal_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. 



#8183 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5571 posts

Posted 09 June 2018 - 03:19 AM

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.


  • RPGista likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8184 Rooz

Rooz

    Member

  • Member
  • PipPip
  • 22 posts

Posted 09 June 2018 - 11:44 AM

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.
  • RPGista likes this

#8185 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 09 June 2018 - 12:31 PM

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. 


  • Obsttorte likes this

#8186 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 62 posts

Posted 09 June 2018 - 03:34 PM

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?

 

Elevator_Action.jpg



#8187 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12496 posts

Posted 09 June 2018 - 03:44 PM

Place an AI->AAS_flood->aas32_flood entity on the basement floor.



#8188 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 62 posts

Posted 10 June 2018 - 01:37 AM

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.

 

 

Elevator_arrangement.jpg

 

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



#8189 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12496 posts

Posted 10 June 2018 - 05:18 AM

Connect your upper path_corner to your lower path_corner and delete everything else.

The code automatically takes care of the stuff youre deleting

#8190 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5571 posts

Posted 10 June 2018 - 06:33 AM

 

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


  • RPGista likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8191 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 11 June 2018 - 11:53 AM

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, 11 June 2018 - 11:58 AM.


#8192 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1270 posts

Posted 11 June 2018 - 12:20 PM

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, 12 June 2018 - 01:48 AM.


#8193 chedap

chedap

    Member

  • Member
  • PipPip
  • 84 posts

Posted 11 June 2018 - 01:58 PM

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, 11 June 2018 - 04:08 PM.


#8194 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5571 posts

Posted 11 June 2018 - 02:04 PM

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.


  • Judith likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8195 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1270 posts

Posted 11 June 2018 - 02:10 PM

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, 11 June 2018 - 03:20 PM.


#8196 chedap

chedap

    Member

  • Member
  • PipPip
  • 84 posts

Posted 11 June 2018 - 03:26 PM

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.



#8197 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1509 posts

Posted 11 June 2018 - 03:40 PM

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, 11 June 2018 - 03:52 PM.

  • Judith likes this

#8198 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1270 posts

Posted 11 June 2018 - 03:44 PM

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.



#8199 chedap

chedap

    Member

  • Member
  • PipPip
  • 84 posts

Posted 11 June 2018 - 04:04 PM

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.



#8200 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1270 posts

Posted 11 June 2018 - 04:21 PM

Mesh, short for static mesh (nomenclature for Unreal and elsewhere) = model (DR nomenclature), is it something that unusual?


Edited by Judith, 11 June 2018 - 04:22 PM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users