Jump to content
The Dark Mod Forums

My first map – questions & work in progress


peter_spy

Recommended Posts

I really don't get the syntax of those image programs, this should work, but doesn't

 

{
blend bumpmap
map addnormals(textures/tut/base/wall01_n, scale(textures/tut/base/wall01_dt, 0.5) )
}

 

Edit: nvm, this is just a minor thing, I was just curious whether this works.

Edited by Judith
Link to comment
Share on other sites

Well, that won't work for me, since I'll be making most of the models myself in 3dsmax, and most of them will be UV'd. Same goes for textures. But, I basically checked for everything I need, I only have to take a closer look at glowing stuff, because in my first tests there wasn't enough glow ;) (there was no bloom effect or anything)

Link to comment
Share on other sites

OK, to be clear there are two scale keywords. One is to change the size and requires X and Y sizing:

 
    {
      blend bumpmap
      map   addnormals(textures/tut/base/wall01_n, textures/tut/base/wall01_dt )
      scale 2, 2   // tile 2x (shrink)

    }

To enlarge, make fractional scale. Eg: scale 0.5, 0.5 doubles the stretch.

 

https://modwiki.xnet.fi/Scale_(Material_stage_keyword)

 

 

The other is an "image program" and requires all 4 parameters. Red Green Blue Alpha.

 
    {
      blend bumpmap
      map   addnormals(textures/tut/base/wall01_n, scale(textures/tut/base/wall01_dt 1, 1, 0.5, 1) )
      // reduce blue channel by 50 percent in the 2nd normal map
    }
  • Like 1

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

Yup, I tried the keyword yesterday, but it applies to both normals, not just the second one. Image program allows me to blend normalmaps only. Anything I add makes textures go black and I get messages like this in the console:

 

Clipboard02.jpg

 

Then again, it's no biggie if it doesn't work, I got everything else down, and that's all I need. Besides, slapping detail normals everywhere might hurt the performance.

Edited by Judith
Link to comment
Share on other sites

Ah, my mistake then!

 

You need a comma after the material path too!

 

 

 
{
      blend bumpmap
      map   addnormals(textures/tut/base/wall01_n, scale(textures/tut/base/wall01_dt, 1, 1, 0.5, 1) )
      // reduce blue channel by 50 percent in the 2nd normal map
 }
 

 

I should've looked at my own wiki article. :blush: :D

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

Alright, we're going somewhere, both normals show up, but there's no scaling going on. Where should I actually put the scale values, if everything is taken up by the RBGA values in that expression?

 

Edit: I just thought of another solution, since detail normals would be separate special-purpose textures, I can make them without the blue channel anyway. This way a shader operation in material file will no longer be necessary.

Edited by Judith
Link to comment
Share on other sites

If I understand your request correctly, you want to resize one normalmap and then merge it with another?

 

As I understand it, even just listing multiple stages will allow you to combine normals so you could do this:

 
{
      blend bumpmap
      textures/tut/base/wall01_n
      rgb 0.5 // 50 percent weight
  
}
 
{
 
   blend bumpmap
   scale(textures/tut/base/wall01_dt, 1, 1, 0.5, 1) // reduce blue
   scale 2, 2 // shrink texture scale x2
   rgb 0.5 // 50 percent weight
 
}
 

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

If I understand your request correctly, you want to resize one normalmap and then merge it with another?

 

Yes, that's a trick from Gears or UT3 era, you multiply tiling detail normal with RGB 1,1,0 to lose the blue channel and add it on the top of the base normal to make another "layer of details" appear when player gets closer

 

And your example is still wrong, not only because the scale image program is still there along with the global keyword, but even if you correct that and split blending normals into two stages, only the last one is taken into account. Use your own textures with this example if you like to see what happens:

	{
		blend bumpmap
		map	textures/tut/base/wall01_n
		rgb 0.9  
	}
 
	{
		blend bumpmap
		map textures/tut/base/wall01_dt
		scale 8, 8
		rgb 0.1
	}
Edited by Judith
Link to comment
Share on other sites

Yes, now I remember my experiments and Rich's example better. Each normal is tied to it's own set of diffuse an specular.

To make a second normal map show, it must be paired to a second diffuse and the weight must be done on the diffuse:

 

 

 
{
        blend bumpmap
        map    textures/tut/base/wall01_n
        


}

{

             blend diffusemap
             map textures/tut/base/wall01_d
             rgb 0.9

}

{             
             blend specularmap   
             map textures/tut/base/wall01_s
             rgb 0.9

}
    

{
     blend bumpmap
     map textures/tut/base/wall01_dt
         scale 8, 8
        

}

{

             blend diffusemap
             map textures/tut/base/wall01_d
             rgb 0.1

}

{             
             blend specularmap   
             map textures/tut/base/wall01_s
             rgb 0.1

}
 
  • Like 2

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

Glad to see it working better now (*now that I've cleaned the dust outta my mind).

 

You still should be able to use scale(textures/tut/base/wall01_dt, 1, 0.5, 1, 1) on the 2nd bump stage to reduce the blue or any other

color in the normal (or all of them) so you have two control points I believe. As per my fiddling with image maps to invert you can probably

just reduce all colors to lessen the intensity of the normals to... eg scale(textures/tut/base/wall01_dt, 0.5, 0.5, 0.5, 1). Hard to say which is

the best approach.

  • Like 1

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

Isn't Fresnel an algorithm used for specularity. I think those term appears in the interaction shader.

 

In regardence to the effect in the linked article, if you want to express the rims a bit more then I guess this is more a shader thingy then a material thing, which is probably good, as any change will affect all materials.

 

Edit: Regarding the math that gets used in the article it will probably something like this:

 

fresnel_intensity = (1-v*n)^fresnel_exp

 

whereas v is the view to surface vector (normalized)

n is the surface normal

fresnel_exp as noted in the article

* denotes the dot product

and ^ the power

  • 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

Taking a look at the enhanced interaction shader it seems that what gets described in the article is already part of the shader program. The exponential used is 4.

 

EDIT: The program is test_direct.vfp in the glprogs folder.

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

I've found this article on ModWiki, will try that shader program at some point. As you know, fresnel is used mostly to give rim light effect to key objects and characters to make them stand out a bit from the environment. It's also used as frob / interaction shader, which is a bit better than just a "frob highlight" in well-lit environments. I was thinking about using it for a few important objects, but a subtle emissive / glow map should do as well.

 

Edit: IMO TDM's interaction shader doesn't look like it has a fresnel program in place, for both default and enhanced version:

 

volta1_1_2017_02_13_12_22_11.jpg volta1_1_2017_02_13_12_22_29.jpg

Edited by Judith
Link to comment
Share on other sites

That's the fresnel.vfp rich mentioned. It is shipped with the mod.

 

Using rim hilighting for frob hilighting is an interesting idea.

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

That's the fresnel.vfp rich mentioned. It is shipped with the mod.

 

Using rim hilighting for frob hilighting is an interesting idea.

 

It's pretty much a standard way of implementing interaction highlight in games now. The only problem I have with it is that often it's very heavy-handed (case in point: Bioshock).

Link to comment
Share on other sites

I found a lone example.

textures/water_source/water_reflective

{





    qer_editorimage textures/glass/glass1

    translucent

    noshadows

    nonsolid



    {

        blend    blend

        mirrorRenderMap 512    512

        translate    0.5, 0.5

        scale        0.5, 0.5



        program fresnel.vfp

        vertexParm    0    .5

        fragmentMap    0    _scratch

    }





}

It also looks like someone wrote a wiki article that references the shader.

Link to comment
Share on other sites

Yup, I linked that above. I haven't tested the water yet, but if that program is used in the interaction shader, it doesn't work like it should.

 

Edit: the example of highlight / interaction shader in Dishonored 2:

 

Clipboard01.jpg

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

  • 2 weeks later...

Alright, after banging my head against the wall for an hour or two, and seeing how bad I was at level design, I managed to block out something that will look like a small warehouse. Everything is temporary here (except walls and most walkways). There's no lightning or AI, next step will focus on main gameplay.

 

tut_2017_02_23_23_39_16.jpg

Edited by Judith
  • Like 4
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

    • 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
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...