Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
ssv_170379

HD sprites from Doom 3

Recommended Posts

Edit: Oh damn, I misread the title and didn't see the "Doom 3" part, I think I need glasses now. :P

Share this post


Link to post

About sprite positioning. It's gonna be a long story.

Initially i positioned them visually using marks, generated by Blender (3d application) They are representing zero point for sprite, you may see them here http://s30.postimg.org/4esamgt9d/Screenshot_07312014_07_07_05_PM.png red and green rectangles in bottom left part of the image. Blender generates sequence of sprites, where those marks always have equal offset from top-left corner, but when sprites are auto-cropped, offset is changing depending of sprite's shape (blue figure on a screenshot), and after that differs for each sprite.

But when project evolved to "smooth" version, number of sprites doubled and this part of work became quite annoying, so I decided to automate it beyond just generating zero marks. First insight came when I accidentally opened auto-cropped sprite in GIMP (2d application). GIMP issued a message, saying that the image has offset value in metadata and should they be applied? i thought then "Hmm, the amount of cropped pixels is stored somewhere within a file, maybe there's a way to use it somehow".

I read documentation for Imagemagick (http://www.imagemagick.org/script/command-line-options.php and http://www.imagemagick.org/Usage/) and found a way. Here's the script

mogrify -trim -repage -320-510\! -define png:color-type=6 *.png
identify -format "sprite %t, %w, %h \n{\n Offset %X, %Y\n XScale 4\n YScale 4\n}\nremap %t %t\n\n" *.png > TEXTURES.txt
mogrify -strip +repage -define png:color-type=6 *.png
sed -i 's/-//g' TEXTURES.txt


mogrify and identify are parts of Imagemagick and sed is a text processing utility.

mogrify is a batch-processing tool, which:
-trim auto-crop images, cutting off the black borders (and generating offset, don't forget this)
-repage -320-510\! Our previously generated offset is not a zero point actually, but only a position of top-left pixel of cropped image relatively to uncropped one. To calculate offset we need to subtract this offset from initial (uncropped) zero point coordinates, which are, as we remember, equal for all the sprites. In my case these coordinates are 320, 510. Repage offsets our image by these values with negative sign. \! means relative offset (otherwise previous offset values will be just ignored), so after that we got correct offset to zero point in our image metadata, but with negative sign.
The rest part of first line just saying that files have to be stored with RGBA8 color depth.

second line extracts data we need from all sprites in a directory and saves them to output file in format

sprite POS2A1, 112, 207
{
Offset -57, -202
XScale 4
YScale 4
}
remap POS2A1 POS2A1

sprite POS2A2, 144, 207
{
Offset -58, -202
XScale 4
YScale 4
}
remap POS2A2 POS2A2

sprite POS2A3, 171, 204
{
Offset -96, -201
XScale 4
YScale 4
}
remap POS2A3 POS2A3

...

which in fact is ready textures definition for ZDoom, except "-" signs prior to Offset values. It is long to explain this second line so here's the link to documentation, that explains all used variables like %t, %w and others http://www.imagemagick.org/script/escape.php

Third string removes metadata and offset from files, saving a little disk space.

The last thing to do is to eliminate negative sign from offset values, 4th line searches our generated file and removes all "-" symbols.

Together this script auto-crops all the sprites and generates correctly formatted definition file. Voila!

P.S.: my working system is Linux-based, but Blender, Imagemagick and GIMP are available for Windows too. The only part is not cross-platform is sed (which removes "-" signs), but I believe that Windows have it's replacement for this tool. Otherwise it is possible to use any text editor with "find/replace all" functionality.

Share this post


Link to post

http://www.filedropper.com/hdsmooth03_1

v.03 changelog
- Resorted (unfortunately) to 3xHD-sprites (was 4x) and non-square pixels to lower memory usage.
- ZombieMan, ShotgunGuy, Chaingunner and Pinky are now includes full 360 degrees turn (was 180 + mirroring) to prevent lefty-righty flips when viewed from opposite sides (Pinky does not holds any weapon, I know, but he have very irregular walk cycle)
- Changed inner structure of a mod, now everything contained in a single file. Please, remove previous versions before trying this one.
- Added: Mancubus, Cacodemon

See full README.txt inside archive

So yes, now we're only 3xHD, When it's all will be done, maybe I'll bring back 4x, but for now I predict that even with 3x sprites mod surely will grow up to 200 megs.

Some screenshots with new monsters
http://s13.postimg.org/xhao8822v/Screenshot_Doom_20140821_075047.png
http://s13.postimg.org/ybx7u99xj/Screenshot_Doom_20140821_075133_01.png
http://s13.postimg.org/lgp87huo7/Screenshot_Doom_20140821_075233.png

Share this post


Link to post

OOPS!!! By mistake I've put preview-quality sprites of Cacodemon in release file. I updated link in a previous post just now. Please, re-download.

Share this post


Link to post

Someone please explain, what is the difference here http://zdoom.org/wiki/Classes:Revenant

Raise:
SKEL Q 5
SKEL PONML 5

why not just SKEL QPONML 5 ?

Missile:
SKEL J 1 Bright A_FaceTarget
SKEL J 9 Bright A_FaceTarget

why not SKEL J 10 Bright A_FaceTarget ?

is there any reason to make 2 lines in these particular cases?

Share this post


Link to post

Nice sprites, but i really want to see a video of those, i ripped doom3 monsters before for my ultimate super doom3 wad...

Share this post


Link to post

ssv_170379
I asked around on ZDoom IRC about that and here's the thread about it:
http://forum.zdoom.org/viewtopic.php?f=2&t=46578

Apparently it was made this way because that how it was defined in the original Doom 2 - there was some quirk about it, but Zdoom came a long way since then and this way of definition is now irrelevant.

Share this post


Link to post

doomero-21, that's... just amazing. I'll record comparison video this weekend. For now I've added Revenant (with semi-transparent skin) and slightly changed lighting for all other models: added some ambient occlusion from ground and slightly darkened edges... and this is not the final point. Sprites need overall adjustments later.


Sinael, guess I just should not fix what works then.

Share this post


Link to post

http://vimeo.com/104818450 I made level with all altered monsters to record a video in one piece. Suddenly I can't make comparison video because demo records in this level falls out of sync when enabling/disabling mod. I think HD sprites takes more time to process which leads to some frame drops, and seems ZDoom's record/play demo functionality can't handle this situation correctly. So for now, only new version. Also Vimeo does not understands 35 fps, so it drops some frames too. Maybe I should stretch video to 30 fps before upload. Don't know.

Share this post


Link to post
ssv_170379 said:

http://vimeo.com/104818450 I made level with all altered monsters to record a video in one piece. Suddenly I can't make comparison video because demo records in this level falls out of sync when enabling/disabling mod.

The de-sync happens because you changed the monster behavior (with DECORATE).

Share this post


Link to post

Now make a demo of NUTS.WAD using them :-)

Seriously though, this is a great effort. It's the first time I recall a hi-res-anything actually including monster animations. Of course, the trouble is that it's limited to ports with hardware acceleration, but still, a major step forward, so at least we can get an idea of how hi-res sprites would look like. Most importantly, they don't even look half-ugly.

Share this post


Link to post

andrewj, maybe so. I've just made low-res version of my mod (to lower resources usage) and demo file synced perfectly with hi-res version. But anyway it's hard to believe for me. I have not changed whole timings, if Imp's melee attack was 22 ticks and 3 frames, it became 6 frames but still 22 ticks, overall duration have not changed. I've altered walk cycles somewhat, but not speed, so as for me, decorations must not interfere with this... but something does, maybe they. Should I recheck all the timings and make them exactly equal, including walk ones? maybe it somewhat related to phase changes, kind of: if original steps was aliquot to 4 but new ones to 3, maybe there's no common timings to jump to attack phase... or something. Need to check.

Or maybe split demo-level to several rooms, filled with only about 10 monsters of some kind, Probably this way divergence won't be so noticeable.

I'll check both versions giving preference to first one.

Maes, What is NUTS.WAD?.. browsing... Oh, my!.. Have mercy on my 5 yrs old CPU.

Btw at some point I've concerned direct placing of 3d-models to ZDoom, but think they'd were much more resource-consuming.

About ports. It's a good idea to make versions for other ports, supporting decorations. Zandronum? DEngine? I've not investigated this yet. For now I think it just requires to rewrite configs with different syntax, maybe change folder names or something like this.

I agree that idea is a very valuable outcome of this whole project.

Share this post


Link to post

If you are using only basic DECORATE functions, your mod should be compatible with all ZDoom family (Skulltag, Zandronum, ZDaemon, GZDoom etc.)

Doomsday however does not use DECORATE, and has its own format of definitions instead. It's not that moddable and I don't know if you can actually give mobs more frames in it, or even give it a higher res sprites at all.

Share this post


Link to post

andrewj, I tweaked decorate.txt here and there, fixed couple of things and made an experiment. I have set idle timings for pistol zombie for several seconds per frame. With this settings you can stand in front of him, but he'll notice you only when swaps idle frames (i.e. once in a several seconds). On the other hand if you shot him (or he hears shooting), he'll unfreeze immediately.

So it seems to be impossible to achieve exact behavior with classic monsters because with denser framerate they gain more possibilities to switch between states.

Possible ways to record synced modded/not modded demo is
- to split rooms (I have record my first video http://vimeo.com/102823215 without noticeable desync).
- to write decorate.txt, which preserves original sprites but uses more discrete timings.

If I missed something and there's more things needed to take into account, please correct me.

Share this post


Link to post
ssv_170379 said:
Salt-Man Z said:

You know what I'd love to see, though? Take those Doom 3 HD sprites, and down-res them into the pixelated Doom 1/2 aesthetic.

Salt-Man Z, it is possible, but good old handmade sprites looks crisper than low-res renders. Here's example: http://s14.postimg.org/tqa58za9d/aaa.png

This, please!

Share this post


Link to post

ssv_170379 said:


This would actually be pretty cool without any of the skin. Just a regular revenant with a sort of starcraft firebat theme going on.

Share this post


Link to post

I think that
a)Skin part on the revenant looks bad in action. I think you should remove it.
b)Attack effects on monsters (that rocketlauncher splash on Cyber) should be alphaed instead into a prettier effect, because it looks ugly.

Also I wouldn't worry about large size - Q4 weapon pack has gone above 200 megs and worked alright.

Share this post


Link to post

Jaxxoon R, too many situations are possible where such corpses will intersect with walls or hang in the air.

Sinael
a) So be it!
b) Yes, Mancubus also suffers from this. There's something more complicated needed than just alpha, maybe kind of volumetric material. Or utilize muzzle flash sprites like in original Doom 3. I'll make research on this, but not today. Most likely I'll update them in a next release after adding couple of new monsters.

Share this post


Link to post

Version 0.46 http://rusfolder.com/41645111
Fleshless version of Revenant: removed semi-transparent meat from bones.
Changed shading for Shotgunner and Lost Soul

Introducing experimental Low-res branch (file LD_Smooth.pk3 included in release). Pixel scale in this pack is equal to original sprites.

Share this post


Link to post
ssv_170379 said:

Introducing experimental Low-res branch[/b] (file LD_Smooth.pk3 included in release). Pixel scale in this pack is equal to original sprites.

Awesome. I'll have to give this a try now.

Share this post


Link to post
ssv_170379 said:

Introducing experimental Low-res branch (file LD_Smooth.pk3 included in release). Pixel scale in this pack is equal to original sprites.

I am sure this is awesome. However, I am not that much into GZDoom. Is it possible that you provide these in a vanilla-compatible format, i.e. as a PWAD?

Share this post


Link to post

fabian I searched about what is Vanilla and how to modify it. So far I have found, that
- Vanilla is a name for original Doom executable.
- Closest to Vanilla port is Chocolate Doom...
- ...which supports editing with DeHackEd (or it's successor WhackEd).

I launched WhackEd, it can write and read text files, which is very good because I'll be able to convert offsets data from texture defs to WhackEd's format.

But then I stuck. Seems DeHackEd and WhackEd are both limited to strict number of animation states per whole game. http://www.aspectsweb.co.uk/dehacked/deh06.html I tried to create a frame beyond this numbers, but WhackEd said "List index out of range" and refused to accept this frame.

I'm new to Doom modding, so maybe do not know some things. I'll return to this topic later, and hopefully find a way. If someone know about how to get around this limit, please help.

Is there a thread like a "noob questions"? I should ask there then.

Share this post


Link to post

im glad that you decide to remove the pseudo skin of revenant honestly it looks ugly when they add the D3 revenant in gzdoom and dont remove the ugly fake skin and really make it looks like the revenant its wearing pijama, leaving the revenant in bare bones was the right way to go.

i want to download the wad but.. i hope this dont mind you but i dont understand the website where you upload the wad, anyone can help me where i should click to download the wad?

thanks

Share this post


Link to post

Only way for Vanilla compatibility - to recreate monster animations with close ammount of frames. In Doom 2 you can get a bit more frames for other monsters by butchering Nazi monster (popular way), or cutting on Archvile (highest ammount of anims) and decorations.

However I wouldn't bother with vanilla support - most people that play it prefer vanilla monsters as well, so it's not like monster mod would be in demand there.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×