Author Topic: glow points  (Read 15217 times)

0 Members and 1 Guest are viewing this topic.

Offline Kitsune

  • 27
Ahah!

Discovered what was causing it to crash.
I went into the Hud settings and disabled everything, then slowly added stuff.

The Lead Indicator is apparently the problem here.

Every time I tried to activate it, boom.  Desktop.

Here's screens.




And yeah, you did kill something in the shields.  I hear the buzz of a hit, but there's zero protection or appearance going on there.

Also, does anyone else hear problems with the sound?  Or notice how things run slower than the normal game?
~Space Kitsuné
6-Tailed RPG Nut.

"Why the hell don't we have any missles on this damn boat?!"
"But Sir, we have Tempests, Rockeyes, and unknown bombs."
"Like I said ensign, 'Why don't we have any missles on this damn boat?!"

"I went to a fight last night and a hockey game broke out."  -Groucho Marx

 

Offline Grey Wolf

Kewl. I never used that damn thing anyway. Fix the shield problem and this'll be a great SC alteration....
You see things; and you say "Why?" But I dream things that never were; and I say "Why not?" -George Bernard Shaw

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
updated it, don't know why what I did to fix it fixed it, but it did,
I moved the new parts of the polymodel typedef to the very end, seems to have fixed everything.

ok, beta test this for a while,
and Inquisitor, talk to me about CVS :)
« Last Edit: June 23, 2002, 09:09:12 pm by 57 »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Grey Wolf

Woot!

Now we just have to combine this with Komet's MOD and the fighter beams and I'll be real happy....
You see things; and you say "Why?" But I dream things that never were; and I say "Why not?" -George Bernard Shaw

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
ok now what is everthing everybody wants,

float fov
float time_on  //in ms
float time_off //in ms
float time_displacement //amount of time to add to timestamp in ms for things like lights that blink in sequence
subsystem //an optional subsystem to link this to
dynamic // places a light at it's position
     // these only set if dynamic is true
     float intensity;
     float r,g,b;
     float rad1, rad1_squared;
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kitsune

  • 27
Question, what was different in the model pof's though?
~Space Kitsuné
6-Tailed RPG Nut.

"Why the hell don't we have any missles on this damn boat?!"
"But Sir, we have Tempests, Rockeyes, and unknown bombs."
"Like I said ensign, 'Why don't we have any missles on this damn boat?!"

"I went to a fight last night and a hockey game broke out."  -Groucho Marx

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
in the updated file I just uploaded, I don't think anything, but I just included it so people who havn't DLed the first one would have the files, now I've just uploaded a new update that includes two more models with glow points (herc and medusa), they need some serius tweakage but they should show you what is posable
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Grey Wolf

Purdy....
I'd download, but my computer is fu>
You see things; and you say "Why?" But I dream things that never were; and I say "Why not?" -George Bernard Shaw

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
quick tutorial for adding glow points as I have it set up now,
1) make a copy of the ship
2) open the origonal up in PCS
3) erase the existing fuel stuff (thruster glows)
4) make a new thruster
5) add one or more glow points
6) were it says "$engine_subsystem=$engine01" replace with "$glow_texture=$"insert texture file you want for the glow here
7) position the glow points, all glow points in this "thruster" are going to use the same texture
8) make as many new thrusters (glow banks) as you want were is says "$engine_subsystem=$engine##" replace with "$glow_texture=$the_glow_texture_for_these_glows", with as many glow points as you want (within reason)
9) save the POF
10) open it in a hex editor
11) go to the word "FUEL" and change it to "GLOW"
// optional intstructions for getting the origonal thruster glows back
12) open the copy of the file
13) in the copy look for the word "FUEL"
14) select the entire chunk (everything untill the next chunk, probly be SHLD), then copy and paste it just before the new GLOW chunk in the other file
//end optional instructions
15) save the file (not the copy, don't give a damn about the copy now)
16) open FS and select the model in the tech room

it should be showing the new glow points you made, now go to a mission with that ship and see if it works there
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Grey Wolf

Where can we get HEX editors? I.E. what do we use?
You see things; and you say "Why?" But I dream things that never were; and I say "Why not?" -George Bernard Shaw

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
well I don't have a direct link to any, but there's a bunch of them out there, many of them free, I use AXE, don't know the site for it though,
I'm realy sure someone will put up a link to one soon.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
ok, complete listing of what I have changed as it is right now

Code: [Select]

//start rendering glow points -Bobboau

if ( (pm->n_glows) /*&& (Interp_flags & MR_SHOW_THRUSTERS) /*&& (Detail.engine_glows)*/ ) {

for (i = 0; i < pm->n_glows; i++ ) {
glow_bank *bank = &pm->glows[i];
int j;

for ( j=0; jnum_slots; j++ ) {
float d;
vector tempv;
vm_vec_sub(&tempv,&View_position,&bank->pnt[j]);
vm_vec_normalize(&tempv);

d = vm_vec_dot(&tempv,&bank->norm[j]);

if ( d > 0.0f) {
vertex p;

// Make glow bitmap fade in/out quicker from sides.
d *= 3.0f;
if ( d > 1.0f ) d = 1.0f;

// fade them in the nebula as well
if(The_mission.flags & MISSION_FLAG_FULLNEB){
d *= (1.0f - Interp_fog_level);
}

float w = bank->radius[j];

// disable fogging
gr_fog_set(GR_FOGMODE_NONE, 0, 0, 0);

g3_rotate_vertex( &p, &bank->pnt[j] );
gr_set_bitmap( bank->glow_bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, d );
{
extern int Gr_scaler_zbuffering;
Gr_scaler_zbuffering = 1;
g3_draw_bitmap(&p,0,w*0.5f, TMAP_FLAG_TEXTURED );
//g3_draw_rotated_bitmap(&p,0.0f,w,w, TMAP_FLAG_TEXTURED );
Gr_scaler_zbuffering = 0;
}
}

}
}
}

//end rendering glow points


that goes into model_really_render just before the thruster glow rendering, in modelInterp.ccp

Code: [Select]

case ID_GLOW:{ //start glowpoint reading -Bobboau
//
char props[MAX_PROP_LEN];
pm->n_glows = cfread_int(fp);
pm->glows = (glow_bank *)malloc(sizeof(glow_bank) * pm->n_glows);
Assert( pm->glows != NULL );

for (int q = 0; q < pm->n_glows; q++ ) {
glow_bank *bank = &pm->glows[q];

bank->num_slots = cfread_int(fp);

cfread_string_len( props, MAX_PROP_LEN, fp );
// look for $glow_texture=xxx
int length = strlen(props);
if (length > 0) {
int base_length = strlen("$glow_texture=");
Assert( strstr( (const char *)&props, "$glow_texture=") != NULL );
Assert( length > base_length );
char *glow_texture_name = props + base_length;
if (glow_texture_name[0] == '$') {
glow_texture_name++;
}
bank->glow_bitmap = bm_load( glow_texture_name );
if (bank->glow_bitmap < 0) {
Error( LOCATION, "Couldn't open texture '%s'\nreferenced by model '%s'\n", glow_texture_name, pm->filename );

}
}
for (j = 0; j < bank->num_slots; j++) {

cfread_vector( &(bank->pnt[j]), fp );
cfread_vector( &(bank->norm[j]), fp );
bank->radius[j] = cfread_float( fp );
//mprintf(( "Rad = %.2f\n", rad ));
}
//mprintf(( "Num slots = %d\n", bank->num_slots ));

}
break;
} //end glowpoint reading -Bobboau


that goes into read_model_file just before the Fuel chunk loading part in modelRead.ccp

Code: [Select]

if ( pm->glows ) { // free the glows!!! -Bobboau
free(pm->glows);
}


that goes into model_unload just after the thruster, bit in ModelRead.ccp

Code: [Select]

int n_glows; // number of glows on this ship. -Bobboau
glow_bank *glows; // array of glow objects -Bobboau


that goes at the END of the polymodel typedef in model.h

Code: [Select]

typedef struct glow_bank {  // glow bank struckture -Bobboau
int num_slots;
vector pnt[MAX_THRUSTER_SLOTS];
vector norm[MAX_THRUSTER_SLOTS];
float radius[MAX_THRUSTER_SLOTS];
int glow_bitmap;
} glow_bank;



that goes in model.h too just after the thruster_bank type def

Code: [Select]

#define ID_GLOW 'WOLG' // glow points -Bobboau


and that goes into ModelsInc.h

I think that's it
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Raven2001

  • Machina Terra Reborn
  • 211
  • Im not the droid your looking for, move along
Great!!! Oh btw, you are gonna make a new .pof converter so that we don't have to do all that stuff in the future right???

Also, how do we determine the color of the glows???
Yeah, I know you were waiting for a very nice sig, in which I was quoting some very famous scientist or philosopher... guess what?!? I wont indulge you...

Why, you ask? What, do I look like a Shivan to you?!?


Raven is a god.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I was hopeing Kazan would make an addition to PCS

and you asign a bitmap, a bitmap with what ever colors you want in it
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kitsune

  • 27
Got an issue when I added some glowpoints to the fenris/leviathan pof.

I can get the model to load, but the glowpoints are reversed as well as offcenter.

Quote


Error: Couldn't open texture 'tem=$engine'
referenced by model 'cruiser01.pof'

File:D:\Games\projects\freespace2_public\code\Model\ModelRead.cpp
Line: 1657

Call stack:
------------------------------------------------------------------
    FS3.EXE 00434953()
    FS3.EXE 00518f7e()
    FS3.EXE 0051b24f()
    FS3.EXE 00429e9a()
    FS3.EXE 004c5df7()
    FS3.EXE 0042af30()
    FS3.EXE 0042af9c()
    FS3.EXE 005e55ce()
    KERNEL32.DLL bff8b560()
    KERNEL32.DLL bff8b412()
    KERNEL32.DLL bff89dd5()
------------------------------------------------------------------
~Space Kitsuné
6-Tailed RPG Nut.

"Why the hell don't we have any missles on this damn boat?!"
"But Sir, we have Tempests, Rockeyes, and unknown bombs."
"Like I said ensign, 'Why don't we have any missles on this damn boat?!"

"I went to a fight last night and a hockey game broke out."  -Groucho Marx

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
what did you put in the string feild
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kitsune

  • 27
I followed the directions you put up there in your post for how to modify the models in pcs and through an editor.  (AXE).

Here's the ship itself.
http://www.furnation.com/corwyn/freespacestuff/cruiser01.pof

I downloaded pcs and whatnot yesterday, so unless Kazan's keeping older versions on his site something else is screwy.

It doesn't crash the game, just spits you out to the desktop spouting the error above.

Alt-Tab'ing will get back into the game, and everything's there, just wrong... :(
~Space Kitsuné
6-Tailed RPG Nut.

"Why the hell don't we have any missles on this damn boat?!"
"But Sir, we have Tempests, Rockeyes, and unknown bombs."
"Like I said ensign, 'Why don't we have any missles on this damn boat?!"

"I went to a fight last night and a hockey game broke out."  -Groucho Marx

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
you didn't erase the old thruster glow data, you have to erase the old thruster glow data make the glowpoint data, and use a hex editor to rename it to GLOW, then also useing a hex editor, copy the old thruster data from a copy of the model, looks like you got most of it, but there were still some old thruster glows.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Kitsune

  • 27
Look at what you put up for creating the stuff.
You said to delete the old stuff first, then add thrusters.
So I made a copy of the info then deleted them, and re-made the thrusters.
Then made the glowpoints as you said.
Then found the FUEL and changed it to GLOW.

Unless you meant to change the thruster's info to be the glowpoints string instead.
~Space Kitsuné
6-Tailed RPG Nut.

"Why the hell don't we have any missles on this damn boat?!"
"But Sir, we have Tempests, Rockeyes, and unknown bombs."
"Like I said ensign, 'Why don't we have any missles on this damn boat?!"

"I went to a fight last night and a hockey game broke out."  -Groucho Marx

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I didn't mean re make the origonal data, I meant click the button that would make a new thruster, the new thruster will become the glow bank, I got your model to work, just useing the hex editor change the GLOW back to FUEL (assuming you havn't copied the origonal FUEL chunck yet, if you have just select the whole thing and cut it) and you can edit it further, all I had to do was erase the last thruster in the list (the one that didn't say $glow_texture= ) and convert it back, you can check you're work before converting it to glow points by opining it up in modelview and clicking thrusters, it will render them like it normaly does thrusters, wich will tell you if you have them in the right position and the right vector, from what I saw almost all your glows were off by quite a bit, have you done much POF editing?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together