Applying new shader to an md3 model
Applying new shader to an md3 model
I was looking for a way to write a new shader (with a new name) for an md3 model, but it appears the reference to the shader that should be used for the model is stored within the md3? Is that correct? Is there an easy way to change these references?
Re: Applying new shader to an md3 model
Ah already got it. I've used this tool called md3 compile to change the references to new shaders and that works.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Applying new shader to an md3 model
You can also edit the .md3 with a hex editor, the shader name is located at position 272 (110 hex). Just make sure the new shader name is < 64 characters long and ends with a nul byte.
Re: Applying new shader to an md3 model
The simplest way (and without duplicating the model itself) is just to use the entity _remap value:
_remap : Used to remap textures/shaders in the model. To remap all shaders to a given shader, use "*;models/mymodel/mytexture". To remap a specific shader, use "models/mymodel/old;models/mymodel/new".
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]