graphics

ACFTools+AC3D tutorial


My attempt to show how is it possible to make X-Plane models using AC3D editor and my ACFTools.
  1. Open AC3D Smiling
  2. Now you shall use Side (ZY) view to draw a shape of revolution object to be imported. You may wish to draw it as Polyline:

    Object shape

    Note that the shape polyline has exactly 9 vertices and it is closed.
  3. Put your shape a bit off-center. You will be revolving it around Y axis, so just create small gap between shape edge and Y axis:

    First gap

    Later you will see the meaning of this gap Smiling
  4. Select your shape as group, and do "Object -> Revolve...". Enter with 180 degrees, Y axis and 11 segments:

    Revolve dialog

    Wow, look, you got half of your object:

    One half

    By default it has flat surface but you may wish to set a smooth one like I did.
  5. Go to Side (XY) view. Select your object and "Edit -> Duplicate" it. Then flip it on X axis. Now align both halves so they again have a very small gap between them. DO NOT SNAP THEM TOGETHER!. Then do "Object -> Merge". You should get this:

    Both halves

    Note "move to" coordinates. X is 0.53 instead of 0.5! That 0.03 difference on both sides of Y axis makes that desired gap.
    You may be wondering why to have yet another gap here? Well, 18 vertices in each section are supposed to be sorted automatically in counter-clockwise order. If you have overlapping vertices like in this case, algorithm treats vertices with same coordinates as being one vertex and thus messes everything. Sorry.

    VERY IMPORTANT: switch to vertex selection mode. You should see exactly 216 vertices. If you do not have 216 vertices you're terrible wrong, start over!!!
  6. At this moment you are ready for the most boring part. Split AC3D-generated object to sections that X-Plane would accept. Now a bit of theory. X-Plane treats all aircraft models as 3D objects with 12 sections with 18 vertices each one. If you try to feed it with everything else, surface will be mismapped. Thus you NEED to cut your AC3D object into 12 sections with 18 vertices each one. And 12 * 18 = 216, got it? Smiling. OK, to start section splitting you need to remove all surfaces. Sorry again Smiling "Surface -> Remove surface only". Now hurry up, "File -> Save" as original.ac.
  7. Let the pain begin. >%E~
    Go to Plan (XZ) view. Select 18 vertices:

    Section #1

    1. Copy these vertices to clipboard. Delete them.
    2. "File -> Save" original.ac
    3. "File -> New..." and paste 18 vertices from clipboard.
    4. Save as section01.ac

    Now reopen original.ac. Select next 18 vertices:

    Section #2

    Do the same steps as for first section, but now save it as section02.ac. Unless you are screaming in anger extract all the 12 sections in this way. Calm down, it's not that boring when you start to do it Smiling
  8. Understood the meaning of the first gap? If you added none, when you try to select 18 vertices you select 48 each time you reach center, as you select some central vertices from other sections.
  9. Supposing you were patient enough, at this moment your original.ac is empty and you have sections 1 to 12 in separate .ac files. Now merge them back. No, I'm not kidding. Merging all sections in sequence from 1 to 12 puts them in the order that X-Plane accepts. OK, I think that there is no need to explain how to "File -> Merge.." 12 section files in one. The result will look the same as original.ac (rest in peace) but internal order would be the right one. You should now "Object -> Merge" & Group 216 vertices (assure that you still have 216!). Call your group "body[45]", it will import to X-Plane as "misc. body 1":

    Final result

    Rescale this object to any size you want (in feets) and save all the stuff as importable.ac.
  10. OK, now go and merge importable.ac in any model of yours using ACFTools:
    acftools -e -acf C:\X-Plane\Aircraft\UPHO.acf -txt UPHO.txt
    (prepare UPHO.txt to work with) acftools -me -ac3d importable.ac -txt UPHO.txt (merge! don't worry about warnings)
    Fine! Next step is to edit UPHO.txt in your favorite text editor (I use Write) to mark that "misc. body 1" was added:
    1. Seek for PARTS_WingBodyGear_part_eq[45] and make it "= 1"
    2. Seek for PARTS_WingBodyGear_body_r[45] and set it to desired radius of your body (or Plane-Maker will mess the things up)
    3. Seek for PARTS_WingBodyGear_body[45][0][0]. This was your section01.ac. Remember the second gap? Remove it setting all the X values for 1st section to 0. Remember that each section has 18 vertices, so, don't harm neighbor ones!
    4. Seek for PARTS_WingBodyGear_body[45][11][0]. This was your section12.ac. Make the same as for section 1 Smiling
  11. acftools -g -txt UPHO.txt -acf test.acf
    (generate test.acf from edited .txt file)
    Finally open test.acf in Plane-Maker and see what the heck you just did =D
    It may be a bit broken, just fix it in Plane-Maker as normal body.

Share/Save/Bookmark

stas's picture
stas » May 10, 2006 » 01:22

Duke3D D.M. cheater


E1L2 near the dark room elevator: enhanced brightness
E1L2 near the dark room elevator: enhanced brightness

Do you consider yourself a good Duke3D deathmatch player?! Neither I do Eye-wink
For our luck, 3D Realms released Duke3D source code under GPL license at April 1st, 2003. No, I'm not fooling you! Since then, several people are enhancing this classic game, extending it's portability and adding some cool features to it. There are ports like icculus Duke3D port and JonoF's Duke Nukem 3D Port. So, with the source in my hands, I decided to make my own version. I called it Duke Nukem 3D v1.666. It is 100% compatible with the original MS-DOS Duke3D v1.5, and adds some cheats into deathmatch games:
  • Omniscience. You can peek at your opponents screen (using "Coop View", which now works even in the deathmatch mode!), and hear the sounds they make (you may hear them scream when hit at the long distances). You are able to see in darkness all the time, without using the night vision goggles, and without that ugly green screen tinting. You'll know when your opponent drops a holoduke, so you won't waste your ammo with it. And finally, you won't see that confusing steroids trail anymore!
  • Aim bot features. Aim bot (which can be turned off!) will track the closest visible opponent automatically. If you're close enough to your opponent, aim bot will also try to kick him while shooting. And it will auto-activate med kit when you get shot! Another cool feature associated to the aim bot is the auto-jetpack. Jump from a high place, and jetpack will be activated automatically when you're close to the ground.
  • Practical enhancements. When you find a new weapon, game won't switch to it automatically. You will always see which weapon your opponent is using, without activating the "Weapon Mode". Demo viewer doesn't switches camera automatically anymore. And game doesn't prompts you with credit screens/animations when started or finished.
  • DNCROZ during multiplayer?! Even this is possible in the cheater! The only problem is: both players should type it when the game is paused, or the "Out Of Sync" condition occurs. Other cheats that work in the multiplayer game are: DNSCOTTY###; DNCOORDS, DNVIEW; DNRATE; DNBETA; DNTODD; DNSHOWMAP; DNALLEN; DNDEBUG.
  • ".ANM viewer". Just type DNENDING while playing, and the game skips right to the episode ending video Smiling
Please note that the most useful cheat, the aim bot, only works fine with the game's internal AI opponents (A.K.A. "PP bot", started with "duke3d.exe /q2 /a" command). It may work in the acceptable way on crossover 100 Mbps LAN connection (peer-to-peer), although... And the worst thing ever: Duke3D v1.666 will only work on real DOS mode, so forget it if you only have Windows NT/2k/XP (anyway, those who play Duke3D over network frequently do have Windows 9x installed for this specific purpose Smiling)
Still interested?! It's a bit difficult to install, though... First, you need to have the original Duke Nukem 3D v1.5 installed. Second, backup it!!! After that:
  1. Unpack the DN3D1666.ZIP into your Duke3D installation directory, overwriting files.
  2. Configure Duke3D. Run SETUP.EXE, and go to "Controller Setup", then "Choose Controller Type", and then select "Keyboard and External". After this, select "Setup External", "Change External Program Name", and type "DUKE3D.EXE" there. Now you can save config, but DON'T LAUNCH A GAME YET!!!
    (NOTE: it would be great if you disabled Turn_Left and Turn_Right keyboard bindings, although, if you don't plan to use "AutoAimSelfCalibrate" setting in DUKE3D.666 file or won't use Auto-Aim feature at all, you don't need to do this).
  3. Now, edit the file DUKE3D.666. Open it in your favorite editor (EDIT.COM Eye-wink), and you'll see that it's almost self-explanatory. Note that your mouse is now configured by this file, any SETUP settings will be ignored! Also note that default mouse settings for v1.666 imitates the default settings for the original Duke3D v1.5.
I also recommend you to read the "DN3D1666.ME!" file, supplied in the download package.

Relative project: GRP packer plugin for the Total Commander.

Sorry, no source code is available for direct download. However, if you're interested in it, contact me and I'll provide it to you! Thus, GPL license of the original Duke3D source wouldn't be harmed, I beleive...

Share/Save/Bookmark

stas's picture
stas » May 9, 2006 » 16:47
addon » C » cheat » game » graphics » hack » network » software

I.E. 'hidden image' maker

sample masked image

If you are using Internet Explorer (any version able to load this page Smiling, just select the above image (or go to "Edit => Select All", or press Ctrl-A). You may see a watermark with white letters forming a word "TEST". This only happens in IE, due to the specific way it masks the selected images to show their selected state. Firefox, for example, simply tints the image with bluish color. There are lots of jokes one can make using this simple principle. For example, all images on your homepage may have some "subliminal" messages. Adobe PhotoShop is perfectly suitable to make such 'Hidden Images' by hand; in fact, my inspiration was a tutorial made by Matt Kment to do this. But if you are too lazy and/or do not have PhotoShop installed (UN*X users, for example), you can use this small program I wrote in Perl to automate the "steganographic" process. I wrote it using ImageMagickTM library (so it's required to successfully run the program). It is a command line program, but it is simple enough to use, and it has an advantage to be integrable into your own scripts/programs (you can even setup your server to embed your company logo into all graphics of your site, but this will overload the server's CPU and RAM too quickly). I called my program "Internet Explorer Mask'O'Matic". Take a look at it's startup screen:
Internet Explorer Mask'O'Matic v1.0 by Stas 
Grab yours at http://sysdlabs.hypermart.net/ Eye-wink

Inspirated by some mad stuff by Lem0nHead
Based on Photoshop 'Hidden Image' Guide (http://www.atomicwienerdog.com/ot/)
made by Matt Kment & suggested to me by xfalmp


ERROR: please give us --visible


* Usage: MaskOMatic.pl
* Options (note that you can use syntaxes like --vis= --hid -out -p):
--visible filename of image normally seen (required)
--hidden filename of image seen when selected in IE (required)
--output filename to write out, format is selected automatically
using suffix provided (required)
--percentage float value between 0 & 100; how much of hidden appears
(optional, defaults to 50%)
--quality JPEG/MIFF/PNG compression level (optional, DON'T USE!)
--contrast flag, internal contrast reduction (optional)
--test filename to dump preview of selected image (optional)

* Notes:
# Visible & hidden images doesn't need to have same size, when size
doesn't matches then hidden image is rescaled using Lanczos filter
# A huge set of image formats is supported (JPG, GIF, PNG for example)
but I strongly advice you to write output in loseless format *only*
(BMP, PNG, TGA) and *then* fine-tune contrast/brightness & save
compressed in your favourite image editor (like GIMP)

* Example:
MaskOMatic.pl --vis bush.jpg --hid death.jpg --out sublim.bmp
Only 3 options are obligatory: --visible, --hidden & --output. You can abbreviate them as -v, -h & -o, respectively. "Visible" is an image that user sees by default. "Hidden" is what user sees when he/she selects the image. And "output" is the resulting image you can embed into your pages. It is also possible to use the "--test" option to preview the selected state of the output image without starting Internet Explorer. If it looks bad, you may play around with "--percentage" option, which specifies the 'weight' of the hidden image. The higher is this value, the greater is the hidden image visibility. If that's not enough to hide your image well (some things are pretty difficult to hide!), you can try to tune the output image with "--contrast" option, but I suggest you to use some GUI program to do that as you get the visual feedback instantly. I also suggest you to always save your output in the non-compressed lossless format (like BMP, TGA, TIFF), and then fine-tune the compression in some program specialized in it (GIMP has a nice compressor with visual feedback).

Alternatives:

Share/Save/Bookmark

stas's picture
stas » May 5, 2006 » 17:47

ASCII code explorer

Designed to be the freakin' best ASCII table viewer for DOS platform, LOL!!!

ASC.EXE screenshot

It accesses the console font bitmaps directly from the BIOS and amplifies them 16 times (bitmaps in a hex form are shown, also). User can navigate the character map using his/her mouse or the cursor keys.  For every character, it's ASCII code in decimal, hexadecimal & binary formats is displayed. One can also build strings of ASCII characters, just like in Windows' "Character Map". Foreground/background colors for the character, magnified character & character string are also editable through the GUI (there are 16 colors available for background, instead of default 8 Smiling. It's pretty useless today, but helped me a lot to develop my elder programs. By the way, this ASCII explorer was written using QBasic 4.5...

Share/Save/Bookmark

stas's picture
stas » April 20, 2006 » 01:52
XML feed