Jump to content
The Dark Mod Forums

HMart

Member
  • Posts

    1561
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by HMart

  1. On 12/5/2023 at 6:53 PM, Geep said:

    It is unclear to me if HMart's implementation is synchronous or asynchronous.

    My implementation is just a simple gui script cmd, is very naive and just follows the same system of other existing gui script cmds, made by idSoftware.

    I have zero idea if is synchronous or asynchronous that is beyond my expertise, nor if it is the same as done in Quake 4.

    Plus like I said above I do remember experiencing some small problems with it, when trying to use it to call more complex namedEvent's, that may be connected to the "synchronous or asynchronous" stuff.

    • Like 1
  2. On 12/12/2023 at 2:40 PM, grodenglaive said:

    Scripting help🤔 How do I query whether an objective has been completed? 

    The wiki shows:

     

    but this is just gibberish to me. How do I actually write it as a script? I want to use it in an if statement, for example:
    if (Obj1 = 0 && Obj2 = 0){
    	sys.trigger( $thing1 );
    }
    	else {sys.trigger( $thing2 );}
     

    There's ages that a wrote scripting for TDM or idTech4 in general but I think something like this should work.

    float objstate = $player1.getObjectiveState(objNum);
    
    if(objstate == OBJ_INVALID) {
    	sys.print("warning invalid Objective found!");
    }
    else if( objstate == OBJ_INCOMPLETE ){
    	sys.print("Objective is not complete. Please find all the apples.");
    }
    else if(objstate == OBJ_COMPLETE ){
    	sys.print("Objective is complete. Congrates you have all the apples!");
    }
    else if(objstate == OBJ_FAILED  ) {
    	sys.print("Objective failed. The time to get all the apples as passed!");
    }

    edit: modified the script code to be more correct according too  @Dragofer suggestions bellow. :)

    • Thanks 1
  3. On 11/26/2023 at 7:44 PM, stgatilov said:

    dev16854-10518 is released

    Everyone who saw silver items overly bright, please check that it does not happen on a new build.

    I updated for the new build and saw overly bright plates in "The House of deLisle" mission. 

     

    delisle (2023-12-03 21-11-53) (-387.21 -5.68 237.25).jpg

    • Thanks 1
  4. 23 hours ago, AluminumHaste said:

    So all brush data fits into 1 entity.

    More or less, it doesn't save any real brush data in it, it is more like a "tag", is a peace of memory where info that should represent the entire "world" is defined and handled and brush data is "tagged" has THE worldspawn.

    Again is where all map data that should effect the entire map is handled, it is where the map script is run/called and other global stuff.

  5. Nice knowing you are looking at this. :) 

    Btw when I made my own version of "namedEvent" gui cmd, I just copied the convention of other gui cmds like the "localSound" cmd, what I found is that it made the usage of simple nameEvents in GUI's very fast, with no need to mess with c++ and compile the engine. I think exactly the same reason quake 4 developers said they implemented it, thou like you said we don't know how they made their version. 

    Perhaps is why I had some issues with my implementation when trying to call more complex onNamedEvents, so is something that needs to be well tested.

    Simple example of usage (the following code is untested and should be looked as "pseudo" code)

    windowDef Desktop
    {
    	rect	0,0,640,480
    	backcolor 0,0,0,1
    	menugui 1
    	
    	float "text_state" 0
    	
    	onInit {
    		// just in case ...
    		if("Desktop::text_state" != 0) {
    			set "Desktop::text_state" "0";
    		}	
    	}
    	
    	//*************** Events *************************
    	onNamedEvent ClearText {
    		set "Text::text" "";
    		set "Desktop::text_state" "0";
    	}
    	
    	onNamedEvent SetText {
    		set "Text::text" "Hello world";
    		set "Desktop::text_state" "1";
    	}
    	//************************************************
    	
    	
    	windowDef Text
    	{
    		rect	240,41,165,110
    		visible	1
    		forecolor	1,1,1,1
    		text	""
    		textscale	0.5
    		font	"fonts/micro"
    		textalign	1
    	}
    	
    	windowDef back_btn
    	{
    		rect (320-55),(240-35),50,30
    		visible 1
    		text	"Click Me"
    		textalign 1
    		textscale	0.3
    		font	"fonts/an"
    		
    		
    		onActionRelease {
    			if("Desktop::text_state" == 1){
    				namedEvent "ClearText";
    			} else {
    				namedEvent "SetText";
    			}
    		}
    	}
    }

     

  6.  

    Quote

    Is there a way to make the TEXT property show up by default when I create the Text entity?

    yes but this requires that you make a copy of the original .def file where the text entity is defined, that I personally don't know where in TDM (in Doom 3 is in misc.def) and make a def folder for your own mission where you put the .def file copy (your copy will override the original def file, when your mission is played).

    see the new "text" default var

    entityDef text {
    	"editor_color"			"1 1 0"
    	"editor_mins"			"-4 -4 -4"
    	"editor_maxs"			"4 4 4"
    	"editor_showangle"				"1"
    	"editor_rotatable"				"1"
    
    	"editor_usage"					"Used to display debug text in a level"
    	"editor_var text"				"text to print"
    	"editor_bool force"				"if set to 1 prints always otherwise only in developer mode"
    	"editor_bool playerOriented" 	"if set to 1 text always faces the player"
    	"editor_var scale"				"text scale"
    	
    	"scale" 				"0.25"
    	"text"				"default text shown for all text entites"
    
    	"spawnclass"			"idTextEntity"
    }

     

    • Thanks 1
  7. 20 hours ago, Wellingtoncrab said:

    There is a whole mess of graphics mods for Doom 3 you could peek at. Sikkmod for example is not based off BFG and has a depth of field effect when reloading weapons which sounds like basically what you are looking for and I doubt it requires engine level changes to work:

    At a minimum you could download one of these mods and given doom3 stuff is typically all text formats in .pk4s there might be enough there you can just read to figure out how it works.

    As far as it’s potential inclusion in the game I have no real opinion - though given it would likely be optional I don’t see it hurting anything either.

    Sikkmod has some cool shaders indeed but wasn't the old ARB2 render totally removed in TDM and now only uses the modern GLSL one? At lest that is what I seem to have read some time ago.

    So if the ARB2 render was removed, sikkmod shaders will not work in modern TDM as is they would need to be converted to GLSL, don't know how hard that is.

    • Like 1
  8. On 8/1/2023 at 3:07 PM, demagogue said:

    Here's a video in the style of our game that communicates pretty well the difference between good and bad lighting for a scene.

     

    This is why AAA developers have specialized lighting artists in house, is very important for the mood of a scene indeed.  

  9. Unfortunately many things in this engine are best done on the editor and then called through script, not created directly through script, one of them afaik is triggers.

    You normally create a trigger by creating a square brush on the editor manually, and give it the trigger_hurt material, so the size and shape comes from that brush, it also creates the physics (a clip model) automatically, then just need to use the script function,

    entity ent = sys.FindEntity("entity_name");

    To get it and use it in the script to do whatever you want.

    Creating a clip model from script, is probably possible, thou I never did it, so I don't know how... thou I do know how to do it through c++.

    But I don't think there's any equivalent script functions exposed to the script system, if I'm mistaken please anyone correct me.

    Perhaps something to recommend in the TDM roadmap?

    • Thanks 1
  10. Can you show the actual script code? Is better to know what is really happening, at lest to me, because at first glance it should work.

    But you should know that I'm not a TDM mission maker, even thou I do know a fair bit about idTech 4 scripting and c++ coding, but because of the changes done to TDM engine and scripting, what i know may not apply in TDM.

    But in any case are you really sure you are calling

    PlayerHealth = $player1.getHealth();
    sys.print("health now = " + PlayerHealth + "\n");

    after doing the damage?

    I know you say the light gem shows new damage, so this is indeed strange.

    Btw just to debug, try to manually set the player health with $player1.setHealth(value) and see if it prints the new value. If it still prints the wrong thing then there's something wrong, with how you are calling the code or some bug on how the explosion damage handles the player.

    Also I would use sys.println instead, it does the same but includes the newline automatically less typing imo. :)  

  11. 2 hours ago, grodenglaive said:

    Cool, I think this should help a lot. First off, there is an alpha channel in my vertex-blend texture, so I'll remake that without it.

    The "blend diffusemap" was from the DrVertexBlend tutorial, but I'll try using "blend add" instead.

    I had mistakenly thought the first line of the material file was referencing the vertex-blend image, so I should just be giving the material a name there? OK, I'll fix that too.   

    Thanks!

    No problem btw there's no vertex blend texture, the vertex colors are baked in the mesh itself, meaning they should be exported in the .ase file itself. 

    And yes the first "path" in a material is just a material name, it can be any unique identifier, the real textures are defined inside the material itself. 

    materialname
    {
    	//global space
    
    	{
    		// diffuse material stage
    		blend diffusemap
    		map path/to/the/real/texture.tga
    	}
    }
    
    or
    
    materialname
    {
    	//global space
    
    	diffusemap path/to/the/real/texture.tga
    }

     

    • Like 1
  12. If you already know this ignore it but if you don't, then know that if's in materials stages turn on and off those stages, so you need to make sure you are setting parm11 to a valid value above zero in a script somewhere.

    But if removing those, didn't solved the problem, then the problem could be the vertex colors itself, are you sure the model has the correct vertex color info on it? Afaik the engine only supports grayscale vertex colors in the RGB format no alpha.

    Also instead of blend diffusemap keyword try the blend add (gl_src_one gl_dst_one) not sure if this matters but the basic example for vertex colors in this link uses it.

    I haven't used vertex blending for a very long time so all of this is rusty on my mind unfortunately. 

    Also not sure what you mean with ""lawn_vertex_blend" is the vertex-blended DDS image file exported from Blender and is also referenced in the .ase file." but a material name like yours "textures/darkmod/map_specific/lawn_vertex_blend" shouldn't be a link to a real texture, in reality that is just a virtual path to a fake folder that DarkRadient uses to display in the media section of the editor. 

    You can have a material with just a single word on its name and it will show in the media tab, just not inside a folder but in the global space.

    it is like this:

    virtual path/material name { material code }  or  material name { material code }

    • Thanks 1
  13. 14 hours ago, Dragofer said:

    I believe there's no way to control a func_mover without using a script. Doors have the advantage of having an inbuilt response to frobs and triggers. If you can script, then func_movers are the more elegant option. In this case their advantage would be that you can more easily make it a single-use thing.

    Indeed func_movers don't do anything unless you script them but they have a good amount of script functions to make it easy to use and is also imo what makes them powerful and versatile, but if a func_door does the job you want, by all means use it. :) 

  14. One thing I love about idTech 4 and people using this engine, is that we always find many ways to reach the same conclusion, that usage of the sliding door, is really clever and funny at the same time, at lest to me. :D 

    Thou the first thing that came to my mind when I read the question was using a func_mover, it exists exactly for that, I'm surprised if there's nothing in TDM wiki about it, if there's not here are something about it, and a more powerful and complex tutorial here thou a slide door is just a special binary func_mover.

  15. On 7/2/2023 at 9:08 PM, lowenz said:

    MLAA and SMAA have one big problem FXAA doesn't have: they morph straight lines.....into something like ~

    MLAA has a bad tendency to smooth text indeed but imo SMAA is better than that, specially at x2 or above.

    This is what Unity docs say about it.

    Quote

    is higher quality than FXAA, but slower. It doesn't require motion vectors either, but is not compatible with mobile devices or XR. Depending on the visual style of your project, SMAA can match the quality of TAA.

    Is all a matter of opinion but if is good for Unity is good for TDM? :D 

    • Like 1
  16. On 6/30/2023 at 10:28 AM, datiswous said:

    You can set FXAA in the nvidia linux driver settings. Then you have to disable AA in tdm settings. Since it's an nvidia tech, I understand you cannot set it in the amd driver settings.

    to add to what lowenz said MLAA from AMD is generally considered better than FXAA on AMD hardware, for obvious reasons, so if you have one, is better to use that instead of FXAA. But unfortunately many games only implement FXAA, and forcing it on the GPU driver smooths everything on screen, including the text and GUI elements, that is not generally what you want. That happens the same with FXAA forced on the nvidia drivers...

    But today IMO is better to forget FXAA and MLAA and support/use SMAA (Enhanced subpixel morphological antialiasing) that is a updated version of MLAA.

  17. On 6/28/2023 at 10:43 PM, lowenz said:

    ReShade has NOT access to frame queue and motion vectors, so no "true" TAA possible (but there are motion vectors estimation techniques: GitHub - JakobPCoder/ReshadeMotionEstimation: Optical Flow for games in realtime )

    Only FXAA/SMAA/CMAA (Intel), etc.

    10 years ago they were called "morphological AA"

    oh I didn't knew that, I just seem to recall Reshade having a TAA like shader but I most be wrong then.

  18. Like AluminumHaste said MSAA is for edge of geometry/polygons, if you want to affect textures/shaders/transparencies, you need to use a post-process AA like TAA (it will blur the scene a little contrary to old school MSAA thou).

    You can use Reshade for TAA. 

    Ops: MirceaKitsune sorry you already knew msaa was for geometry only, didn't read your reply well sorry...

  19. 1 hour ago, stgatilov said:

    I think there is no problem with noshadows parallel lights: they are well-defined in the current engine.

    It can be used as local light to brighten the window, as @HMart does.

    I don't deserve that credit, using parallel lights to light windows is user thebigh process. ;) 

  20. 50 minutes ago, thebigh said:

    Here's two windows lit by two lights with the same dimensions, colours, and relative positions. Specular is turned off. The left one is just a pointlight and the right one is a parallel light. I think it's clear which one looks more like there's a lit room behind it. The illusion's not perfect, but it's significantly better.

    Sorry for the off topic but nice out of the box thinking thebigh. :)  But IMO doing that light from behind effect, would be best done through the window material using a blend add stage.

    Or I would use a cheap blend light instead of a real parallel light. (just put the global material keyword 'blendLight' in the light material and do a blend add) Blend lights don't support specular and normal mapping, but for such effect I don't think that matters anyway, but I could be wrong.

    Plus you can project a texture with blend lights as well and so you could create a blend add (black&white) mask texture that would light the glass parts and not the wood parts of the window, where on real life, light wouldn't never show though. 

    • Like 1
  21. Personally have really no good opinion on this, mostly because I have almost no knowhow, on how TDM (or idtech 4 for that matter) low level render works. So I really don't know, if killing old parallel lights, would be good or not, but if you think they are more trouble than good... And how many daylight missions exist in TDM anyway? Honest question.

    But, to those that perhaps want to do day light, would making sun light, still be mostly the same using the parallelSky?

    One thing that IMO was cool about the parallel light, compared to other lights, is that it doesn't care where it is on the world, it only cares about its axis rotation, and it afaik was capable to "project" light from any direction, is that conserved with parallelSky? I'm asking because the sky part, in its name to me makes it sound, like it only can cast light in a semi-sphere, like a dome.

     

    Edit: Reading this on TDM wiki explained a few more things, it seems I was wrong when I thought parallel lights didn't cared where they were on the world, it seems they do for portal flowing at lest.  

×
×
  • Create New...