Jump to content
The Dark Mod Forums

Auto Visportal Script Challenge (SteveL ?)


nbohr1more

Recommended Posts

Objective: Create a crude visportal generator that will help new mappers or even speed-up veteran mappers work.

Not necessarily meant to replace proper visportal craft but to improve fundamental understanding. (It may also

lead to new discoveries if portals are placed in unexpected ways and result in unexpected performance gains?)

 

Per our previous discussion:

 

http://forums.thedarkmod.com/topic/16059-pathtarget-testing-script-for-dr/

 

The general design would be as follows:

 

1) Create an AI path that represents a player walk-through of your map.

2) Have a script follow this path and crudely create visportals where visibility junctions seem natural

 

Bonus points for:

 

Weighing visportals verses draws and batching.

 

Possible assistance: have script parse a dmap for the unoptimized map?

 

Future project:

 

Some sort of AI pattern refinement version that looks for typical mapper portal placements and creates new rules based on these practices.

Maybe a random auto map generator that mappers can place portals into and the algorithm compares the results.

(LOL this is probably way too pie-in-the-sky, if the first challenge isn't...).

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

Morning nbohr1more. When you mentioned this yesterday I thought "impossible". Now you've elaborated it a bit I see it probably isn't impossible... I'm still not sure whether it would be used though. Let's see what use cases people can think of.

 

The only way I can think that it might be implementable would be to trace the path and at each point find the closest wall. Extend a normal plane from that wall and see whether it can seal as a rectangle. At the end, choose the smallest sealing rectangles. There'd be maintenance needed unfortunately. I think the script would need to maintain a list of solid textures unless the python shell can access the engine path variables and the material files.

 

That script would seal doors but would be hopeless at most exteriors. I have absolutely no idea whether your bonus points are possible!

Link to comment
Share on other sites

I think any material without caulk, translucent, alpha, or nodraw keywords and only including worldspawn brushes would cover the requirements.

I presume since DR can see material details in the inspector that it's script interface can parse them?

 

Batching is detailed here:

 

http://www.iddevnet.com/quake4/LevelEditor_Performance

 

As for outdoor areas... I have a secondary idea... auto-generate func_portals at user defined cutoffs (draw calls over x, distance larger than x, etc)

then mappers can either paint flat textures on the func_portal patch or a cubemap. And while I'm going-off in la la land, if the script auto-placed

a dummy info_playerstart entity where the envshot would be taken for said cubemaps... well now we're really cooking. :)

 

Again, I think it would be helpful to have even a very crude implementation. It could act as a sanity check for complex geometry issues and as a tutorial

for new mappers.

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

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

    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 0 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • 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 )
      · 3 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
       
      · 7 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
×
×
  • Create New...