Jump to content
The Dark Mod Forums

Aosys

Member
  • Posts

    277
  • Joined

  • Days Won

    8

Posts posted by Aosys

  1. Hey all, I'm back with another(!) texture issue. This time around, it's three textures: diamond_pattern_andbars01_lit, diamond_pattern_andbars01_moonlit, and diamond_pattern_andbars01_unlit. All of them appear to be missing a bumpmap. It's written in the .mtr but the actual .tga file isn't present in the folder structure. Can anyone confirm where it went (if in fact it ever existed)?

  2. I might be able to help - I know my way around texture creation (for the most part), and I've got the Nvidia Normalmap plugin for Photoshop, though that can be a bit hit or miss depending on the texture. Don't know what my schedule will be like once the semester starts though, so no guarantees.

     

    Also, I'm still working on those duct modules, if you're still interested.

  3. Just some notes on the bed fix:

     

    - The two textures are currently set to noshadows, since that's what the original texture had. If this isn't correct for these particular models, feel free to delete the line in the .mtr

    - It appears that the .skin also fixes some awning models that used the same fleshy texture before (:

    - This doesn't replace the old, fleshy skin, it adds two new ones with new materials

  4. 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).

  5. 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?

  6. Sorry for the lack of updates on the duct sections; been a bit busy, but here's what I have now:

     

     

     

     

    ugHOyEW.jpg

    PwOEafH.jpg

    ysnQkkL.jpg

     

     

     

     

    All of these should snap together seamlessly with Grid4, and I think they just about cover all the base section shapes I could think of people wanting (sans a couple of extra connecting bits I want to make for maximum customization of how sections hook up). Any suggestions/requests for additional shapes? I'm also interested in hearing what kind of detail work people would like to see, and how they'd like it implemented.

    • Like 3
  7. I'd say that's a best-case scenario though: wide open spaces mean plenty of room to kite AI around and avoid getting hit. In a full-blown mission things can get more complicated, as areas tend to be (but aren't always!) smaller and populated with architecture/clutter/obstacles, which can skew things in favor of either the AI or the player, depending on the area and how the player can/chooses to utilize it.

     

    When it comes to combat, getting backed into a corner or stuck at a dead end usually doesn't end well for me if I've pissed off the local constabulary, so in that case the AI usually have the upper hand - which is fine, since this is basically what you'd expect IRL. Where I really think AI have trouble is when the player can exploit level architecture, monsterclip, and AI pathing in general to get the best of attacking enemies. I know I've been guilty of wedging myself in some awkward corner or small crawlspace, leaning forward, and stabbing away at enemies that I'm just out of reach of.

  8. Should probably mention that as I was testing these, I tried stringing a bunch of the sections (converted into individual func_statics) together, and a bunch of the ones at the end became non-solid. I had to merge them all into one big func_static in order to get them to work properly. Is this a bug, or a quirk of the engine I'm not aware of?

     

    Also will mention that the dimensions of the working duct are 56 height x 56 width, and at the connecting brackets are 55x55. Any smaller and player pathing becomes borked (not being able to nicely enter the duct without mantling or jumping, even from a flat surface; not being able to get out without mantling or jumping; getting stuck on brackets; etc.).

    • Like 1
  9.  

    I pinned this thread for reasons that will become clear when we release TDM 2.05 :ph34r:

     

    In the meantime, after finishing DeusEx:MD - I would like to put in a request for vent prefabs. Said prefab's should be around 48*48 units in size as this is the smallest hole the player can crawl through as vents by their nature should be claustrophobic etc -

    • one of more openable wall vent grate/cover in func_static,.lwo or .ase
    • one of more openable floor/ceiling vent grate/cover in func_static,.lwo or .ase
    • several vent tunnel sections in func_static,.lwo or .ase
    • All tunnel section should use subdued, fatigued, rusty, stained metals. Additionally use of dirt decals and cobwebs welcome.
    • The wall/floor & ceiling items should be both metal and wood, so metal for a workshorp, basement, underground setting. And wood for manors, apartments, dwelling etc.

     

     

    Something like this?

     

     

     

    UIzo2p2.jpg

    khZEja7.jpg

     

     

    • Like 1
  10. @Obsttorte I know the script uses 1-cos(θ), but I thought that was done for you, so a user's DR inputs would be between -1 and 1?

    eps = getFloatKey("tolerance");
    if (!eps) {
    	eps = 0.1;
    }
    	
    eps = 1.0 - eps;
    

    Regarding the script, I have a turning statue script by VanishedOne and grayman that looks like this:

     

     

     

    void main() {
    	sys.waitFrame();
    	
    	while(1) {
    		vector playerPos = $player1.getEyePos();
    		vector thingPos  = $Statue.getOrigin();
    		vector diff      = thingPos - playerPos;
    		vector angle     = sys.VecToAngles(diff);
    		vector rotation  = '0 270 0'; // adjust to suit
    		angle_z          = 0;
    		angle_x          = 0;
    		angle            = anglemod360(angle + rotation);
    		
    		$Statue.setAngles(angle);
    		sys.waitFrame();
    	}
    }
    
    

     

     

     

    Normally, you just take that script, drag it into the same folder as the mission it's used in, and it works. In this case, it runs all the time and causes an object named Statue to always rotate and face the player on the x and y axis. I would like this behavior to trigger only when the player isn't looking at it, so when the player's view angle is outside maybe 90 or 95°. I thought that by putting a do-while conditional loop where the trigger_look script normally activates a target, I could continually get it to check the truth of the conditional, but something's clearly off with my implementation and I'm not sure what. (I'd also like it to work on whatever object it's applied to, not just something named "Statue", so the final scriptobject could be applied to multiple elements in any given map).

     

    @Springheel Ok, I think I've finally got it figured out. Script tolerance uses 1-cos(θ) = eps, θ being the angle (in degrees) and eps being the tolerance. To solve for the final tolerance the script uses is easy, just plug your angle in and calculate it. So, an angle of 30° from the object would be calculated by 1-cos(30) ~ 0.13 when rounded. Going backwards is a little harder, you have to use the inverse cos (cos-1) to find the angle, so for an eps of 0.1 solving would look like this:

     

    1 - cos(θ) = 0.1

    -cos(θ) = 0.1 - 1

    -cos(θ) = -0.9

    cos(θ) = 0.9

    θ = cos-1(0.9) = 25.84°

  11. So I tried adapting this with the Turning Statue script, and I'm not getting the right behavior. I want a statue to turn only when the player isn't looking at it (aka when the player's view angle < eps).

     

    I tried giving the statue ($Statue) this as the scriptobject:

     

     

     

    //Trigger Look Script by Obsttorte
    
    object trigger_look {
    	float stim;
    	float distance;
    	float processing;
    	float eps;
    	float singleUse;
    	string entityName;
    	void init();
    	void processStim(entity inflictor, float f);
    };
    
    float length(vector v) {
    	return sys.sqrt(v_x*v_x+v_y*v_y+v_z*v_z);
    }
    
    void trigger_look::init() {
    	stim = getFloatKey("stim");
    	if (!stim) {
    		stim = 23;
    	}
    	
    	distance = getFloatKey("distance");
    	if (!distance) {
    		distance = 1024;
    	}
    	
    	eps = getFloatKey("tolerance");
    	if (!eps) {
    		eps = -0.3;
    	}
    	
    	eps = 1.0 - eps;
    	
    	singleUse = getFloatKey("once");
    	
    	entityName = getKey("entityname");
    	if (entityName == "") {
    		entityName = "player1";
    	}
    	
    	ResponseAdd(stim);
    	ResponseSetAction(stim,"processStim");
    	ResponseEnable(stim,1);
    	processing = 0;
    }
    
    void trigger_look::processStim(entity inflictor, float f) {
    	if (processing || entityName != inflictor.getName()) {
    		return;
    	}
    	
    	processing = 1;
    	vector playerView, shieldToPlayer, playerViewDir;
    	
    	if (entityName == "player1") {
    		playerView = inflictor.getViewAngles();
    	}
    	else {
    		playerView = inflictor.getAngles();
    	}
    	
    	shieldToPlayer = getOrigin() - inflictor.getOrigin();
    	shieldToPlayer_z -= 64;
    	
    	if (entityName != "player1") {
    		playerView_z = shieldToPlayer_z;
    	}
    	
    	if (length(shieldToPlayer) > distance) {
    		processing = 0;
    		return;
    	}
    	
    	playerViewDir_x = sys.cos(playerView_y) * sys.cos(playerView_x);
    	playerViewDir_y = sys.sin(playerView_y) * sys.cos(playerView_x);
    	playerViewDir_z = -sys.sin(playerView_x);
    	
    	float sightAngle;
    	sightAngle = playerViewDir*shieldToPlayer/length(shieldToPlayer);
    	
    	do {
    		vector playerPos = $player1.getEyePos();
    		vector thingPos  = $Statue.getOrigin();
    		vector diff      = thingPos - playerPos;
    		vector angle     = sys.VecToAngles(diff);
    		vector rotation  = '0 270 0'; // adjust to suit
    		angle_z    = 0;
    		angle_x    = 0;
    		angle      = anglemod360(angle + rotation);
    		
    		$Statue.setAngles(angle);
    		sys.waitFrame();
    	} while (sightAngle < eps);
    	
    	processing = 0;
    }
    
    

     

     

     

    It's not working in the slightest, and I get the feeling there's something wrong with my loop...

×
×
  • Create New...