|
Afaik
#8132 posted by necros on 2008/12/08 08:03:47
yes. it, of course, won't animate without code though. (not sure about the sprite frame group though)
I Wonder
#8133 posted by madfox on 2008/12/08 09:06:00
After several attempts I succeeded in making a sprite in quake.
First I had to convert the brushes in the sprite upside down, as I only got an upside down sprite in game.
Then I tried, as you said necros, it identically to a model, but then I got it wrong as it isn't a model that wants to attack me.
so I probably overlooked something in my coding text, and decided to make them all the same frame.
That worked, although it isn't a nice code.
$cd /raid/quake/id1/models/can
$origin 16 16 24
$base base
$skin base
$frame 1 2 3
void() can_stand1 =[ $1, can_stand2 ] {ai_stand();};
void() can_stand2 =[ $2, can_stand3 ] {ai_stand();};
void() can_stand3 =[ $3, can_stand1 ] {ai_stand();};
void() model_can =
{
precache_model ("progs/can.spr");
self.solid = SOLID_BBOX;
self.movetype = MOVETYPE_NONE;
setmodel (self, "progs/can.spr");
setsize (self, '16 16 -24', '16 16 40');
self.th_stand = can_stand1;
self.th_walk = can_stand1;
self.th_run = can_stand1;
self.th_pain = can_stand1;
self.th_die = can_stand1;
walkmonster_start ();
};
Screenshots don't work with sprites:
http://members.home.nl/gimli/sprite.wmv
#8134 posted by Preach on 2008/12/08 11:43:21
You can simplify that code a bit, and take out the monster AI functions which don't suit a trash can well.
void() can_stand1 =[ 0, can_stand2 ] {};
void() can_stand2 =[ 1, can_stand3 ] {};
void() can_stand3 =[ 2, can_stand1 ] {};
void() model_can =
{
precache_model ("progs/can.spr");
self.solid = SOLID_BBOX;
self.movetype = MOVETYPE_NONE;
setmodel (self, "progs/can.spr");
setsize (self, '16 16 -24', '16 16 40');
self.think = can_stand1;
self.nextthink = time + 0.1;
};
Notice that the $1-3 can be replaced with the numbers 0 to 2, the corresponding numbers for the frames in your model. The ai_stand() function is not needed, so we delete it.
Also, you don't need to run all the walkmonster_start stuff just to get it to run can_stand1, which is what is doing the animation here. If you just set that function to be the entity's .think, and set the .nextthink to time + 0.1, then in 0.1 seconds time the can will run can_stand1.
For a more detailed explanation of what is going on with a line like:
void() can_stand1 =[ $1, can_stand2 ] {ai_stand();};
you might want to read the second half of http://www.quakeexpo.com/booth.php?id=32&page=186
I know I wrote it myself, blowing my own trumpet and all, but it's easier for me to find my own articles on the matter.
Quake (1) .map Export From Blender
#8135 posted by Spirit on 2008/12/08 14:52:16
Blender seems like a great tool to create terrains and other "advanced" brushwork. Here is a long but easy way to get a Quake 1 map from the Q3 .map export.
-First a dirty hack. Edit the export_map.py. A bit below "# Split mesh into connected regions" change "write_face2brush(file, f)" to "write_cube2brush(file, face_group)". I suggest saving under a new name (top of the file) to avoid confusion.
-Create your stuff from single brushes. You can use the first brush as base.
-Move vertices around happily (with snapping I suggest) and don't forget triangulation on faces that need it (if you get gaps and "wrong" brushes exported, this will be the reason). Ctrl-T and Ctrl-Shift-T (for the other diagonale) do this. You will need to do it on faces that create a new edge.
-When you are done, export: File -> Export -> your q3 script. If you use 64 for scale, the first brush will equal a 128� brush, 32 will get you 64� and so on. I think the Grid Snap is a good idea, haven't played with it yet.
-Open the .map in QuArK (Quake 3). Copy the brushes into a Quake 1 .map. Save that .map.
-Open the Q1 .map in a texteditor and replace ".00000" with "" if you feel like it. You must replace all " 0 1 1 0 0 0" with " 0 1 1". (If there are 0.xxxxx values, well those too. I haven't really figured out where those sometimes sneak in yet.)
Done!
I Forgot
#8136 posted by Spirit on 2008/12/08 15:01:47
Before exporting, make sure to select all brushes (a).
Madfox:
#8137 posted by metlslime on 2008/12/08 19:27:32
First I had to convert the brushes in the sprite upside down, as I only got an upside down sprite in game.
This is actually a bug; sprites are drawn upside-down in glquake and a lot of engines that are based on glquake.
Sorry
#8138 posted by necros on 2008/12/08 19:59:05
i didn't really explain properly:
$frame 1 2 3
void() can_stand1 =[ $1, can_stand2 ] {ai_stand();};
void() can_stand2 =[ $2, can_stand3 ] {ai_stand();};
void() can_stand3 =[ $3, can_stand1 ] {ai_stand();};
should be
void() can_stand1 =[ 0, can_stand2 ] {ai_stand();};
void() can_stand2 =[ 1, can_stand3 ] {ai_stand();};
void() can_stand3 =[ 2, can_stand1 ] {ai_stand();};
all those $frame1 $frame2 crap does is start counting up from 0 and assign a number, so when you do like
$walk1 $walk2
$run1 $run
$walk1 = 0
$walk2 = 1
$run1 = 2
$run2 = 3
and your model would have the two walk frames as the first two frames, and the two run frames as the last two. (they have to be in that order)
Oh
#8139 posted by necros on 2008/12/08 19:59:52
and as far as i can tell,
$cd /raid/quake/id1/models/can
$origin 16 16 24
$base base
$skin base
is completely useless and doesn't do anything.
it was only there when id compiled the old models using their old tools. now with qme and such, that isn't necessary.
Splendid!
#8140 posted by madfox on 2008/12/09 00:35:51
Thanks for your answers, it was really a mystery to me how to get sprites inside Quake.
metlslime - I already thought I did something wrong. FimG shows all the other sprites right, but it is something to remind.
preach - that works great. I have already your tutorial on my disk, but reading it again won't do me harm. It gives more insight in the statements.
necros - thanks, that makes the script shorter and reasonable to use.
For now the sprite runs good, but I can't place it on buttom. If I use:
setsize (self, '0 0 0', '12 12 24');
the can appears excact on the half.
Alright
#8141 posted by madfox on 2008/12/09 00:48:35
found it. placing them better in Quark.
I Have A Wish For Christmas
#8142 posted by Spirit on 2008/12/09 14:16:31
Someone could do a cheatsheet image (or webpage) showcasing a multitude of settings and setting combinations from aguiRre's Light.exe.
RE:Blender:
It sure is fun (especially if you are used to a crippling editor like QuArK) but the need for manual triangulation ruins half of it. Maybe there is an automatic way, I haven't found it yet. It would be great if concave brushes would automatically split into smaller convex ones, heh. Also if there was a way to split meshes into cubes, woohoo. There are some nifty generators, maybe there is a way. r_speeds be damned!
Using a pure 3D "interface" surely feels different and to me it also inspires.
http://www.quaketastic.com/upload/files/screen_shots/spirit_blender1.jpg
http://www.quaketastic.com/upload/files/screen_shots/spirit_blender2.jpg
#8143 posted by JneeraZ on 2008/12/09 15:25:33
"It would be great if concave brushes would automatically split into smaller convex ones, heh."
I tried to add that feature to ToeTag for ages - it's not as easy as it sounds. Would be hella nice though.
Doomsp8?
#8144 posted by madfox on 2008/12/09 20:06:45
H� Willem, I was surprised to see that screenshot on quaketastic.
I'm already a long time mapping on the Doom's Hangar.
So I was quiet surprised seeing someone who had actually done it.
Texture Filename Restrictions
#8145 posted by Spirit on 2008/12/14 13:43:15
Where is the 15 character texture name limit set in Quake? Is it the WAD format, the compiler tools, the engine(s)? How hard would it be to get rid of it?
#8146 posted by JneeraZ on 2008/12/14 17:43:07
The WAD format is a huge part of it. Because of that, to change it, you'd have to change all of the engine and tool code that references WAD files.
Thanks
#8147 posted by Spirit on 2008/12/14 18:56:40
Damn, that is one restriction I just cannot comprehend.
#8148 posted by JneeraZ on 2008/12/14 19:09:15
You should look into how MDL files are stored and de-coded sometimes. Now THAT'S a mind bending nightmare.
Spirit:
#8149 posted by metlslime on 2008/12/14 23:16:18
a lot of quake tech was sufficient for what id wanted to do, so they never bothered to worry about it.
Willem
#8150 posted by Lardarse on 2008/12/15 12:11:20
Stores vector min, max; as floats, then the vectors for everything else are stored as unsigned bytes, with 0 being the minimum possible value for the axis and 255 being the maximum possible.
Did I miss anything?
#8151 posted by JneeraZ on 2008/12/15 12:29:04
"Did I miss anything?"
That's the overall concept, yes. Have you written code to actually parse that out of a PAK file? It's a nightmare.
Heh
#8152 posted by Spirit on 2008/12/15 12:59:25
My "Blender fix" will leave you with many many MANY duplicate brushes. I obviously did not know what I was doing. Well, I don't think anyone except me uses it but still, just be aware so far.
...
#8153 posted by gb on 2008/12/19 12:10:00
Someone could do a cheatsheet image (or webpage) showcasing a multitude of settings and setting combinations from aguiRre's Light.exe.
AguirRe?
And don't forget to take the screenies in software AND GL, because especially minlight using areas look vastly better in software (as do torches, candles etc). This goes as far as walls appearing to be a different color.
:-P
Ahah
#8154 posted by ijed on 2008/12/20 01:20:02
But all that depends on which monitor you'll be looking at the pictures on, and what it's settings are.
Sheer Laziness
#8155 posted by Mike Woodham on 2008/12/21 20:19:50
1) I have a complex door (in terms of brushwork) and I want to duplicate it as a set of brushes. How can I change an entity into brushwork?
2) I have a map that is on the limits (marksurfaces, clipnodes etc) and one of my complex doors does not appear in-game. Common problem?
Mike
#8156 posted by HeadThump on 2008/12/21 23:13:57
call the .map file up into a text file:
{
"spawnflags" "2048"
"classname" "func_door"
"targetname" "t34"
"angle" "-2"
"wait" "-1"
"speed" "50"
"sounds" "4"
"message" "These bars are opened elsewhere..."
{
( -304 904 -192 ) ( -304 880 -192 ) ( -304 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -272 904 -192 ) ( -304 904 -192 ) ( -304 904 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -272 880 -192 ) ( -272 904 -192 ) ( -272 904 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -304 888 -192 ) ( -272 888 -192 ) ( -272 888 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -304 880 -128 ) ( -304 904 -128 ) ( -272 904 -128 ) MET5_1 0 0 0 1.000000 1.000000
( -272 904 -256 ) ( -304 904 -256 ) ( -304 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
}
{
( -368 904 -192 ) ( -368 880 -192 ) ( -368 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -336 904 -192 ) ( -368 904 -192 ) ( -368 904 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -336 880 -192 ) ( -336 904 -192 ) ( -336 904 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -376 888 -192 ) ( -344 888 -192 ) ( -344 888 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -368 880 -128 ) ( -368 904 -128 ) ( -336 904 -128 ) MET5_1 0 0 0 1.000000 1.000000
( -336 904 -256 ) ( -368 904 -256 ) ( -368 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
}
}
eliminate this part first:
{
"spawnflags" "2048"
"classname" "func_door"
"targetname" "t34"
"angle" "-2"
"wait" "-1"
"speed" "50"
"sounds" "4"
"message" "These bars are opened elsewhere..."
go to the bottom of the entity and eliminate the last curvy bracket:
....
( -336 904 -256 ) ( -368 904 -256 ) ( -368 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
}
}
so it looks like this:
{
( -304 904 -192 ) ( -304 880 -192 ) ( -304 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -272 904 -192 ) ( -304 904 -192 ) ( -304 904 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -272 880 -192 ) ( -272 904 -192 ) ( -272 904 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -304 888 -192 ) ( -272 888 -192 ) ( -272 888 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -304 880 -128 ) ( -304 904 -128 ) ( -272 904 -128 ) MET5_1 0 0 0 1.000000 1.000000
( -272 904 -256 ) ( -304 904 -256 ) ( -304 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
}
{
( -368 904 -192 ) ( -368 880 -192 ) ( -368 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -336 904 -192 ) ( -368 904 -192 ) ( -368 904 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -336 880 -192 ) ( -336 904 -192 ) ( -336 904 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -376 888 -192 ) ( -344 888 -192 ) ( -344 888 -256 ) MET5_1 0 0 0 1.000000 1.000000
( -368 880 -128 ) ( -368 904 -128 ) ( -336 904 -128 ) MET5_1 0 0 0 1.000000 1.000000
( -336 904 -256 ) ( -368 904 -256 ) ( -368 880 -256 ) MET5_1 0 0 0 1.000000 1.000000
}
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|