View Issue Details

IDProjectCategoryView StatusLast Update
0006057DarkRadiantGUIpublic13.01.2024 05:31
ReporterDragofer Assigned Togreebo  
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Product Version3.0.0 
Target Version3.1.0Fixed in Version3.1.0 
Summary0006057: Light Texture Preview should display editor images if present
DescriptionWhen browsing through light textures, the light inspector (accessed by pressing L with a light selected) ignores qer_editorimage and shows one of the actual images used in the material instead. The Media Browser will show the editorimage. This makes it harder to give an idea of what to expect from a light material.
Steps To Reproduce1) Download and place the attached tdm_fogs.mtr in your base install directory, which contains an attempt to add an editorimage to fogs/real_fog. The actual functional material stage uses textures/common/nodraw in this example.
2) Start DR, create a light, press L to open the light inspector.
3) Navigate to fogs/real_fog in the list of available light shaders. The preview is textures/common/nodraw, even though it should use a similar image as the neighbouring fog materials.
4) Close the light inspector and look up fogs/real_fog in the Media Browser. Here it uses the correct editor image.
Additional InformationUpdated the title, since the situation was already different in 3.1.0 (all texture previews showed the stage map instead of the editor image). I'll change the behaviour to prefer displaying the editor image if it's present, otherwise it will display the first stage's image map (like before).
TagsNo tags attached.
Attached Files
tdm_fogs.mtr (5,173 bytes)   
// vim:ts=4:sw=4:cindent

fogs/real_fog
{
	noShadows
	blendLight
	description	"A blend light instead of a foglight. Works best when covering the entire map and bound to the player, but can also look better (no artefacts) than real foglights. Does not fog any postprocess surface, like water or sky. These need to be colored sep. to match the fog color, either by using custom materials on them, or by putting a patch over them with textures/darkmod/fogs/real_fog_layer_moving on it."
	qer_editorimage	textures/fog/realfog

	{
                	blend add
		//map   textures/fog/realfog_thinner
		map     textures/common/nodraw		//suppress console warning. The actual image has been missing for years, so mappers have been using the material without an image all this time anyway
		zeroclamp   // make sure it doesn't bleed over the edges
	}
}

// Tels 2010-09-23
fogs/real_fog_moving
{
	description	"A blend light instead of a foglight. Works best when covering the entire map and bound to the player, but can also look better (no artefacts) than real foglights. Does not fog any postprocess surface, like water or sky. These need to be colored sep. to match the fog color, either by using custom materials on them, or by putting a patch over them with textures/darkmod/fogs/real_fog_layer_moving on it."

	noShadows
	blendLight
	{
		blend add
		map      textures/fog/realfog
		zeroclamp   // make sure it doesn't bleed over the edges
	}
	{
		blend add
		map		textures/lights/clouds.tga
		scroll	time * (parm5 + 1) * 0.008, 0
	}
}

// Tels 2010-09-23
fogs/real_fog_thin_moving
{
	description	"Thin version of real_fog_moving, usable for swamp areas. Set 'shaderParm5' to set the moving speed, values around 1 look good. Set 'shaderParm6' to control the density, values from 0 to 0.90. A blend light instead of a foglight. Works best when covering the entire map and bound to the player, but can also look better (no artefacts) than real foglights. Does not fog any postprocess surface, like water or sky. These need to be colored sep. to match the fog color, either by using custom materials on them, or by putting a patch over them with textures/darkmod/fogs/real_fog_layer_moving on it."

	noShadows
	blendLight
	{
		blend add
		map	textures/fog/realfog_thin
		rgb 0.01 + parm6		// thin it out
		zeroclamp	// make sure it doesn't bleed over the edges
	}
	{
		blend add
		map	textures/lights/clouds.tga
		rgb 0.4 + parm6 / 2		// thin it out
		scroll	time * parm5 * 0.008, 0
	}
}

// Tels 2010-09-23
textures/darkmod/fogs/real_fog_layer_moving
{
	description	"Apply to a thin patch to get a moving layer of fog. Set 'shaderParm5' on the entity to set the moving speed, values around 1 look good."
	noShadows
	translucent
	twosided

	{
		blend add
		map	textures/fog/realfog_thin
		rgb 0.05 + parm6		// thin it out
		zeroclamp	// make sure it doesn't bleed over the edges
	}
	{
		blend add
		map	textures/lights/clouds.tga
		scroll	time * parm5 * 0.008, 0
		rgb 0.5	+ parm6 / 2		// thin it out
		zeroclamp	// make sure it doesn't bleed over the edges
	}
}

fogs/basicFog
{
	noShadows
	fogLight			// tell the engine it is fog and not a light

        {
	

		map		_fog    // the internal fog image
		colored			// take RGBA from entity shaderparms
		
	}
}

fogs/glare
{
	description			"Glare SFX fog light"
	blendLight
	noShadows
	lightFalloffImage	lights/squarelight1a
	{
		blend		add					// add on top of alpha blend on surfaces
		map			lights/squarelight1
		zeroclamp						// make sure it doesn't bleed over the edges
		colored							// take RGBA from entity shaderparms
	}
}

fogs/glare2
{
	description			"Glare SFX fog light"
	blendLight
	noShadows
	lightFalloffImage	lights/squarelight1a
	{
		blend		add					// add on top of alpha blend on surfaces
		map			lights/spot01
		zeroclamp						// make sure it doesn't bleed over the edges
		colored							// take RGBA from entity shaderparms
	}
}

tdm_fogs/cloud_fog
{
	description			"Cloudy foglight, which can be colored."
	fogLight			// tell the engine it is fog and not a light
	noShadows
	{
		map				lights/spot01
		colored			// take rgba from entity shaderparms
	}
}

// legacy fog material
fogs/delta1_fog
{
	fogLight
	noShadows
	{
		map		_fog
		alpha	0.5
		colored
	}
}


fogs/lava_fog
{
   noShadows
   blendLight
   {
      blend add
      map      textures/fog/lavafog
      zeroclamp   // make sure it doesn't bleed over the edges
   }
}

////////////////Usage//////////////////////

/*
// sets up the fog for this level - make a map script with this in it. -- Dram
// created from an example on www.doom3world.org

void setup_objects()
{
      entity foglight;
   $foglight = sys.spawn( "light" );
      $foglight.setShader( "fogs/lava_fog" );
     $foglight.setRadius( 15850 );
     
   $foglight.bindPosition( $player1 );
   $foglight.setOrigin( '0 0 0' );
}

// function that executes when script is loaded

void main ()
{
   setup_objects ();
   sys.print( "Fog created!\n" );
}

*/


fogs/pitFog_to_black
{
	lightFalloffImage		lights/xfalloff.tga

	fogLight			// tell the engine it is fog and not a light
	noShadows
	{
		map		_fog	// the internal fog image
		colored			// take rgba from entity shaderparms
	}
}
tdm_fogs.mtr (5,173 bytes)   

Activities

Related Changesets

DarkRadiant: master 763e80c2

06.08.2022 05:05

greebo


Details Diff
0006057: Light Texture Preview should display editor image if present Affected Issues
0006057
mod - radiant/ui/common/TexturePreviewCombo.cpp Diff File

Issue History

Date Modified Username Field Change
01.08.2022 19:28 Dragofer New Issue
01.08.2022 19:28 Dragofer File Added: tdm_fogs.mtr
01.08.2022 19:28 Dragofer Description Updated
06.08.2022 05:02 greebo Status new => confirmed
06.08.2022 05:04 greebo Summary Light inspector doesn't use editor images => Light Texture Preview should display editor images if present
06.08.2022 05:04 greebo Additional Information Updated
06.08.2022 05:04 greebo Target Version => 3.1.0
06.08.2022 05:05 greebo Changeset attached => DarkRadiant master 763e80c2
06.08.2022 05:05 greebo Assigned To => greebo
06.08.2022 05:05 greebo Status confirmed => assigned
06.08.2022 05:05 greebo Status assigned => resolved
06.08.2022 05:05 greebo Resolution open => fixed
06.08.2022 05:05 greebo Fixed in Version => 3.1.0
13.01.2024 05:31 greebo Status resolved => closed