[Tutorial] Models with brightmaps in GZDoom

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Tutorial] Models with brightmaps in GZDoom

Re: [Tutorial] Models with brightmaps in GZDoom

by Enjay » Thu May 29, 2014 10:23 am

For information, things have changed on this front.

Firstly, any skins set up with brightmaps using the method outlined in this thread will no longer work in the latest GZDoom builds. However, this is because there is now a better system.

It is no longer necessary to put the model skin into the Textures folder. You can now specify the full path to the location of the skin in your GLDEFS lump. This allows you to use a folder other than Textures (i.e. you can put the models and skins back together in the same folder if you like). You can also go back to using skin names that are longer than 8 characters too. So, while there might be a little work to convert an existing project, the system is better in the long run.

More detail and an example file can be found in this thread over at DRD:

http://forum.drdteam.org/viewtopic.php?f=22&t=6320

Re: [Tutorial] Models with brightmaps in GZDoom

by skornedemon » Sun Jan 12, 2014 11:06 pm

Enjay wrote:
skornedemon wrote:I don't believe they work on MD3 models.
You believe incorrectly:
Spoiler:
By chance could you simply rar up the pk3 with just the modeldef?
What format does the texture use?png?

Re: [Tutorial] Models with brightmaps in GZDoom

by Graf Zahl » Sun Jan 12, 2014 12:15 pm

Many things are possible. It was just an example showing the shortsightedness of such antics.

Re: [Tutorial] Models with brightmaps in GZDoom

by Nash » Sat Jan 11, 2014 6:25 pm

Graf Zahl wrote:If the current lump management ever gets replaced with a real virtual file system
So there is a possibility for this in the future then! :mrgreen:

Re: [Tutorial] Models with brightmaps in GZDoom

by Enjay » Sat Jan 11, 2014 3:17 pm

skornedemon wrote:I don't believe they work on MD3 models.
You believe incorrectly:
Spoiler:

Re: [Tutorial] Models with brightmaps in GZDoom

by Gez » Sat Jan 11, 2014 1:58 pm

I do not agree that policing the practices of modders is the duty of the archive editors. That falls into the category of second-guessing the user's intent, which is a big source of problems in modding utilities ("obviously the user wants this high-res JPG turned into the Doom graphic format", "obviously they'll want transparency converted to cyan", etc.).

Furthermore, what may be an awful hack in one port might be a legitimate editing feature in another. A generic editing utility should be port-agnostic, and if something like SRB2 needs to allow sprite names to go all the way from A to ~, then so be it.

Re: [Tutorial] Models with brightmaps in GZDoom

by Graf Zahl » Sat Jan 11, 2014 1:45 pm

Gez wrote: And as I have discovered, it's not just sprites! Xaser was evil enough to use \ in a texture name in his "Lost Episode" mod.

Sigh...
Why do some people have to do this shit despite being warned?
If the current lump management ever gets replaced with a real virtual file system this (and more so Enjay's test case) will break horribly. Lump editors are best advised to disallow any special characters in lump names - with the sole exception of backslashes in sprite frames.

Re: [Tutorial] Models with brightmaps in GZDoom

by skornedemon » Thu Jan 09, 2014 10:31 am

I have never had luck with brightmaps, never really know why.

I just tried this myself with no luck.

Code: Select all

MODELDEF

Model InvulnerabilityHunter
{ 
   Path "Models\Monsters\HunterInvulnerability"
   MODEL 0 "Idle.md3"
   Path "Textures\Models\Monsters\HunterInvulnerability\Skin"
   SKIN 0 "invulhunter.tga"
   Scale 1.0 1.0 1.0
   
   FrameIndex TEST A 0 0

}

GLDEFS

brightmap texture invulhunter {
  map "Models/Monsters/HunterInvulnerability/Skin/invulhunterglow.tga"
}
I should mention that the actual brightmap is in Textures/Models/Monsters/HunterInvulnerability/Skin/

I've seen them work in other mods so I know I can see them.

EDIT: After doing some quick tests, the brightmapped models seem VERY picky(even in terms of typing out directories in GL DEFS and such). I don't believe they work on MD3 models.
There was a case of one gldef file not working,but another with literally copy/pasted stuff working. However I did not get MD3 to achieve it.

Re: [Tutorial] Models with brightmaps in GZDoom

by DoomQuaker » Mon Dec 24, 2012 8:48 am

I've read this tutorial and followed instructions for brightmaps, tried but it doesn't work. I've tried it on a model (an imp) to make his eyes glow in the dark but nothing happens. Does it work on mosters?

Re: [Tutorial] Models with brightmaps in GZDoom

by Enjay » Mon Oct 29, 2012 3:06 pm

Gez wrote:makes sense
Indeed. I hadn't even considered that "\" being possible as part of a sprite name could be an issue here.

[Edit] Mind you, it's possible to be even more evil than Xaser ;)

Image

Much to my surprise, I was able to rename a texture lump to WHE\*/EE and use it in a map on a wall and ZDoom displayed it. (Heh, and I renamed the SCRIPTS lump. I forgot about that.) For info, SLADE didn't like the renaming process and whenever a / was entered, it split the name. Both XWE and DeePSea did it and once it had been done, SLADE happily displayed it.

Re: [Tutorial] Models with brightmaps in GZDoom

by Gez » Mon Oct 29, 2012 2:59 pm

Not really. Keep in mind, as awful as that fact is, that \ is a valid frame letter, so it's a valid "name" part of a full path for graphic resources.

And as I have discovered, it's not just sprites! Xaser was evil enough to use \ in a texture name in his "Lost Episode" mod.

So, being strict in only accepting / for path separator makes sense, as \ is ambiguous and could be part of a lump name rather than a separator.

Re: [Tutorial] Models with brightmaps in GZDoom

by Enjay » Mon Oct 29, 2012 2:19 pm

Now here's interesting. It's possible to set this up so that the model doesn't have to be in the textures folder.

Code: Select all

Model CellPack {
   Path "models"
   Model 0 "cellpack.md2"
   Path "textures"
   Skin 0 "cellpack.png"
   Scale 80.0 80.0 80.0

   FrameIndex CELP A 0 0
}
I didn't think that it was possible to set a different folder path for the model and the skin but apparently it is.

evidence

I would still appreciate a "yay or nay" from Graf to say whether such a setup is acceptable or not. I don't want to start doing this for it to break at a later date because it wasn't the right way to do things. I've been caught out before doing things that I assumed were OK but which turned out not to be.


Also, as a minor aside, while messing around with this I found that modeldef will accept either a "\" or a "/" to separate the directories in a path but gldefs only accepted "/" and couldn't find the brightmap when I used a "\". Is this something that needs to be addressed?

Re: [Tutorial] Models with brightmaps in GZDoom

by Nash » Thu Aug 09, 2012 4:09 pm

Cool trick, but yes, it does seem kind of hacky, putting it in the textures namespace. Since it is proven that the code is indeed capable of drawing brightmapped models, I wonder if it's possible to tweak GZDoom's code to add proper support for it?

Re: [Tutorial] Models with brightmaps in GZDoom

by Enjay » Thu Aug 09, 2012 3:44 pm

MaxED wrote:Have anybody made a request to add brightmaps to models "officially" (like, new MODELDEF or GLDEFS keyword)?
I know I requested it at some point in the past and there my be others who have done it.


The worry with this is that I guess it's "undefined behaviour" rather than an explicitly coded feature.

Re: [Tutorial] Models with brightmaps in GZDoom

by Springy » Thu Aug 09, 2012 1:22 pm

MaxED wrote:
Springy wrote:Nice will give this a try, I think this would be quite useful for others as well. Could it be stickied or put on the wiki as suggested by Blue Shadow?
Not sure about this. It's not an engine feature, it's more like a hack, so it's completely unsupported and may be broken in the future. Have somebody made a request to add brightmaps to models "officially" (like, new MODELDEF or GLDEFS keyword)?
Hmm yeah you made a good point, I'll have a look around see if there's tutorials for the "official way" if not, then guess I'll make a request. Either way I'll give your method a try.

Top