Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Ace on January 25, 2012, 05:36:30 pm

Title: Flak model transparency issue
Post by: Ace on January 25, 2012, 05:36:30 pm
A question for those dealing with models and transparencies:

http://img705.imageshack.us/img705/1558/screen0112.jpg

In the tech room this model renders correctly, but in game the transparency does not function properly.

Any ideas why?

Also, since this is flak it requires a model for the tracer (and it can't be a particle spew or it doesn't match the show's look) since the standard laser code doesn't work for actual flak.
Title: Re: Flak model transparency issue
Post by: The E on January 25, 2012, 06:00:33 pm
In-game flak bullets are not rendered by default. Don't ask me why, it's been that way since retail. It's fixable, it's just that nobody really cared until now.

This is a flak bullet that has not exploded into a cloud, yes? Kinda hard to tell from the pics and your description.
Title: Re: Flak model transparency issue
Post by: Alan Bolte on January 25, 2012, 07:24:04 pm
Assuming you don't decide to change flak in code to support laser rendering, I'm pretty sure you can fake it with a non-homing secondary (pretty sure those support lasers, I just don't ever see it used). You would probably want to specify min and max lifetimes and $FOF (field of fire) in order to have that 'engagement zone' look.
Title: Re: Flak model transparency issue
Post by: Ace on January 25, 2012, 08:01:49 pm
Problem is we can fake it with a primary or a secondary but we want to use the actual flak code for the flak.

Yes it's the tracer/bullet before the explosion which can use a particle spew or model but not the laser code. The model of course has this alpha issue.

The ideal would be code for a flag to use the laser rendering so we can use that instead of a model, but just getting the model to work would be fine.
Title: Re: Flak model transparency issue
Post by: Fury on January 26, 2012, 12:35:11 am
I believe an actual pof to be used for flak effect would cause severe issues in a heated battle scenario. If the engine doesn't roll over and die, it'd cause significant performance issues at least. Before touching the code, you may want to create a dummy non-flak primary weapon with similar stats to the flak and give it the pof, see how well the game performs.
Title: Re: Flak model transparency issue
Post by: Ace on January 26, 2012, 04:29:48 pm
I've already done that test, the issue isn't performance but getting the transparency to work properly.

Which returns to the original question, what is going on with the transparencies that has it work in the F3 ship viewer but not in game?
Title: Re: Flak model transparency issue
Post by: The E on January 26, 2012, 04:31:49 pm
For some reason, it was decided in the :v: days that flak shells Shall Not Be Rendered. Do not ask me why, it just is that way.
Title: Re: Flak model transparency issue
Post by: Ace on January 26, 2012, 04:35:18 pm
So the model won't render at all?

In that case we will need a code solution to use the laser code instead of missile trail/pspew (no matter what the trails don't look quite right).
Title: Re: Flak model transparency issue
Post by: The E on January 26, 2012, 04:36:12 pm
Not in-game. But fixing that (or rather, adding a weapons flag that would fix that) really is trivial.
Title: Re: Flak model transparency issue
Post by: Ace on January 26, 2012, 04:37:08 pm
Well, a model render and laser render flag would be best. For Diaspora laser render is more ideal but there's other cases where model would be good.
Title: Re: Flak model transparency issue
Post by: The E on January 26, 2012, 04:42:25 pm
Umm. I believe you do not understand. The problem is, the engine decides whether or not to render a weapon based on whether or not it's a flak shell. So the fix would to introduce a weapon flag that tells the engine to skip that check, and render the weapon regardless.
Title: Re: Flak model transparency issue
Post by: Nuke on January 26, 2012, 06:23:27 pm
ive been complaining about this for a very long time. weapon behavior should be seprate from rendering options. therre are flak weapons id like to use visible models for and there are non-flak weapons i want to be invisible until they hit something. the former is impossible afaik, but the later can be done by using black lasers or a model with an invisible texture.

id do a "force render flak" flag to allow use of rendering options (even laser based) for flak weapons. i also kinda want another flag do to the latter without hax. "no weapon rendering" would not render a model or laser effects, in effect making it look like a retail flak weapon. main thing is i dont want to need to suck up texture and model slots with dummy models/textures. but, meh, i really dont care.

Title: Re: Flak model transparency issue
Post by: Dragon on January 26, 2012, 06:43:12 pm
I also requested such flag a few times. This would come in handy in many places.
Title: Re: Flak model transparency issue
Post by: Ace on January 28, 2012, 07:48:52 pm
I should make this a code request then.