Jump to content
The Dark Mod Forums

My first map – questions & work in progress


peter_spy

Recommended Posts

Afaik is one drawcall per material it doesn't matter if that material uses more than one texture, but i'm not certain right now.

 

Judith don't know if you are saying you want to use 2048 textures but if so, i would not recommend, they take to much GPU memory and are heavier to render, specially for GPU's with 1 GB of RAM, if you want to get detail near a wall, then imo use materials with a detail texture stage, also imo 1024 is more than sufficient to most cases and in others a 32x128 (or even less) texture is sufficient, for example trims, railings, etc, using a 2048 texture in a rail for example is a total overkill, how many pixels does that take on screen? Almost none, but it's texture will occupy a large section of GPU memory.

 

No, 2048 textures are for initial "nice to have" version and beauty shots (aka bullshots or Ubishots ;) ). They will probably get scaled down in optimisation stage, although I'm aiming for hardware like 2 GB video card laptops. I think these are pretty common these days, but might need to confirm that. Also, I said I'm keeping in mind texel ratio / pixel density, so stuff like trims will have textures scaled accordingly to maintain pixel density across all surfaces and objects. The ratio I use is 1:8 or 0.125 (which is 0.5 in DR's surface inspector, because editor's default scale of 1 is actually 0.25 ratio, as demonstrated earlier). That means a wall that is 256 x 256 will have a texture of 2048. Everything else will be scaled accordingly. A trim surface of 256 W x 16 H will need a 2048 x 128 texture, although it's better to have several trims on one square texture to save on texture count and to use video memory in more efficient manner. Not sure I'll need 16 different trims, but who knows ;)

 

(Edit: page break, grammar, and typos)

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

Testing basic cubemap reflections, it seems like there are two types of those: cubemap and cameracubemap. The latter seems to look better, because it hid the seams between textures? Not sure yet, but both seem to be using images differently (i.e. you can see there's certain offset or maybe it's mirrored?). One thing awfully confusing is that the first one uses _px, _py, _pz suffixes, while the other one uses _front, _back, etc. This should be unified, preferably to _px, _py, _pz, etc., because it's shorter and looks more organised in folders.

 

image.jpg

image.jpg

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

Alright, now I see it, the image on modwiki is so small on 1440p screen I couldn't make anything out of it. So the cubemap is for a flat image reflection that has to be split between 6 surfaces, like an image for a window or fake mirror. Cameracubemap is for proper 6 sides of a cubemap and it should work better with 3d objects.

Link to comment
Share on other sites

The different naming conventions are based on the usage case.

The _px, etc convention is for native OpenGL orientation whereas the _front, etc convention

is an easier to use setup that Doom 3 used for post transform.

 

You can create both kinds in-game:

 

envshot == Doom 3 native

envshotGL == OpenGL native

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

It should be in your cubemap stage:

 

Example from one of our glass materials:

 

 

 
{
        blend gl_dst_alpha, gl_one
        maskalpha
        cubeMap env/gen2
        // tone down the reflection a bit
        red     Parm0 * .2
        green   Parm1 * .2
        blue    Parm2 * .2
        texgen  reflect
    }
 

 

The parm values aren't really needed as I can tell. I think that's there to make the material more

amenable to script events.

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 tried playing with those values in the past and couldn't confirm that they actually do anything. I had to manually adjust the texture files.

  • Like 1
Link to comment
Share on other sites

It's still fully opaque. I think Springheel's right. Surprisingly, it works with texgen skybox, but the effect is ugly. Look:

 

Default setup with _d, _s, _n:

image.jpg

 

Texgen skybox, it ignores normal and specular (well, it was for skyboxes)

image.jpg

 

 

Texgen reflect, uses all previous stages but does not react to rgb value changes.

image.jpg

  • Like 1
Link to comment
Share on other sites

I already posted the code snippet you need to use to get cubemaps looking good earlier in the thread. You have a mask stage with a greyscale image through which you can tweak the intensity of the cubemap, I've even gotten to tint it in my tests. gl_dst_color's logic is that where there's higher luminance, more of the cubemap will show up. This will make the cubemap invisible in dark areas (which is pretty realistic) but it will also overbright light hotspots even more. Certainly you can still use that blending mode but heed its drawbacks.

  • Like 1

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

It should be in your cubemap stage:

 

Example from one of our glass materials:

 
{
        blend gl_dst_alpha, gl_one
        maskalpha
        cubeMap env/gen2
        // tone down the reflection a bit
        red     Parm0 * .2
        green   Parm1 * .2
        blue    Parm2 * .2
        texgen  reflect
    }
 

The parm values aren't really needed as I can tell. I think that's there to make the material more

amenable to script events.

The parm variables are set by the values specified in the _color spawnarg on the entity you use the material on. They default to zero. So Parm0...2 is rgb. You can use them to color the reflection.

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're right, I forgot about this one. I'm not at my full abilities, having a cold for over a week now, which makes me kind of restless.

	{
		maskcolor
		map makealpha (textures/do/base/wall02_s) //here I use the specular of the texture
		alpha 1		//this darkens the alpha by half, modify it as you wish
	}
	{
		blend gl_dst_alpha, gl_one
		maskalpha
		cameraCubeMap	textures/do/env/test
		texgen		reflect
	}

Anyway, this seems to be a "default minimum". Alpha is working, and sure, if you leave it at 1, it looks like this, but alpha tweaking seems flexible enough for what I need.

 

image.jpg

 

Also CameraCubeMap seems like the way to go for objects, as it automatically mirrors cubemap faces.

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

OK, CameraCubeMap is also a winner because it requires only two transformations, Up has to be rotated left, Down – right, and the rest is unchanged. As with TDS, brushes don't use the coordinate system well, so looking at them at different angles changes how cubemap sides are displayed, but that shouldn't be a problem with regular static meshes.

Link to comment
Share on other sites

These are not bricks – it's tiles. Normals are automatic njob work, so I'll redo at least some of them later. The wall will have its proper paint as well. This is all with bloom on to take it into account, so it's kind of a bit brighter. I'm not sure I'll leave it like that, but going under 96 or 64 with texture levels seems to be too subtle in many cases.

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

  • 4 weeks later...

It's fine, keeping in mind we have an order of Builders that might fairly use such a symbology that, in the end, has a different history and backstory than Hammerites so is a different group in a different universe. Just think if Builders could actually use this design. I think so.

  • Like 1

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

  • 3 weeks later...

I just had a few hours this month for editing, so I probably won't be able to solve this right away, but is it just me or IDTech4 doesn't like using overlapping UVs? The lightning looks pretty weird and the material looks metallic, even with proper specular. I'm guessing that's what's causing problems and those IES-like lights. After I fix this, I'm planning to write quick guide on how to design a basic flexible tileset for this wall panel. This is one texture and one mesh by the way, just split in sections and variants, to cover as many uses as possible. All with properly placed pivots, so you can place it in seconds. This was made with grid of 16.

 

do_2017-04-14_23.20.48.jpg

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

I'm out of my element on this one but just FYI TDM's lighting system has a default specular value that adds a little fresnel reflection even if the material is only lit by an ambient light. That is why your material might look metalic.

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

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

    • 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
       
      · 2 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
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...