Tremulous Forum
		Mods => Modding Center => Topic started by: MechWarrior001 on July 31, 2010, 08:26:07 pm
		
			
			- 
				Is it possible to add soft shadows and self-shadowing for weapons in Tremulous? Or would the shadowing techniques need to be entirely rewritten?
			
- 
				[deleted]
			
- 
				The Tremulous BSPs don't contain the positions of the light sources. They are discarded after the map compiler computed the light maps. Without this data you cannot render (realistic) shadows.
 
- 
				So I would have to modify the BSP compiler to retain the light source positions during compilation and modify Trem to use those during shadow calculation, correct?
			
- 
				Yep.
 There's already some lighting info in the entities, it would probably make sense to add whatever else is needed there too, as you'll want different (simpler) lighting for ingame.
- 
				alright, so where can I find the source code to GTKRadiant & the BSP compiler for Tremulous? And uh, which files control whether the light source info is discarded during compilation or not?
			
- 
				http://zerowing.idsoftware.com/
			
- 
				Actually the map compiler can be instructed to keep the light entities by setting the key _keepLights to 1 in the worldspawn.
			
- 
				Hmm, if that's the case it seems the best bet would be to have the renderer check for "_keepLights 1" upon bsp initialization. If it returns negative, then it reverts back to the older techniques used by cg_shadows 2 or cg_shadows 3. If it returns positive, then it will use the newer techniques to Sos & Ses the FP weapons & 3rd person models, along with using separate commands like "cg_softshadowintensity" to control how fine or soft the shadows are, and "cg_fpselfshadowing", "cg_softshadowing" & "cg_fpsoftshadowing" to individually control which shadowing techniques are active, either for performance or user preference.
 
 What are you ideas for this?
- 
				[deleted]
			
- 
				warsow sucks.
			
- 
				[deleted]
			
- 
				You don't need to fiddle with the map compiler. You can just guess the light positions based on the lightgrid... Or, hell, use the lightgrid as your source of lighting.
			
- 
				Then shouldn't I be able to just have the shadows softened without having the rendering mechanics modified? And what about self-shadowing for fp weapons and models? Shouldn't I be able to use the lightgrid for that aswell?
			
- 
				I wonder when cg_shadows 4 will come out (more realistic shadows with no lag and actually does a proper job of rendering) because it's a fucking pain in the ass when you have the gay blob after you :/