With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Discuss & improve the game engine.

Moderators: sparcdr, torhu, Tequila

Postby Joe Kari » Sun Jul 05, 2009 1:51 pm

Is there few mapper using far-clipping and level-of-detail ?
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby ReD NeCKersoN » Sun Jul 05, 2009 5:40 pm

Joe Kari wrote:Is there few mapper using far-clipping and level-of-detail ?

Not that I know of Joe. Very little has been done with mapping since the 1.0 release. :oops:
I created a small duel map, but there was no need for far clipping in that. I want to learn your techniques eventually but it seems the mappers (including me) are having trouble devoting time to the project.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Joe Kari » Thu Dec 31, 2009 7:00 pm

Hi,

I remember L3th4l was asking me if it was possible to make far-clipping works with alpha-fading. It looks really much more complicated than my easy patch to support current far-clipping / close-clipping.

However, I have just found something that I have missed in the Obsidian's shader manual:
Appendix A - Triggerable Shader Entities
Q3Map2 Shader Manual


By TTimo, 31.08.01

The targetShaderName and targetShaderNewName keys can be used with any entity that supports the target key (the entity instance does not actually have to use the target key for these new keys to work). If both are defined, then when the entity decides to activate its targets, all shaders/textures in the map that were originally the same name as the targetShaderName value, will be changed to the targetShaderNewName value.

For example this would make it look like the red light shader is "turning on":


"targetShaderName" "textures/proto2/redlight_off"
"targetShaderNewName" "textures/proto2/redlight_on"

And this would turn it back off:


"targetShaderName" "textures/proto2/redlight_off"
"targetShaderNewName" "textures/proto2/redlight_off"

Note that the ORIGINAL shader name is used in both instances, not whatever it happens to be currently. Also, of course, this will happen globally. If the mapper wanted to affect only a certain set of red lights, he/she would need to make a unique shader name to be used with that set.

The code that supports these keys is in G_UseTargets in g_utils.c


I think we can probably upgrade this feature to work with far-clipping: rather than affecting the whole map, we could probably code something that only affect one entity. The mapper will have to choose a transitionnal shaders before the far-clipping occurs.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Previous

Return to Code

Show Sidebar
Show Sidebar

User Control Panel

cron