About assets format

Ask questions about mapping in general, and show off your in-progress work.
User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: About assets format

Post by Viech »

Here's a screenshot from NetRadiant's texture browser, so that you get a better picture of namespaces:

Image

Note that NetRadiant would automatically create a category for two or more shader namespaces sharing a same prefix that ends in and underscore.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

User avatar
illwieckz
Project Head
Posts: 718
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: About assets format

Post by illwieckz »

Viech wrote:

Special rules apply, I think CRN is not supported.

I confirm, CRN is not supported for skyboxes.

Viech wrote:
illwieckz wrote:

Is there a table that list old entities names alongside new entities names to use instead ?

Not yet, but you could parse it from this entities.yaml file (look for "deprecated: y"). Would be nice to have it on the wiki. Actually, a lot of people could profit from a whole page dedicated to porting maps from Tremulous to Unvanquished. :grin:

For your information:

Code: Select all

$ (printf 'deprecated uptodate\n---------- --------\n'; curl -s https://raw.githubusercontent.com/Unvanquished/mapeditor-support/master/src/entities/entities.yaml | grep -v '^#' | grep -B2 'deprecated: y' | grep -B1 '  aliasof: '| grep -v '^--$' | sed -e 'N;s#- name: \(.*\)\n  aliasof: \(.*\)#\1 \2#;P;D;') | column -t

Code: Select all

deprecated                uptodate
----------                --------
info_alien_intermission   pos_alien_intermission
info_human_intermission   pos_human_intermission
info_player_intermission  pos_player_intermission
target_location           pos_location
info_player_deathmatch    pos_player_spawn
info_player_start         pos_player_spawn
target_position           pos_target
info_notnull              pos_target
misc_teleporter_dest      pos_target
info_null                 pos_target
target_relay              ctrl_relay
target_delay              ctrl_relay
trigger_ammo              env_afx_ammo
trigger_gravity           env_afx_gravity
trigger_heal              env_afx_heal
trigger_hurt              env_afx_hurt
trigger_push              env_afx_push
trigger_teleport          env_afx_teleport
target_rumble             fx_rumble
target_alien_win          game_end
target_human_win          game_end
target_kill               game_kill
target_score              game_score
misc_anim_model           gfx_animated_model
misc_light_flare          gfx_light_flare
misc_particle_system      gfx_particle_system
misc_portal_camera        gfx_portal_camera
misc_portal_surface       gfx_portal_surface
trigger_buildable         sensor_buildable
trigger_win               sensor_end
trigger_class             sensor_player
trigger_equipment         sensor_player
trigger_multiple          sensor_player
trigger_stage             sensor_stage
trigger_always            sensor_start
target_speaker            sfx_speaker

So I've just done that:

Code: Select all

$ grep -v '^#' entities.yaml | grep -B2 'deprecated: y' | grep -B1 '  aliasof: '| grep -v '^--$' | sed -e 'N;s#- name: \(.*\)\n  aliasof: \(.*\)#s/"\1"/"\2"/#;P;D;' > fix_entities.sed
$ find map-*pk3dir -name '*.bsp' -exec bsp_parser.py dump_entities {} \;
$ find map-*pk3dir -name '*.entities' -exec sed -f fix_entities.sed -i {} \;

So the next time I will rebuild the release pk3dir from the source pk3dir like that:

Code: Select all

$ release-pk3dir map-*pk3dir

It will merge the bsp with the fixed "entities" lump. :grin:

Last edited by illwieckz on Wed Mar 04, 2015 12:49 am UTC, edited 2 times in total.
User avatar
illwieckz
Project Head
Posts: 718
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: About assets format

Post by illwieckz »

About textures/common shaders, some maps rely on textures/common-trem only and others on both textures/common-trem and textures/common, the first is shipped by my tex-tremulous package, some maps ship the second one, others not.

Do you think I can safely replace each textures/common-trem by textures/common, then add the tex-common dependency to each map?

Edit: to me it seems easy to do, something like that:

Code: Select all

$ find map-*pk3dir -name '*.bsp' -exec bsp_parser.py dump_textures {} \;
$ find map-*pk3dir -name '*.textures' -exec sed -e 's#textures/common-trem#textures/common#' -i {} \;
$ for mapdir in map-*pk3dir; do echo 'tex-common' >> "${mapdir}/DEPS"; done
User avatar
illwieckz
Project Head
Posts: 718
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: About assets format

Post by illwieckz »

I've done the trick above and it seems to work.

I was able to rewrite some old shader calls too (according to comments inside common.shader):

  • textures/common/weapclip → textures/common/fullclip

  • textures/common/full_clip → textures/common/fullclip

  • textures/common/clip → textures/common/playerclip

So now there is only 2 missings:
textures/common/nolightmap
textures/NULL

Do you have an idea wich I can use in Unvanquished's texture/common as placeholder? :smile:

User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: About assets format

Post by Viech »

illwieckz wrote:

About textures/common shaders, some maps rely on textures/common-trem only and others on both textures/common-trem and textures/common, the first is shipped by my tex-tremulous package, some maps ship the second one, others not.

Do you think I can safely replace each textures/common-trem by textures/common, then add the tex-common dependency to each map?

Yeah, all relevant common-trem shaders (in particular the no-build ones) are now in common. Changing the pathes in the pk3 and including tex-common as a dependency should work.

illwieckz wrote:

So now there is only 2 missings:
textures/common/nolightmap
textures/NULL

Do you have an idea wich I can use in Unvanquished's texture/common as placeholder? :smile:

textures/NULL could be a radiant default, try to replace it with textures/common/caulk. I still have no idea what textures/common/nolightmap is supposed to be good for. It was a shader that had only the nolightmap surfaceparm, so it's basically a shader with the only attribute that no light map is generated for it, which is like having a cooking receipt that only says that the thing you're supposed to cook doesn't contain onions… Try to replace it with textures/common/nodrawnonsolid which is basically an invisible, non-clipping wall that doesn't cast shadows.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

User avatar
illwieckz
Project Head
Posts: 718
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: About assets format

Post by illwieckz »

OK thanks!

User avatar
illwieckz
Project Head
Posts: 718
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: About assets format

Post by illwieckz »

Hi, in map thermal and perhaps other ones, I get this messages:

Code: Select all

warning: entity #65 contains deprecated field team — use group instead 
warning: entity #78 contains deprecated field team — use group instead 
warning: entity #79 contains deprecated field team — use group instead 
warning: entity #99 contains deprecated field team — use group instead 
warning: entity #100 contains deprecated field team — use group instead 
warning: entity #107 contains deprecated field team — use group instead 
warning: entity #112 contains deprecated field team — use group instead 
warning: entity #113 contains deprecated field team — use group instead 
warning: entity #115 contains deprecated field count — use amount instead 
warning: entity #119 contains deprecated field team — use group instead 
warning: entity #131 contains deprecated field team — use group instead 
warning: entity #132 contains deprecated field team — use group instead 
warning: entity #135 contains deprecated field team — use group instead 
warning: entity #136 contains deprecated field team — use group instead 
warning: entity #137 contains deprecated field team — use group instead 
warning: entity #138 contains deprecated field team — use group instead 
warning: entity #139 contains deprecated field team — use group instead 
warning: entity #140 contains deprecated field team — use group instead 
warning: entity #141 contains deprecated field team — use group instead 
warning: entity #142 contains deprecated field team — use group instead 
warning: entity #143 contains deprecated field team — use group instead 
warning: entity misc_teleporter_dest1 (misc_teleporter_dest|#145) uses a deprecated classtype — use the class pos_target instead 
warning: entity misc_teleporter_dest2 (misc_teleporter_dest|#147) uses a deprecated classtype — use the class pos_target instead 
warning: entity #149 contains deprecated field team — use group instead 
warning: entity #150 contains deprecated field team — use group instead 
warning: entity #154 contains deprecated field team — use group instead 
warning: entity #155 contains deprecated field team — use group instead 

And yes there is plenty of these keywords:

Code: Select all

$ grep team_ map-thermal_r01+unv-a37-illwieckz.pk3dir/maps/thermal.entities 
"classname" "team_human_mgturret"
"classname" "team_human_mgturret"
"classname" "team_alien_acid_tube"
"classname" "team_alien_acid_tube"
"classname" "team_alien_acid_tube"
"classname" "team_alien_spawn"
"classname" "team_human_reactor"
"classname" "team_alien_overmind"
"classname" "team_human_spawn"
"classname" "team_human_armoury"
"classname" "team_human_mgturret"
"classname" "team_alien_spawn"
"classname" "team_alien_acid_tube"
"classname" "team_human_spawn"
"classname" "team_human_mgturret"
"classname" "team_alien_spawn"
"classname" "team_human_spawn"

But there is no one in entities.yaml:

Code: Select all

$ grep group_ entities.yaml | wc -l
0
User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: About assets format

Post by Viech »

I think group is supposed to be an attribute key, not part of an entity name. Thus grep group_ won't cut it, remove the underscore.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

User avatar
illwieckz
Project Head
Posts: 718
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: About assets format

Post by illwieckz »

It could be this kind of "team" keyword?:

Code: Select all

{
"classname" "func_door"
"team" "darkstairone"
"angle" "0"
"model" "*28"
}
User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: About assets format

Post by Viech »

Yes, most likely.

Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

Post Reply