Digital Paint Discussion Board
Development => General Development => Topic started by: Zorchenhimer on November 21, 2008, 12:42:46 AM
-
I originally was gonna release this alongside Abandon All Hope, but I have a feeling it's gonna be a while before that. So I decided to release this now. What it does is 'converts' all the specified textures in a map to use Phong shading. Readme is included as well as the source. Hope someone finds a use for this.
phongScript.zip
phongScript_v1.1.zip
phongScript_v1.2.zip (http://www.zorchenhimer.com/pub/phongScript_v1.2.zip)
More bugs fixed
Perl Version
phong_perl.tar.gz (http://www.zorchenhimer.com/pub/phong_perl.tar.gz)
Any comments and suggestions are welcome.
-
Thanks a ton! Very useful for some of my maps :D
I tried to compile it on linux but ran into a few problems, so I edited main.cpp accordingly and compiled a linux version. An interesting problem was that the pause function didn't work, so I changed it to use getchar(); instead and it ran fine. Wierd. Also, the linux version is only 16.7kb, considerably smaller than the windows EXE.
Attached is the edited main.cpp and the compiled linux version.
Also, whats with it creating a huge temp file full of the characters "10" repeated for ages, then not clearing up after itself?
-
Huge temp file? It shouldn't be. Is that on my version, or your Linux version? It should be writing directly to the new file.
And I didn't think that the pause() function would work as is on Linux. Read a bunch of issues with that. But it was better than using system("pause"). :P
-
(http://uts.cc.utexas.edu/~ifex534/phong.gif)
I found this rather relevent for this discussion.
-
Pause function does in fact work anyway, but it doesn't work if you enter the wrong map name, which also results in the huge temp files. You may want to fix that.
-
i agree with knack, this image helped me understand the conversation in ways no one can understand =]
-
Haha. I haven't seen that show in a looooooong time.
Anyway, I uploaded an updated version. Fixed a few bugs. Theres still a few more, but I'll fix them later.
-
More bugs fixed. Updated first post.
-
looka awsome zorch,.you freaken rock
-
So, I decided to learn Perl over the weekend. After I did, I tried to rewrite this program in Perl. I shaved off a little under one hundred lines from the source. :D
I'll post it here when I get around to uploading it.
Also, ViciouZ. This script fixes the issue the C++ version was having with your map. If there aren't enough sets of digits, it adds them (hopefully).
For those of you who don't know what this script does, this should help:
Before
(http://pics.zorchenhimer.com/phong-before.jpg)
After
(http://pics.zorchenhimer.com/phong-after.jpg)
-
oh wow, I was about to come in this thread and ask what it actually does...But that looks sweet.
-
nice!
-
Perl Version
phong_perl.tar.gz (http://www.zorchenhimer.com/pub/phong_perl.tar.gz)
Bump'd.
Feel free to point out any issues. :P