Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

Your helmet texture, where in the darkmod folder structure is it located?

Also what format is the file, dds or tga?

If DDS, what compression algorithm did you use?


I always assumed I'd taste like boot leather.

 

Share this post


Link to post
Share on other sites

How is transparency meant to be handled? I'm thinking a diffusemap declaration with no alphatest is usually what you'd use for fully opaque materials, so I'm unsure without examining it quite what the spyglass overlay is doing.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

I have no idea how it all works and there are few different ideas I have.

I have ingame periscope texture and it is placed in front of periscope camera


textures/erh_sub/er_sub_periscope

{
    surftype15
    description "painted glass"

  nonsolid
  noshadows
  noselfshadow
  translucent

  {
    blend    diffusemap
    map      textures/erh_sub/er_sub_periscope
    alphatest  0.65
  }

  // frobbing
    {
  if ( parm11 > 0 )
    blend    gl_dst_color, gl_one
    map      _white
    rgb      0.40 * parm11
  }
  {
    if ( parm11 > 0 )
    blend    add
    map      textures/erh_sub/er_sub_periscope
    rgb      0.15 * parm11
    }

  // TDM Ambient Method Related
  {
    if (global5 == 1)
    blend add
    map      textures/erh_sub/er_sub_periscope
    scale    1, 1
    red      global2
    green    global3
    blue    global4
  }
  {
    if (global5 == 2)
    blend add
    program  ambientEnvironment.vfp
    vertexParm    0    1, 1, 1, 1    // UV Scales for Diffuse and Bump
    vertexParm    1    1, 1, 1, 1  // (X,Y) UV Scale for specular
    vertexParm    2    global2, global3, global4, 1

    fragmentMap    0    cubeMap env/gen1
    fragmentMap    1    _flat      // Bump
    fragmentMap    2    textures/erh_sub/er_sub_periscope    // Diffuse
    fragmentMap    3    _black      // Specular
  }
}

It is just a copy/paste of different partially transparent texture and I even don't know if I need of this stuff above, but it works.

 

Overlay material on the other side looks different:

guis/divinghelmet
{
  {
        vertexProgram heatHaze.vfp
        vertexParm  0  0 , 0  // texture scrolling
        vertexParm  1  .02  // magnitude of the distortion

        fragmentProgram heatHaze.vfp
        fragmentMap 0  _currentRender
        fragmentMap 1  textures/sfx/vp1 // the normal map for distortion
    }
  {
    blend filter
    map textures/helmet_filter

  }

  {
    maskcolor
    map makealpha(textures/helmet_inverse)
  }
  {

    blend gl_dst_alpha, gl_one
    map textures/helmet
    alphatest 0.9
  }
}

It have two more textures( helmet_inverse and helmet_filter). It kind of work, but have some nasty bugs ingame (part of view is completely smeared, looks like one row of pixels become 2d image - and more), and distortion mean all other distortion (water surface) will be not rendered. So I want more simple approach, and I'm thinking about spyglass.

Edited by ERH+

S2wtMNl.gif

Share this post


Link to post
Share on other sites

This last above have one texture "inside helmet" without alfa, one black-and-white texture for alfa and one for distortion as I understand it.

 

This below mimic spyglass and have alfa - but ingame its completely black, not only opaque.

guis/divinghelmet
{
  qer_editorimage  guis/assets/hud/spyglass_overlay_ed
  diffusemap    textures/helmet

  // TDM Ambient Method Related
  {
    if (global5 == 1)
    blend add
    map        textures/helmet
    scale      1, 1
    red        global2
    green      global3
    blue      global4
  }
  {
    if (global5 == 2)
    blend add
    program  ambientEnvironment.vfp
    vertexParm    0    1, 1, 1, 1    // UV Scales for Diffuse and Bump
    vertexParm    1    1, 1, 1, 1  // (X,Y) UV Scale for specular
    vertexParm    2    global2, global3, global4, 1

    fragmentMap    0    cubeMap env/gen1
    fragmentMap    1    _flat      // Bump
    fragmentMap    2    textures/helmet      // Diffuse
    fragmentMap    3    _black      // Specular
  }
}
Edited by ERH+

S2wtMNl.gif

Share this post


Link to post
Share on other sites

hiyas ... I attached ('bind') a ladder model to a trapdoor, that is working only the ladder was not climbable. After creating the invisble brush with climbable texture ('ladder') and bind-ing this brush also to the trapdoor, dmap shows an error: tried to bind world to 'Trapdoor'

 

how can I bind a brush to a moving (rotating) object?

Share this post


Link to post
Share on other sites

Try making the climbing texture brush into a func_static, then binding that to the ladder????

 

Might work.

Share this post


Link to post
Share on other sites

Graymans suggestion works.

 

You cannot bind worldspawn to anything, because all worldspawn is boundled together to one entity. So if you would bind a brush to another entity, you actually try to bind the whole world geometry to that one. Pretty obvious this can't work ;)


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

Texture Blending in DR: DR ASE Blend Exporter

Share this post


Link to post
Share on other sites

Try making the climbing texture brush into a func_static, then binding that to the ladder????

 

Might work.

tbh me don't know how to convert a brush into an entity .. each time I try to select another class(name) from the entity list, it is not accepted and the brush remains at class worldspawn.

Share this post


Link to post
Share on other sites

right-click -> convert to func_static


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

Texture Blending in DR: DR ASE Blend Exporter

Share this post


Link to post
Share on other sites

So, I'm having a bit of a strange issue here. I'd like to insert singlebed1.lwo into my map - in particular, the rough_green version. I can get the model in just fine, and when I jump vertically up and down on top the correct cloth sound plays. When I try to walk or run on the bed, however, it makes squishy mud noises instead. None of the other versions of that model suffer from this problem. Am I going crazy? Is this a bug? Or do the denizens of Bridgeport just really like green waterbeds?

 

[Edit] A bit more experimentation, and I've found that all models using the rough_green texture are like this. I guess there's something wrong with the material definition, I'll see if I can have a poke around and find the problem...

 

[Double Edit]

 

Alright, here's the problem: I'm pretty sure the beds are using the tdm_roughcloth_green texture - which is for ai use if I'm not mistaken. The .mtr is as follows:

 

 

 

tdm_roughcloth_green
{

	flesh
	noshadows

	diffusemap models/darkmod/props/textures/cloth_rough_generic01
	bumpmap           models/md5/chars/cloth_rough_generic01_local
    {
        if ( parm11 > 0 )
        blend       gl_dst_color, gl_one
        map         _white
        rgb         0.40 * parm11
    }
    {
        if ( parm11 > 0 )
        blend       add
        map         models/darkmod/props/textures/cloth_rough_generic01
        rgb         0.15 * parm11
    }

	// TDM Ambient Method Related 
	{							
		if (global5 == 1)		
		blend add				
		map				models/darkmod/props/textures/cloth_rough_generic01		
		scale			1, 1		
		red				global2	
		green			global3	
		blue			global4	
	}							
	{							
		if (global5 == 2)		
		blend add				
		program	ambientEnvironment.vfp	
		vertexParm		0		1, 1, 1, 1		// UV Scales for Diffuse and Bump	
		vertexParm		1		1, 1, 1, 1	// (X,Y) UV Scale for specular		
		vertexParm		2		global2, global3, global4, 1	
																
		fragmentMap		0		cubeMap env/gen1				
		fragmentMap		1		models/md5/chars/cloth_rough_generic01_local			// Bump				
		fragmentMap		2		models/darkmod/props/textures/cloth_rough_generic01			// Diffuse			
		fragmentMap		3		_black			// Specular			
	}


}

 

 

 

Basically, right now our beds are making fleshy noises. Any chances of this getting fixed at some point?

Edited by Aosys

Share this post


Link to post
Share on other sites

If the material gets used on ai it has to be flesh there, but you can create a copy of the material and rename it. Than you have to change the material type to cloth or so (you have to check the working materials for the correct setting) and create your own skin so you can use it on the bed. The easiest way to do the latter is to take the skin used for the bed and make the changes there. Don't forget to rename the skin.


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

Texture Blending in DR: DR ASE Blend Exporter

Share this post


Link to post
Share on other sites

I think this might be the same problem that was reported in the testing thread for Springheel's new intro mission, indicated as 'fixed squishy bed' in http://forums.thedarkmod.com/topic/18548-testing-205-intro-mission/page-2?do=findComment&comment=398581 -- though I don't see a material override in the mission pk4, so I'm guessing the fix wasn't at the material level.

 

I wonder whether tdm_roughcloth_* beds bleed.

 

I'll add a comment to http://bugs.thedarkmod.com/view.php?id=526


Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

I think this might be the same problem that was reported in the testing thread for Springheel's new intro mission, indicated as 'fixed squishy bed' in http://forums.thedarkmod.com/topic/18548-testing-205-intro-mission/page-2?do=findComment&comment=398581 -- though I don't see a material override in the mission pk4, so I'm guessing the fix wasn't at the material level.

Maybe there already is a new cloth material/texture that the fixed bed points to?

Share this post


Link to post
Share on other sites

I have noticed long time ago that monster_clip (and probably any nodraw_solid) is penetrated by AI foots for 32 units; that means that any nosolid model in such AI path should be 32 units below upper monster_clip boundary. But I have lately problem with AI losing its way where it could walk without problems previously so I want to ask how high should path_corner be placed under/over monster_clip surface to make it work properly? And how about walking from monster_clip path to any solid brush, should I keep same level or make a step from -32 to 0 level?


S2wtMNl.gif

Share this post


Link to post
Share on other sites

so I want to ask how high should path_corner be placed under/over monster_clip surface to make it work properly? And how about walking from monster_clip path to any solid brush, should I keep same level or make a step from -32 to 0 level?

As I understand it AIs compare their own origin to the origin of the path node to determine if they've reached it, so the node should be where the AI physically stands. There are two spawnargs for tolerance, move_to_tolerance for x/y and another one for z axis.

 

For the second question, I'm not sure what you mean. Should the AI walk at constant height? Or is your monsterclip brush on the same height as the solid brush?

  • Like 1

Share this post


Link to post
Share on other sites

I have noticed long time ago that monster_clip (and probably any nodraw_solid) is penetrated by AI foots for 32 units; that means that any nosolid model in such AI path should be 32 units below upper monster_clip boundary. But I have lately problem with AI losing its way where it could walk without problems previously so I want to ask how high should path_corner be placed under/over monster_clip surface to make it work properly? And how about walking from monster_clip path to any solid brush, should I keep same level or make a step from -32 to 0 level?

 

Plant your path_corners directly on the ground, whether that's worldspawn, or a covering ground patch, or a tdm_nodrawsolid, or monster_clip or clip.

 

Treating these surfaces as equivalent, the only rule that comes into play is that human AI can climb or descend steps that are no more than 13 units apart vertically.

  • Like 1

Share this post


Link to post
Share on other sites

I found the brown equivalent of that same texture, it is indeed for AI:

 

 

 

tdm_roughcloth_brown
{

	flesh
	description "flesh"   //this is for AI use
	noshadows

	diffusemap models/md5/chars/cloth_rough_generic_brown
	bumpmap           models/md5/chars/cloth_rough_generic01_local
    {
        if ( parm11 > 0 )
        blend       gl_dst_color, gl_one
        map         _white
        rgb         0.40 * parm11
    }
    {
        if ( parm11 > 0 )
        blend       add
        map         models/darkmod/props/textures/cloth_rough_generic01
        rgb         0.15 * parm11
    }

	// TDM Ambient Method Related 
	{							
		if (global5 == 1)		
		blend add				
		map				models/md5/chars/cloth_rough_generic_brown		
		scale			1, 1		
		red				global2	
		green			global3	
		blue			global4	
	}							
	{							
		if (global5 == 2)		
		blend add				
		program	ambientEnvironment.vfp	
		vertexParm		0		1, 1, 1, 1		// UV Scales for Diffuse and Bump	
		vertexParm		1		1, 1, 1, 1	// (X,Y) UV Scale for specular		
		vertexParm		2		global2, global3, global4, 1	
																
		fragmentMap		0		cubeMap env/gen1				
		fragmentMap		1		models/md5/chars/cloth_rough_generic01_local			// Bump				
		fragmentMap		2		models/md5/chars/cloth_rough_generic_brown			// Diffuse			
		fragmentMap		3		_black			// Specular			
	}


}

 

 

 

I was finally able to locate the diffuse and normalmaps (both in completely different .pk4 files) for the cloth_rough_generic01 texture (and found cloth_rough_generic_brown along the way), though I have no idea where the editor images are. Should be easy enough to drum up a custom texture for both, but I've never played around with skins before, so this could get interesting...

 

[Edit] After a brief reenactment of that scene from the Prancing Pony Inn, it would seem that beds/worldspawn with the texture applied do not, in fact, bleed when hit (at least with a sword, I haven't tried arrows but I think the same thing applies).

Edited by Aosys

Share this post


Link to post
Share on other sites

There are two spawnargs for tolerance, move_to_tolerance for x/y and another one for z axis.

How exactly goes z axis spawnarg?


S2wtMNl.gif

Share this post


Link to post
Share on other sites

How exactly goes z axis spawnarg?

 

x/y: move_to_position_tolerance

+z: aas_reachability_z_tolerance

-z: 0.4*aas_reachability_z_tolerance

  • Like 1

Share this post


Link to post
Share on other sites

dmap shows one (irritating) warning: brush primitive 148 on entity 0 is degenerate

how can I locate / select this special brush in darkradiant? in other words I don't know what I made where wrong :)

Edited by Don Locust

Share this post


Link to post
Share on other sites

This is a typical warning that comes up during almost any dmap once the geometry reached a certain complexity. It will, however, not cause any issues. In general you can ignore warnings, as long as they are not referring to something not working properly.


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

Texture Blending in DR: DR ASE Blend Exporter

Share this post


Link to post
Share on other sites

However, if you ever do need to track down a brush by number in DR, it's Map --> Find brush...


Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
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.


×
×
  • Create New...