project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
22 Oct 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Reply
 
Thread Tools Display Modes
Old 2014-11-26, 16:41   #1
Grober
Default [?] Help Exporting a Rocket / Missile Projectile

Well im trying to export a rocket for PR and its my first bundle mesh that i export there for i have a few questions.

Do i have to specify where is specular map?
Is shadow map at materials a specular map?
Or its allways at alpha channel of Color map?

Is there a way to scale objects after they are exported?
Grober is offline Reply With Quote
Old 2014-11-26, 16:49   #2
[R-DEV]​Tim270
PR:BF2 Developer

Tim270's Avatar
Default Re: Questions about exporting

Quote:
Originally Posted by Grober View Post
Well im trying to export a rocket for PR and its my first bundle mesh that i export there for i have a few questions.
A rocket/projectile to be shot/used on a aircraft or vehicle or a weapon launcher?

Quote:
Do i have to specify where is specular map?
No, the specular map either goes in the Alpha channel of the Normal map _b.dds or the diffuse _c.dds Remember, only use Alpha channels where you need them, typically you only use the alpha channel in one map, use both if you are working with a object with transparency as well as a specular map.

Quote:
Is shadow map at materials a specular map?
No. Leave it blank.

Quote:
Or its allways at alpha channel of Color map?
It can be in the Normal or Diffuse/Colour map. I Could be wrong, it has been a while. Most likely best to stick with it in the colour channel, save as DTX5 (alpha channel) then save your normal map as DTX1 (no Alpha) to save on memory.

Is there a way to scale objects after they are exported?[/QUOTE]

No. It has to all be done in 3ds max first.

Tim270 is offline Reply With Quote
Old 2014-11-26, 16:58   #3
Grober
Default Re: Questions about exporting

Quote:
Originally Posted by Tim270 View Post
A rocket/projectile to be shot/used on a aircraft or vehicle or a weapon launcher?
S-24 rocket - Wikipedia, the free encyclopedia


Quote:
Originally Posted by Tim270 View Post
No, the specular map either goes in the Alpha channel of the Normal map _b.dds or the diffuse _c.dds Remember, only use Alpha channels where you need them, typically you only use the alpha channel in one map, use both if you are working with a object with transparency as well as a specular map.

But how can i select where is alpha?

Quote:
Originally Posted by Tim270 View Post
No. Leave it blank.
could u explaim me then what is it for?
Grober is offline Reply With Quote
Old 2014-11-26, 17:16   #4
Rhino
Retired PR Developer
Supporting Member

Rhino's Avatar
Default Re: Questions about exporting

Quote:
Originally Posted by Grober View Post
But how can i select where is alpha?
Tim is correct on it can be either in the _c or _b texture's alpha channel and its controlled by what Shader Technique you apply to the material inside 3DsMax.

"ColorMapGloss" will use the alpha channel from the colours/_c alpha channel and leaving the material name blank will use it from the normals/_b alpha channel.

If there are going to be multiple colours of this missile on the same map, ie, multiple versions using different diffuse/colour/_c textures, then its best to have the spec in the normal map as saving the texture in DXT1, without an alpha channel, costs 1/2 as much memory as saving the same texture in DXT5, with an alpha channel. As such if your having multiple colours of the same object on the same map, its a good idea to have them all sharing the exact same normal and spec map from the normal/_b texture sheet, and then just having each one with its own unique colour texture saved in DXT1, like what I've done for the different Arige A-4s for the next PR:F update, and you get lots of diffrent colour versions at only a little extra cost, but if each version/colour was saved in DXT5 with its own spec map, you would be taking a massive memory cost: https://www.realitymod.com/forum/f19...date-15-a.html




(note the DXT formats and the texture memory usage in the bottom right, in current mip and all mips)

But if your not going to have different colours of the same object, then its best to save the colour in DXT5 with the spec map in its alpha channel as DXT5 saves in a bit higher quality than DXT1 and you don't get as much DDS compression errors in it, but tbh its hardly notable between the two.

Quote:
Originally Posted by Grober View Post
could u explaim me then what is it for?
Its mainly used for wreck texture overlays, so wrecks look like they are burnt out:



Rhino is offline Reply With Quote
Old 2014-11-26, 17:28   #5
Grober
Default Re: Questions about exporting

Quote:
Originally Posted by [R-DEV]Rhino View Post
Tim is correct on it can be either in the _c or _b texture's alpha channel and its controlled by what Shader Technique you apply to the material inside 3DsMax.

"ColorMapGloss" will use the alpha channel from the colours/_c alpha channel and leaving the material name blank will use it from the normals/_b alpha channel.
Well now i will sound like a morron but where can in 3ds Shader Technique

and s-24 should be exported as boundle mesh or static mesh?
Grober is offline Reply With Quote
Old 2014-11-26, 17:36   #6
[R-DEV]​Tim270
PR:BF2 Developer

Tim270's Avatar
Default Re: Questions about exporting

Quote:
Originally Posted by Grober View Post
Well now i will sound like a morron but where can in 3ds Shader Technique

and s-24 should be exported as boundle mesh or static mesh?


So for example you would put "ColorMapGloss" in where the red arrow is pointing, and that defines the shader technique for that material. (obviously using the Bf2 material plugins)

Bundlemesh.

Tim270 is offline Reply With Quote
Old 2014-11-26, 17:36   #7
Rhino
Retired PR Developer
Supporting Member

Rhino's Avatar
Default Re: Questions about exporting

Quote:
Originally Posted by Grober View Post
Well now i will sound like a morron but where can in 3ds Shader Technique
As per this tut in "Step 7: BF2 Materials": https://www.realitymod.com/forum/f18...d-weapons.html

Quote:
Originally Posted by [R-DEV]Rhino View Post
Step 7: BF2 Materials

Now we know that our textures are always looking nice and working well we need to setup our 3p models to use the correct BF2 materials so when they are exported they all are working well in BF2.

All in all for our 3p models we need 3 different materials.
Normal Colour, spec and normal material
Alpha material applied to the bits with transparent parts.
ENV Map material applied to reflective parts like scope lenses etc.

All are going to be using the same textures but just in slightly different ways.

First select an empty material (or even better yet, the material already used by all your 3p models (and no others)) and select "BF2 BundledMesh" material type for it.


Then crate the following materials, first one called something along the lines of "3p_l85a2" (with no || bit after it, no need with this material setup, but in others you need ||Colormapgloss etc, but not here) and browse the correct colour and normal textures. The 2nd called "3p_l85a2||Alpha" which we will use on our transparent faces and the 3rd called "3p_l85a2||Envmap" which we will use on our scope lenses


First fully apply the normal "3p_l85a2" material to all your 3p models, and then go ahead and apply all the "3p_l85a2||Envmap" material to all the scope lenses:


And then apply the "3p_l85a2||Alpha" material to all the faces with transparent bits on them



Now when you export it should all be good, but keep in mind the little bits (ie, shader techniques) after your material name all depend on your texture setup and what you want it to do. Not having any bit after our main material etc is because our spec is in our normal map which the default shader technique uses, "ColorMapGloss" uses the spec map out of the diffuse / _c texture's alpha for example so just keep this stuff in mind and any questions just ask
And while that tut is for Handheld weapons and isn't totally about exporting and is more about crating 3rd person weapon models, baking and working with components, it has lots of useful information about exporting in it you wont find in most other tuts.

This tutorial here is also well worth a read, especially if your working with complicated vehicle or handheld weapon series exports: https://www.realitymod.com/forum/f18...materials.html

Quote:
Originally Posted by Grober View Post
and s-24 should be exported as boundle mesh or static mesh?
It should be a BundleMesh, StaticMeshes are pretty much just for statics and overgrowth.

Rhino is offline Reply With Quote
Old 2014-11-26, 17:42   #8
Grober
Default Re: Questions about exporting

http://i.imgur.com/wh6hKJu.png

so now it will take spec from color right?

if yes then awsome


another questions i should create 2 "objects"
main object that is going to be active rocket
and _dommy that is going to be only for visual under wings right?
Grober is offline Reply With Quote
Old 2014-11-26, 17:55   #9
Rhino
Retired PR Developer
Supporting Member

Rhino's Avatar
Default Re: Questions about exporting

Quote:
Originally Posted by Grober View Post
http://i.imgur.com/wh6hKJu.png

so now it will take spec from color right?

if yes then awsome
Yes that should work fine

Quote:
Originally Posted by Grober View Post
another questions i should create 2 "objects"
main object that is going to be active rocket
and _dommy that is going to be only for visual under wings right?
well first its "_dummy", but the big question is, is there any (major) visual differences in the model before and after launch (not including the rocket motor effect, since that's an effect added on and triggered by the code)?

For example, for the new LGBs I made, there is quite a big visual difference between the "_dummy", which is attached to the bottom of the aircraft, and the actual projectile, which is mainly that on the projectile after the bomb is dropped, the rear thins are deployed: Laser-guided, state-of-the-art! - Project Reality Forums



As such I had to export two different meshes of the model, the "_dummy" mesh with its thins closed:


And then the projectile version with the thins open:


But if there is no change between the two, like the new Tigercat Missile for PR:F Lucky has made: https://www.realitymod.com/forum/f38...-pr-f-wip.html


Then the "_dummy" version should use the same mesh as the projectile dose, which if you look in the .tweak file you will see:
Code:
rem *** Generated with Bf2Editor.exe [created: 2011/8/17 16:27]
GeometryTemplate.setSubGeometryLodDistance 0 0 25
GeometryTemplate.setSubGeometryLodDistance 0 1 50
GeometryTemplate.setSubGeometryLodDistance 0 2 200
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.castsDynamicShadow 1
ObjectTemplate.activeSafe SimpleObject seacat_missile_dummy
ObjectTemplate.creator EDMUNDFOVARGUE:Edmund_Fovargue
ObjectTemplate.modifiedByUser "Edmund Fovargue"
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.cullRadiusScale 20
ObjectTemplate.geometry seacat_missile
ObjectTemplate.setCollisionMesh seacat_missile_dummy
ObjectTemplate.mapMaterial 0 col_metal 146
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
But what you will also note is that I have exported its own unique collision mesh for the dummy version, since that is very different between the two as players can shoot and climb on it etc while its on its launcher, where the col mesh for the projectile is just used to detect if it hits an object, so it can and should be very simple:

Projectiles Col:


Dummies Col:

Rhino is offline Reply With Quote
Old 2014-11-26, 18:02   #10
Grober
Default Re: [?] Help Exporting a Rocket / Missile Projectile

imgur: the simple image sharer

if your could take a look at .con and .tweak that i have created i give me some feadback and check it

s24.con
Code:
GeometryTemplate.create BundledMesh s24
CollisionManager.createTemplate s24

ObjectTemplate.create SimpleObject s24
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.creator DANIEL-PC:Daniel
ObjectTemplate.collisionMesh s24
ObjectTemplate.mapMaterial 0 metal 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.geometry s24

include s24.tweak
s24.tweak
Code:
rem *** Generated with Bf2Editor.exe [created: 2014/5/28 23:34]
GeometryTemplate.setSubGeometryLodDistance 1 0 80
GeometryTemplate.setSubGeometryLodDistance 1 1 150
GeometryTemplate.compressVertexData 1
GeometryTemplate.maxTextureRepeat 16
ObjectTemplate.activeSafe SimpleObject s24
ObjectTemplate.creator DANIEL-PC:Daniel
ObjectTemplate.modifiedByUser "Daniel"
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.cullRadiusScale 9
rem ---BeginComp:Armor ---
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 1
ObjectTemplate.armor.hitPoints 1
ObjectTemplate.armor.defaultMaterial 32
ObjectTemplate.armor.hpLostWhileUpSideDown 75
ObjectTemplate.armor.hpLostWhileInWater 50
ObjectTemplate.armor.hpLostWhileInDeepWater 80
ObjectTemplate.armor.hpLostWhileCriticalDamage 0
ObjectTemplate.armor.waterLevel -0.3
ObjectTemplate.armor.explosionForce 5
ObjectTemplate.armor.explosionForceMod 0
ObjectTemplate.armor.explosionForceMax 5
ObjectTemplate.armor.explosionDamage 750
ObjectTemplate.armor.explosionRadius 40
ObjectTemplate.armor.explosionMaterial 3721
ObjectTemplate.armor.criticalDamage 1
rem ---EndComp ---
rem ---BeginComp:DefaultCollisionComp ---
ObjectTemplate.createComponent DefaultCollisionComp
ObjectTemplate.collision.hasCollisionEffect 1
rem ---EndComp ---
rem ---BeginComp:DefaultDetonationComp ---
ObjectTemplate.createComponent DefaultDetonationComp
ObjectTemplate.detonation.explosionMaterial 70
ObjectTemplate.detonation.explosionRadius 80
ObjectTemplate.detonation.explosionForce 30
ObjectTemplate.detonation.explosionDamage 115
ObjectTemplate.detonation.endEffectTemplate e_exp_bomb
ObjectTemplate.detonation.useMMOnEndEffect 1
ObjectTemplate.detonation.detectionRadius 1.5
ObjectTemplate.detonation.maxDepthForExplosion 2
rem ---EndComp ---
rem ---BeginComp:DefaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp:SeekClosestTargetComp ---
ObjectTemplate.createComponent SeekClosestTargetComp
ObjectTemplate.seek.targetType TTUnique
ObjectTemplate.seek.trackingDelay 0
ObjectTemplate.seek.maxAngleLock 180
ObjectTemplate.seek.maxDistLock 3000
ObjectTemplate.seek.reLockTime 0
rem ---EndComp ---
rem ---BeginComp:DefaultFollowComp ---
ObjectTemplate.createComponent DefaultFollowComp
ObjectTemplate.follow.maxYaw 0
ObjectTemplate.follow.maxPitch 0
ObjectTemplate.follow.changePitch 0
ObjectTemplate.follow.changeYaw 0
ObjectTemplate.follow.minDist 0
rem ---EndComp ---
rem ---BeginComp:DefaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 0
ObjectTemplate.penetrate.allowLiquidPenetration 0
rem ---EndComp ---
ObjectTemplate.geometry s24
ObjectTemplate.setCollisionMesh s24
ObjectTemplate.mapMaterial 0 metal 32
ObjectTemplate.mass 400
ObjectTemplate.gravityModifier 0.66
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Point
ObjectTemplate.collisionGroups 8
ObjectTemplate.material 56
s24_dummy.con
Code:
ObjectTemplate.create SimpleObject s24_dummy
ObjectTemplate.createdInEditor 1

include s24_dummy.tweak

s24_dummy.tweak
Code:
ObjectTemplate.active s24_dummy
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry s24
ObjectTemplate.setCollisionMesh s24
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh
ObjectTemplate.mapMaterial 0 metal 32
Grober is offline Reply With Quote
Reply


Tags
bomb, dummy, exporting, missile, projectile, questions, rocket, rocket or missile

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 11:21.