Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: SeeNeYe on January 26, 2010, 06:50:54 am

Title: Help on creation and integration of a home-made 3D warp effect
Post by: SeeNeYe on January 26, 2010, 06:50:54 am
Hi  :D

I've read some topics in the modding portal about 3D warp effect, but i can't find a global documentation on the way to achieve my own 3D warp effect. I imagine that it consists in a pof model with an animated texture (*.ani of *.eff) on it. Anyone has more information about that ?

Thanks in advance !  :yes:

edit : moreover, is it possible to have a different effect depending on the ship's faction/side ?

Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: Herra Tohtori on January 26, 2010, 07:06:23 am
Fireball.tbl (http://www.hard-light.net/wiki/index.php/Fireball.tbl) specifies the subspace vortex effects for both regular and Knossos effect. Currently, only two different warp effects are supported; one as a normal, and one as Knossos jump effect. It is possible to use one as jump-in effect and the other as jump-out effect (this is done in The Babylon Project) but making it a species-dependant effect would probably be a bit harder.

The effect is set to use a hard-coded model if you do not have the 3d warp enabled in the launcher. If the launcher flag is enabled, the effect uses model named warp.pof.

This article (http://www.hard-light.net/wiki/index.php/EFF#EFF) covers the use of EFF as a file format.

Feel free to ask more questions if you hit any problems.  :)
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: SeeNeYe on January 26, 2010, 07:37:12 am
 :) thanks a lot for your fast reply i'll try to experiment all this
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: Reprobator on January 26, 2010, 08:14:28 am
I wonder if it could be tricked by using classical warp for a side and knossos effect for the other side on every mission (in the eventuality you won't use knossos)
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: SeeNeYe on January 26, 2010, 09:10:19 am
Are there special things to put in the pof or is it a simple 3D model converted to pof ? I think of the scaling issue as well, is the 3D warp effect auto-scaling at the current size of the ship or not ?  :)

I've done my model in 3Ds and have the anim so i'll test now ingame to see how it render  :shaking:
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: SeeNeYe on January 26, 2010, 10:57:22 am
 :D ok it's working, but the animation is looping as much time as the ship is going through the warp... so it's a bit annoying as i would have preferred it "stretched" the anim... an idea ?  :confused:
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: Herra Tohtori on January 26, 2010, 11:25:08 am
Not really without code changes. You need to just make the animation seamlessly loopable.

Which is, of course, hard.
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: SeeNeYe on January 26, 2010, 11:57:18 am
  :(  sad news :)

ok is the animation more or less long (not stretch) depending on the ship that is warping  :rolleyes: ? (because i've managed to ajust the animation speed to fit the warping time of my "testing" ship).

Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: SeeNeYe on January 26, 2010, 01:17:02 pm
one more question !

i've made a warp-glow.eff with 24 frames (whereas my diffuse warp.eff is 300 frames) and it doesn't seem to work ? Is it because of the different number of frames between the 2 maps or anything else ?

thx
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: Herra Tohtori on January 26, 2010, 03:27:12 pm
It's because the effect is hotwired to use additive blending, which means that if the diffuse texture is RGB map, black is interpreted as transparent, and this is basically the same thing as glow mapping to begin with. That's why it probably doesn't even look for -glow textures; it has no need for them in normal use.

You'll have to save the diffuse texture with white alpha channel to make it opaque. Even then it won't be true diffuse texture, since lighting is not applied to effects like 3D shockwave or 3d warp.


Of course, you can play around with some serious hackery trickery.

Use a 16x16 black texture for warp effects.

Make a ship entry that uses warp.pof as a model. Make sure it doesn't have working collision detection (ie. you can fly through the model).

Make a mission SEXP series or script that creates the "ship" warp model in front of a ship that is warping out. That would technically allow you to do whatever you want with the warp.pof model (or whichever model you want to use)  but I predict some serious if not impossible timing / synching issues with the effect popping into existence, getting the animation timed so that the ship in question will have time to disappear through the invisible portal, and whatnot.

But it's most likely possible. Horrible hack, but possible. :nervous:


I wouldn't bother. :shaking:
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: SeeNeYe on January 26, 2010, 03:40:59 pm
 :D wow thx

Ok, i think i will try to not have to go this far !  ;)


By the way, i've seen a "Warpin speed" and "Warpout speed" parameters to use in ships.tbl or shipXXX.tbm, isn't it a pretty good solution to my problem (making each ship syncing to my animation duration) ?
Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: SeeNeYe on January 27, 2010, 07:52:16 am
 :D

We finally barely got the warp effect we wanted for our mod, so i really thank you Herra for your great help !

I just got one final question about the warp, it seems that another effect is also used when ship warp in and warp out of the warp object, is there any possibility to disable it ?

Title: Re: Help on creation and integration of a home-made 3D warp effect
Post by: Herra Tohtori on January 27, 2010, 08:05:31 am
:D

We finally barely got the warp effect we wanted for our mod, so i really thank you Herra for your great help !

I just got one final question about the warp, it seems that another effect is also used when ship warp in and warp out of the warp object, is there any possibility to disable it ?




Turn off "Enable flash upon warp" in the Launcher.