Jump to content
The Dark Mod Forums

Sotha's mapping thread


Sotha

Recommended Posts

In addition to the previous problem, I'd also like to know can I change AI carried items properties.

 

I have a guard carrying a lantern, but the shadow cast by the guard didn't look realistic, so I put the guard to noshadows 1. The guard looks now fine, but the guard's SWORD is still casting shadows. Can I somehow set that to no shadows as well?

 

You probably need a new entity def for the sword. As it is spawned at run time there's no way to tel it to not cast shadows. But you can attach a different sword entity that has no shadows standard.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I see the problem. Since the cubemap is designed to always face the (edit: viewer position) camera, each envshot camera is seeing the same portion of the skybox.

 

Unless I'm somehow mistaken, you will need to capture your geometry without the skybox and then blend the images in an image editor???

 

Edit:

 

Another method might be to noclip and precisely take screen-shots from each direction...

 

Ah, that explains it. Thanks a lot! It's impossible to take precise screenies and get them to align, but what I *can* try is the take as good screenies as possible and clone brush the buildings to the original well tiling cubemap.

 

But before taking that action I must see the performace gain: is it really worth it.

 

 

You probably need a new entity def for the sword. As it is spawned at run time there's no way to tel it to not cast shadows. But you can attach a different sword entity that has no shadows standard.

 

Okay, thanks. Gotta learn finally the .def files, I suppose. ;)

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

But before taking that action I must see the performace gain: is it really worth it.

 

Holy crêpes! I disabled the poly skybox and the change was 35fps -> stable 60 fps.

 

Assistant! Bring forth the clone brush!

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Good luck Sotha, that's a pretty hefty optimization. :) !

 

Darn. Couldn't get that skybox correctly. It is impossible to do by hand. Even if the cubemap matches with all it's neighbours, it still looks horrible.

 

Choosing a different approach, I checked the cityscape with r_showtris 4. It looked like a white mass in a cityscape shape.

 

When I created the thing I had simply done a few toy buildings which I rotated and placed them in the skybox. And multiplied them to make it look like a city. Bad move. What was I thinking! There were zillions of polies, which the player would never see, windows on the blind side of the buildings etc.

 

Removed those, removed buildings not visible to the skycamera. I also removed a forest made out of shrunk tree models (170 polies each.) Need to do a decal version of that forest.

Removed my moonlight-light which made no visual impact because of the ambient_world does it's job.

 

In the end I got improvement from 35fps to 50fps. And this is measured in the lowest possible performance area, otherwise it runs stable 60fps on my computer. And this is with 80% of the planned amount of AI's wandering around the map. Success!

 

Moral of the story: do not put in visuals the player will never see. If you look carefully, you'll discover many things optimize gaining performance without degrading visuals.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I've tried to replace the poly-forest with a decal forest. I'm running into trouble again.

 

I've created a texture like this using a screenshot of the TDM trees:

6734026.png

 

And now I'm trying to get it ingame. The transparency does not work. The material definitions I've tried so far are:

textures/darkmod/knightons_manor/forest_light

{

qer_editorimage textures/knightons_manor/forest_light_ed. tga // custom DOOMEdit material preview image

 

diffusemap textures/knightons_manor/forest_light_d.tga // color and value information for the material

}

 

textures/darkmod/knightons_manor/forest_light

{

surftype15

description "foliage"

 

qer_editorimage textures/knightons_manor/forest_light_ed. tga

diffusemap textures/knightons_manor/forest_light_d.tga

 

{

if ( parm11 > 0 )

blend gl_dst_color, gl_one

map _white

rgb 0.40 * parm11

}

{

if ( parm11 > 0 )

blend add

map textures/knightons_manor/forest_light_d.tga

rgb 0.15 * parm11

}

 

// TDM Ambient Method Related

{

blend add

map textures/knightons_manor/forest_light_d.tga

red global2

green global3

blue global4

}

}

 

The second one I took from the tdm_decals_vegetation.mtr. It is from textures/darkmod/decals/vegetation/hanging_horizontal_leaves. I basically don't know what it is doing, but it's used for decal vegetation so I thought it might just work.

 

I cannot get this to work. The area which should be transparent looks always black. Probably is due to some magic material definition, which I am not aware of.

 

So.. what is it?

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Are you saving it in a DDS format that supports alpha? Also are you need to use an alpha channel (basically you paint the transparent parts black and the solid ones white [could be the other way around]) otherwise it won't work.

 

Also, yes there is some material definition missing. You can download one of my models and take a look at the material def for either the streetlamp or the privacy screen frame.

Edited by Nosslak
Link to comment
Share on other sites

Are you saving it in a DDS format that supports alpha?

 

Nope. I'm working with .tga files. And they should have this transparent areas, as seen in the image above.

 

Also are you need to use an alpha channel (basically you paint the transparent parts black and the solid ones white [could be the other way around]) otherwise it won't work.

 

I did not understand this part.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

So.. what is it?

 

You need to use "alphatest 0.5", have a look at other materials with transparent parts like the gras_dense.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I was just about to lose hope and quit trying, but these last suggestions helped.

Got it finally to work.

 

For those who are also wondering how to make it:

 

The material file is like this:

textures/darkmod/knightons_manor/forest_light

{

surftype15

description "forest_decal"

 

qer_editorimage textures/knightons_manor/forest_light_ed. tga

 

{

maskcolor

map makealpha(textures/knightons_manor/forest_light_alfa. tga)

alphatest 0.5

}

 

diffusemap textures/knightons_manor/forest_light_d.tga

 

}

 

  • textures/knightons_manor/forest_light_d. tga is the normal diffusemap texture
  • textures/knightons_manor/forest_light_alfa. tga is the alphamask-thingy. Basically it is a black&white image with black background and white silhouette of the trees I want to be visible. Black is transparent. White is opaque.

 

Thanks for help!

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I was just about to lose hope and quit trying, but these last suggestions helped.

Got it finally to work.

 

For those who are also wondering how to make it:

 

The material file is like this:

 

 

  • textures/knightons_manor/forest_light_d. tga is the normal diffusemap texture
  • textures/knightons_manor/forest_light_alfa. tga is the alphamask-thingy. Basically it is a black&white image with black background and white silhouette of the trees I want to be visible. Black is transparent. White is opaque.

 

Thanks for help!

 

It would be cool if you could make a few of these textures, so we can stack them (to create more dense forests and also low-grass racks etc.) and then donate them to TDM; we will gladly add them for 1.03 :) (shameless begging for help as I could use such silouettes, too) :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

It would be cool if you could make a few of these textures, so we can stack them (to create more dense forests and also low-grass racks etc.) and then donate them to TDM; we will gladly add them for 1.03 :) (shameless begging for help as I could use such silouettes, too) :)

 

The texture is basically a collection of 5 trees. Aligning the texture on a decal patch you can get 5 different trees from one texture. Then you can clone the patches to get individual trees here and there. Like here:

 

6734653.png

 

Or you can create a forest simply by multiplying the patches:

6734654.png

 

The benefit of individual patch=one tree is that you get the perspective effect, when the more distant trees are smaller. I don't think there is a huge performance impact, since one tree is 2 polies (right?). A forest of 100 trees costs 200 polies, which is less than one typical model.

 

All the buildings in the scene are real models. I had the idea of creating textures with images of the buildings from different angles and then substitute the model buildings with patches. The performance improvement would be quite nice.

 

But yeah, my map is mostly finished and I'm waiting for 1.03 assets. In the meantime I could easily look to create textures for the building patches. I think many things can be accomplished already with this simple texture of 5 trees so I'm focusing on the buildings rather than on the trees.

 

As always, I'm really pleased if someone else can benefit from my hard work as well. Naturally, all textures, models etc I create are free for TDM to use.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

The texture is basically a collection of 5 trees. Aligning the texture on a decal patch you can get 5 different trees from one texture. Then you can clone the patches to get individual trees here and there. Like here:

 

6734653.png

 

Or you can create a forest simply by multiplying the patches:

6734654.png

 

The benefit of individual patch=one tree is that you get the perspective effect, when the more distant trees are smaller. I don't think there is a huge performance impact, since one tree is 2 polies (right?). A forest of 100 trees costs 200 polies, which is less than one typical model.

 

But it will also be 200 drawcalls, compared to 1 drawcall for one model. In TD v1.02, this makes a huge performance impact (es. on older cards) as each drawcall has a certain (CPU I believe) overhead.

 

In TDM v1.03, you could use the model generator to combine these decals into one.

 

I am not sure if the engine doesn't combine decals into one drawcall, anyway, Would be interesting to test this, use "r_showPrimitives" "1" on the console to monitor the number of drawcalls.

 

But yeah, my map is mostly finished and I'm waiting for 1.03 assets. In the meantime I could easily look to create textures for the building patches. I think many things can be accomplished already with this simple texture of 5 trees so I'm focusing on the buildings rather than on the trees.

 

As always, I'm really pleased if someone else can benefit from my hard work as well. Naturally, all textures, models etc I create are free for TDM to use.

 

Very cool :) Do you have SVN access so you can add them to TDM right-away? That would be easier for us (we are always strapped for man-power). I'd say please PM sparhawk so he can give you SVN access and we make you a contributor.

 

Btw what specific things from v1.03 do you need?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

But it will also be 200 drawcalls, compared to 1 drawcall for one model. In TD v1.02, this makes a huge performance impact (es. on older cards) as each drawcall has a certain (CPU I believe) overhead.

 

In TDM v1.03, you could use the model generator to combine these decals into one.

 

I am not sure if the engine doesn't combine decals into one drawcall, anyway, Would be interesting to test this, use "r_showPrimitives" "1" on the console to monitor the number of drawcalls.

 

My map now has 2 skyboxes and I can switch between them. The first skybox is the old 3d skybox. Meaning that the buildings are models. The second skybox is 2d, meaning that everything therein is 2d patches.

 

3d skybox:

Worst possible fps: 45. (observed at certain map bottleneck area, not in the area seen in the screenie)

Showprimitives: views 5, draws 870, tris 39000, shdw 2280, image 60mb. (showprimitives is for the area seen in the screenie)

Screenie:

6735801.png

 

 

2d skybox:

Worst possible fps: 55. (same area as above)

Showprimitives: views 5, draws 150, tris 20000, shdw 2900, image 46mb. (showprimitives is for the area seen in the screenie)

Screenie:

6735800.png

 

2d skybox does not look as good as 3d, but the performance improvement is quite tangible. Maybe I'll stick with the 2d and improve it by better patch placement. I don't think it is difficult to reach similar visual quality as in the 3d skybox. And low-enders will love me for additional fps. :laugh:

 

 

Very cool smile.gif Do you have SVN access so you can add them to TDM right-away? That would be easier for us (we are always strapped for man-power). I'd say please PM sparhawk so he can give you SVN access and we make you a contributor.

 

Btw what specific things from v1.03 do you need?

 

I probably have no longer the SVN access, I'm afraid.

 

Of course, I could stick the stuff I have in a .zip file at mediafire or something. The nomenclature would probably have to be changed to fit the official TDM stuff.

 

I can contribute the tree and building textures right away. For more more complex assets (models, skyboxes) my modus operandi is as follows:

  • I want them to be unique for the mission I've created them for. So they appear for the first time in my mission.
  • After the mission is published models, skyboxes, everything is free to be added to TDM assets.

Oh, and I'm eagerly waiting for the female characters. I'd love to have them for my map. But once v1.03 comes out, I only swap placeholder AI's into females and press the big button labeled 'publish.'

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

My map now has 2 skyboxes and I can switch between them. The first skybox is the old 3d skybox. Meaning that the buildings are models. The second skybox is 2d, meaning that everything therein is 2d patches.

 

3d skybox:

Worst possible fps: 45. (observed at certain map bottleneck area, not in the area seen in the screenie)

Showprimitives: views 5, draws 870, tris 39000, shdw 2280, image 60mb. (showprimitives is for the area seen in the screenie)

Screenie:

 

 

 

2d skybox:

Worst possible fps: 55. (same area as above)

Showprimitives: views 5, draws 150, tris 20000, shdw 2900, image 46mb. (showprimitives is for the area seen in the screenie)

Screenie:

 

2d skybox does not look as good as 3d, but the performance improvement is quite tangible. Maybe I'll stick with the 2d and improve it by better patch placement. I don't think it is difficult to reach similar visual quality as in the 3d skybox. And low-enders will love me for additional fps. :laugh:

 

Yeah, the reduction in drawcalls is very telling. D3 had a rule that you should not have more than 300..400 drawcalls. On modern systems, you can easily have 1000 and it doesn't slow down, but reducing the drawcalls by same visual quality is always a good idea. Also, if the empty skybox has 870 alone, you don't want to have it in a real mission because even the middle enders will hate you :)

 

I probably have no longer the SVN access, I'm afraid.

 

Of course, I could stick the stuff I have in a .zip file at mediafire or something. The nomenclature would probably have to be changed to fit the official TDM stuff.

 

We can do this, but it would be much easier for us if you put the stuff into SVN as we are strapped for manpower..-

Fair enough about the other stuff.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Spent just roughly 30mins in the wardrobe.

1/6 of the custom vocals needed for my FM is now recorded. That means one line. I recorded it about 12 times.

 

The end result sounded decent, probably because it does not sound like me. I'll probably hear complaints about poor voice acting, but hey I'm no pro at this. It'll be ugly, but it will be mine. :blush:

I'm starting to develop an entirely new appreciation for real voice actors. :wub:

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Sotha, please combine all your skybox brushes into one .ase model (select all and make them worldspawn first.)

 

Then replace the brushes with your object. I'm curious to see the result. 1 drawcall? or 1 per material? Either way it should help both cases. Also test it with the decals version please.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Sotha, please combine all your skybox brushes into one .ase model (select all and make them worldspawn first.)

 

Then replace the brushes with your object. I'm curious to see the result. 1 drawcall? or 1 per material? Either way it should help both cases. Also test it with the decals version please.

 

Okay. I used killmonsters make sure AI will not interfere. For the scene seen here:

6749825.png

 

The ASE version and decal version give exactly the same result:

views 5, draws 155, tris 22800, shdw 3310, image 44.8MB

 

Note 1: The decal version is worldspawn, not func_static.

Note 2: This is not comparable with the 3d skybox seen earlier since there I didn't kill monsters. Plus there are additions and improvements.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Is the ase version made of the decals version or the 3d version?

 

decal version = separate decals in the scene

ase version = the above made into one ase. Decals removed, only ase model present.

 

3d version has nothing to do with this.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

decal version = separate decals in the scene

ase version = the above made into one ase. Decals removed, only ase model present.

 

3d version has nothing to do with this.

 

I am not entirely sure, but it can be that D3 combines decals into one model (I now the engine does something similiar for all particles/smoke etc. so it can be it does so already for decals, too).

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Try making the 3d skybox into a model if you don't mind. I'm curious if that'll cut the drawcalls down alot from the 800 it was.

 

(instead of a bunch of func_statics or brushes it should be one call for the object - but probably multiple calls - one per material) Still, I think it could drop the draw calls on that alot.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Try making the 3d skybox into a model if you don't mind. I'm curious if that'll cut the drawcalls down alot from the 800 it was.

 

(instead of a bunch of func_statics or brushes it should be one call for the object - but probably multiple calls - one per material) Still, I think it could drop the draw calls on that alot.

 

Okay. I'll summarize my tests.

I've got now 4 skyboxes:

  • Skybox1 is separate decals
  • Skybox2 is the same decals made into one ase
  • Skybox3 is separate 3d building models
  • Skybox4 is the same 3d buildings made into one ase.

  • Decal ase is 1000 polys, 5 materials
  • Model ase is 8600 polys, 27 materials

Skybox1 and skybox2 show the same results for r_showprimitives.

views 5, draws 161, tris 25000, shdw 3020, image 44.8mb.

 

Skybox 3 gives:

views 5, draws 860, tris 39200, shdw 3200, image 60mb

 

Skybox 4 gives:

views 5, draws 226, tris 39800, shdw 3720, image 60mb

 

Conclusion is that ase model conversion

  • has no effect on the decal skybox
  • reduces draws for model skybox

I hope this is useful.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

It does actually thanks alot.

 

The decal>model doesn't suprise me too much. It probably takes house_01.decal (whatever) and combines it into one draw for all house_01.decals.

And both are gonna have the same tri count as nothing will be removed during compile. wysissisiamnlwahtever

 

The skybox to model thing does show alot of improvement though. 800 draws to 226 is pretty massive for a quick little in editor change.

Looks like the tris and shadow went up though (probably still better).

 

I'm curious, did you caulk or no draw unseen faces?

Those extra faces are probably from just not being culled (or caulked), so if done 'right' the count should not go up.

 

Still it shows how much more efficient objects can be in that regard.

 

Obviously the low poly version is probably best at a distance (Though you have to render and make decal). Probably the best option if an author wants the extra boost and can handle making the decals.

 

The 3d > model is probably best for quick in editor, no extra fuss required.

 

-----

I think I'm going to make a tut on modelling in DR and will probably reference this to give people ideas for usefulness.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I'm curious, did you caulk or no draw unseen faces?

Those extra faces are probably from just not being culled (or caulked), so if done 'right' the count should not go up.

 

Nope. I didn't caulk anything. I just happily made toy model buildings and tossed them around to make the scene. :wacko: When I realized that the skybox was so heavy, I removed all the windows in the blind sides, but that only squeezed me a few more fps. The decal one means stable 60fps at all times.

 

Obviously the low poly version is probably best at a distance (Though you have to render and make decal). Probably the best option if an author wants the extra boost and can handle making the decals.

 

Actually the decal making was not a big trouble. All it took was placing the toy houses in a row in DR, load TDM up, take a screenie and do 10mins of image manipulation. It was quick to make the decal once I knew how to do the material file for it.

Now when I tested it with 3d and decal skyboxes, I seem to like the decal one more. And using the decal one leaves me with "free" 7600 polys more to use in map geometry when compared to the 3d skybox! :wub:

Also there is no benefit of using 3d objects since the skybox objects do not move with the player to fake that they're real.

 

This decal scene creation technique would have been great during the vertical contest since it's a cheap way to create decently believable surroundings. The biggest problem with believabilty is the lack of perspective moving of objects. (nearby objects should move when the player moves)

 

It does actually thanks alot.

I think I'm going to make a tut on modelling in DR and will probably reference this to give people ideas for usefulness.

 

You welcome. Nice to be of help.

Clipper

-The mapper's best friend.

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

    • The Black Arrow

      Happy birthday to me!
      Yes, today's my birthday and as much as I want to play The Dark Mod, I won't until it's late Autumn, where it should be a bit chilly in my place and there's some wind too.
      For now, it's time to enjoy my birthday, if any of you want to play a great fan mission in my honour...Well that's asking too much, just play the mission because it's fun, not because of me, enjoy it yourself! 💪
      · 4 replies
    • nbohr1more

      New texture wiki article created: https://wiki.thedarkmod.com/index.php?title=Creating_textures_from_Ornate_Photos
      · 2 replies
    • Xolvix

      Took a break from TDM until I got my backlog under control. It's been months and it's still not "under control". Damnit.
      · 4 replies
    • Ansome

      I sleep well at night knowing the player will never see the absolute nightmare that is my sealing brushwork outside the playable area. Only the pointfile can judge me now.
      · 4 replies
    • JackFarmer

      Somehow I admire the fact that the material from Dune has now been filmed for the third time. Personally, I could never do much with the material, but as a child of the 80s, I of course know the David Lynch movie...and that movie was at least funny!
      · 2 replies
×
×
  • Create New...