Shockeye on 24/9/2005 at 06:45
I have made a flare similar to the ones that were in Thief 2.
the basic version dosn't require any scripting, just 3 new classes.
From Actor\Worldobj\InventoryObject\Powerups\Bombs derive a new class called "Flare"
Make it placecable, add all the usual inventory properties (name text, inv slot max stackable etc)
Add the ObjectMesh property, and give it an approriate mesh (I chose "GENiGOODSscrollcase",Skin="KepGoodA", but you could use a flashbomb mesh or anything really)
From Actor\Worldobj\Spawned\SpawnedWeaponObject\Projectile derive "FlareProjectile"
Properties: (mostly copied from GasBombProjectile)
ObjectMesh=(Name="GENiGOODSscrollcase",Skin="KepGoodA")
MaxInventoryStack=10 (or whatever, just more than zero)
ContactResponse=eCR_Destroy
bCanThrow=True
MinThrowRotation=(X=360.000000,Z=-180.000000)
MaxThrowRotation=(X=720.000000,Z=180.000000)
bIsStackable=True
InvType=eIT_ITEM
From Actor\FX\LightFX\FlashbombLight1 derive "FlareLight"
Change the Lifetime property to something like 20.000000 seconds
Alternatively you could deive directly from LightFX, but then you'll have to jigger around with the light settings to get what you want. FlashbombLight1 looks close enough to a flare as it is.
Next, open the Actor links of the Flare class archetype. Add an InventorySwitch link to the archetype of FlareProjectile.
Open FlareProjectile links and add a DeathSpawn link to FlareLight archetype.
Now you a have flare. Place Flare in level. Use it just like a Gasbomb or flashbomb. Now you can have 20 seconds of bright illumination for performing complex tasks in overly dark locations without having to spoil the immersion by tweaking the gamma settings.
When I get around to wikiing this I'll show how to do a more advanced flare that you can turn off be frobbing the projectile (requires an additional class & a script)
Gestalt on 24/9/2005 at 23:40
Thanks! I was planning to have the player start out my mission with a few flares, but hadn't figured out the details yet.
Here's a render of the high-poly version, which is all I have (almost) finished right now:
(
http://img264.imageshack.us/my.php?image=flare4od.jpg)
Inline Image:
http://img264.imageshack.us/img264/9505/flare4od.th.jpgIt'll look better once it's textured and so forth. Not sure when I'll have time to work on it, but when I'm done I'll put the finished version up for download in case someone else wants to use it.
Shockeye on 25/9/2005 at 07:51
:thumb: Bewdiful meshes. You've been able to convert them to .TIM format?
Gestalt on 25/9/2005 at 20:48
Not yet. I'm done the low-poly version now, but I've been having trouble getting a good normal map out of the one above.
str8g8 on 26/9/2005 at 09:09
how are you generating the normal? Are you using melody?
Gestalt on 26/9/2005 at 23:25
I've tried the max plugin that came with T3ed, Melody and ATi's Normalmapper. I haven't managed to get anything useful out of any of them. I must have things set up incorrectly, but I can't figure out how.
str8g8 on 27/9/2005 at 08:24
I've managed to get some pretty good normal maps out of melody:
1. Build your hi-res model (you've already done this, obviously)
2. Build your low-res model around the hi-res model (so that the hi-res fits inside)
3. Unwrap the low-res model properly. By properly I mean you have to lay out all the uvs between 0 to 1, and there can be no overlapping etc. All these normal mapping plugins and so on use these texture co-ordinates to generate the normal map.
4. Other important things: the models have to have the same pivot point and so on. Also, if you are using max remember to get rid of all scaling, rotations and so on. The best way is to go to Utilities and find "Reset Xform" and then hit "Reset Selected", then collapse the model back down into a mesh. You might not even realise your model has scaling - you could have scaled the primitive way back when you started modelling it, but that scaling will still be present in the model and when you export as a 3ds file it will be ignored.
5. Export both files as 3ds files. If you have both models in the same scene (a common workflow) then make sure you "Export Selected" as "Export" will export the whole scene. Import them into melody: low-res is working model, hi-res is reference model
6. You can the check the alignment of the models by choosing "Both overlayed" from the drop-down that says "Display both models). Your hi-res model should be contained within the low-res one, maybe poking out in places.
7. Go into Normal Map Settings. Make sure "Use Decal Textures Coordinates" is checked, or melody tries to create its own uv co-ordinates. In Draft Settings Uncheck "Show missed texels" and also set the width and height if you like, then hit close.
8. Hit "Generate Normal Map". Melody will create two types of normal maps in the same folder as the models, one base on object space and one based on tangent space. You can view the normal map in melody by selecting "Working only" in the drop down and flicking between "object space" and "tangent space" in the display settings. The bluish tinted one is the kind that Thief uses.
cheers
str8g8
Shockeye on 3/10/2005 at 09:20
Tutorial is now on the wiki: (
http://www.ttlg.com/wiki/wikka.php?wakka=FlareLight) here
Note my cry for help at the end re the light effect on the advanced flare. When a LightFX is very close to the ground it casts a very bright but very small illuminated area on the ground. Any one know how I can make the illuminated area bigger??
Shockeye on 3/10/2005 at 09:24
Oh, by the way Gestalt, are you able to give the mesh HardPoints or attachment point thingies? If so, we could also add an emitter to the flare, so you have a spout of incandescant sparks coming out of the end.
massimilianogoi on 11/9/2008 at 08:58
My word!! This project have to be definitively resumed!!
IMO, it should be interesting also giving Garret the opportunity to stand with a torch.