Jump to content
Official BF Editor Forums
Dnamro

Has Anyone Created Static Titans?

Recommended Posts

Has anyone created a static Titan? The docked Titan on the ground in Wake 2142 is a player controlled object, not a static. I need a static version in order to add AI support. I tried creating a basic test bundledmesh static version, but I get a CTD when loading the it in game:

eu_titan_static.con

GeometryTemplate.create StaticMesh eu_titan_static
CollisionManager.createTemplate eu_titan_static

ObjectTemplate.create Bundle eu_titan_static
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.creator DAVID:Dnamro
ObjectTemplate.mapMaterial 0 metal 0
ObjectTemplate.hasCollisionPhysics 0
ObjectTemplate.physicsType 3
eu_titan_static.tweak

rem *** Generated with Bf2Editor.exe [created: 2006/8/17 6:45]
ObjectTemplate.activeSafe Bundle eu_titan_static
ObjectTemplate.creator Dnamro
ObjectTemplate.modifiedByUser "Dnamro"
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh

ObjectTemplate.addTemplate eu_titan_exterior_main_front
ObjectTemplate.setPosition 0/2.2164/-50.3165
Edited by Dnamro

Share this post


Link to post
Share on other sites

try changing this

GeometryTemplate.create StaticMesh eu_titan_static

to this

GeometryTemplate.create BundledMesh eu_titan_static

as I assume you haven't converted the titan mesh to a staticmesh

A static object doesn't have to be named as GeometryTemplate.create StaticMesh ................

GeometryTemplate.create StaticMesh refers to the mesh type...StaticMesh,BundledMesh,SkinnedMesh etc

There will probably be more involved,to do a proper conversion

You may also find,a Titan as a static object,and not a PCO,might not be hooked up to the Python triggers,events,and any audible or visual effects,and the end of the game,when the Titan is destroyed

rem ---BeginComp:Python ---

ObjectTemplate.createComponent Python

ObjectTemplate.Python.onDestroyEvent 46

ObjectTemplate.Python.onRepairEvent 47

rem ---EndComp ---

rem ---BeginComp:Python ---

ObjectTemplate.createComponent Python

ObjectTemplate.Python.onDamageEvent 26

ObjectTemplate.Python.onRepairEvent 27

ObjectTemplate.Python.onSpawnEvent 28

rem ---EndComp ---

rem ---BeginComp:Radio ---

ObjectTemplate.createComponent Radio

ObjectTemplate.Radio.friendlyDestroyedMessage AUTO_TITAN_BB_defencesfailedb

ObjectTemplate.Radio.enemyDestroyedMessage AUTO_TITAN_C_defencesdownsector2

rem ---EndComp ---

Share this post


Link to post
Share on other sites

Thanks Devilman. Since the Titan is made up of many parts, I was hoping that I would not have to convert each from bundledmesh to standardmesh, but it looks like there is no easy way to do this.

No worries on the python code, as this won't be for a standard Titan game mode anyway.

I want to be able to place a flag in the Titan core room and have the bots be able to get to it. The purpose of this project is more than just getting bots to move around on the Titan, it's part of a proof of concept on a workflow idea to create navmeshes for complex objects. If this idea works with the Titan, it will work for just about anything.

So, I have converted the back part of the Titan into a staticmesh and got in game.

Image link:

https://drive.google.com/file/d/0B_o_kOaz7RpTN0dJY3pNSVM4Szg/view?usp=sharing

As you can see the issue now is that it's all whitewashed. Tracking down and fixing the texture will be the next problem to solve.

Share this post


Link to post
Share on other sites

So you are wanting to convert the Titans,from a bundlemesh,to a staticmesh

So you can add them to a map, as a static object,allowing the navmesh generator to navmesh them with your col 3's ?

As for your whitewashed titan part

It could be caused by a few things

The Technique in the mesh file

The Titans do look much different,without the shields on

But,once the Titan is navmeshed,why dont you replace your ingame,converted Titan parts,with the original parts,which look as intended

Also 9 of the 35 Eu Titan parts, already have their meshes as a staticmesh

mainly corridors,exterior and coreroom

Share this post


Link to post
Share on other sites

Good deal on the parts that are already staticmeshes. That will make it a little easier.

In addition to including the Titan in a navmesh for Wake 2142, I also need it to create a navmesh for a Titan boarding map with two Titans either back to back or docked to some sort of platform in the sky.

But, the since the Titan is too complicated for an AImesh, my idea is to use a navmesh version of the titan to weld it onto the generated navmesh from wake 2142 using 3dsmax or Blender.

But for a titan in the sky, where there is no generated navmesh to weld anything onto, everything is created in 3dsmax. Then the question is how to position the hand crafted navmesh into the map correctly without a generated navmesh as the guide.

I believe the solution is with the static import tool for lightmapping in 3dsmax. Apache Thunder gave me this idea when he showed me a video of how he creates his BF1942 maps in 3dsmax using this tool. BF2 has the same capability.

All I have to do is to create a navmesh stand-in for the Titan or any other object that I want to import into 3dsmax. In turn, the 3dsmax import script with do the object placement conversions between the BF2 coordinate system and 3dsmax. All, I need to do is to replace the static mesh with the object navmesh portion and when imported, the statics will be imported as a navmesh and the they will just need to be welded together.

The only thing that I have figured out yet is why the textures are looking whitewashed.

Share this post


Link to post
Share on other sites

Sometimes,when people try to achieve alot

They end up accomplishing very little,or nothing

7 years,5 months,and 3 days has passed, since you started the

"Why bots can't use the Titan" thread at BFSP

http://www.battlefieldsingleplayer.com/forum/index.php?showtopic=8025

And in 7 years,5 months,and 3 days absolutely nothing has been accomplished ingame by BFSP

Have a guess why

Share this post


Link to post
Share on other sites

At the time of the post, I was listing the challenges, not actually trying to accomplish it. The lack of a proper editor and debugger makes it difficult to work with the BF2142 game engine and therefore there are not a lot of modders willing to work on it. The problem requires a diverse skill set, which I did not have at the time.

SatNav released a navmesh plugin for the Titans a few years back. Using SatNav's work, EzpickNZ navmeshed wake 2142 to include a static Titan, with bots able to go into the Titan. But he did not have the skills to figure out the whitewashed texture issue. Now, that I have picked up some 3d modeling skills I was looking into how to fix the texture issue. I now have the skills to fix up the navmeshes in 3dsmax. So, out of all the issues, many have been resolved.

Share this post


Link to post
Share on other sites

I'm pretty sure the whitewashing texture is happening for at least two reasons -

1. Bundlemeshes only have a single UV channel and a single Diffuse and normal texture. Exporting it to StaticMesh as is will mean it is using BASE technique and will not shade or look like most statics. Generally it is much brighter because there is no Detail layer to multiply with the color layer. To fix this I would move the Color UV set (channel 1) to the Detail UV set (channel 2) and then find a suitable color texture for it. Even a flat 127 gray would work.

2. The new static is not lightmapped and probably doesn't have a proper lightmap UV channel anyway. Therefore it is much brighter than the surrounding objects. A flat mapped UV set in channel 5 with some Lightmap samples should allow you to Lightmap the object in the editor.

Normally I would attempt this myself to give you a more definitive answer but I don't have a copy of BF2142. If you want, you can PM a Dl link of the asset and I would be happy to look it over for you.

Edited by Coronaextra

Share this post


Link to post
Share on other sites

1. Bundlemeshes only have a single UV channel and a single Diffuse and normal texture. Exporting it to StaticMesh as is will mean it is using BASE technique and will not shade or look like most statics.

As for your whitewashed titan part

It could be caused by a few things

The Technique in the mesh file

But,once the Titan is navmeshed,why dont you replace your ingame,converted Titan parts,with the original parts,which look as intended

But,once the Titan is navmeshed,why dont you replace your ingame,converted Titan parts,with the original parts,which look as intended

But,once the Titan is navmeshed,why dont you replace your ingame,converted Titan parts,with the original parts,which look as intended

But,once the Titan is navmeshed,why dont you replace your ingame,converted Titan parts,with the original parts,which look as intended

But,once the Titan is navmeshed,why dont you replace your ingame,converted Titan parts,with the original parts,which look as intended

Share this post


Link to post
Share on other sites

Corona,

Thanks for the great info. I PMed you links.

Devilman,

Bots navigate through complex structures better as statics than PCOs. They try to interact with the object instead of going through it.

Share this post


Link to post
Share on other sites

@ Dnamro

You are doing it all wrong,and your idea of what a static object is,is wrong

As shown by this line "Bots navigate through complex structures better as statics than PCOs"

Theoretically,there is no such thing,as a true static object

An object is catogarized by its descripition at the top of the con and tweak file,as such

PCO ObjectTemplate.create PlayerControlObject eu_aacannon_hub

SimpleObject ObjectTemplate.activeSafe SimpleObject eu_aacannonwreckhud

Bundle ObjectTemplate.activeSafe Bundle eu_coredoor

DestroyableObject ObjectTemplate.activeSafe DestroyableObject crate01_dest_c

GenericFireArm ObjectTemplate.activeSafe GenericFireArm as_ar_rocket

Most/all of these objects have a mesh which calls for textures

The type of mesh determines which techniques,the object uses for its textures

Buildings mainly use

Technique: BaseDetailNDetailenvmap

Technique: BaseDetailNDetail

Technique: BaseDetailNDetailparallaxdetail

etc

which allows overelaying of several texture sheets,to achive a desired look

eu_forcefield_spawnroom is a bundle, ObjectTemplate.activeSafe Bundle eu_forcefield_spawnroom

which allows children to show ingame

rem -------------------------------------

ObjectTemplate.addTemplate eu_forcefield_spawnroom_glow

rem -------------------------------------

If children are attatched to a simpleobject,they wont show ingame

eu_forcefield_spawnroom is a bundle, and its mesh is a bundledmesh

eu_forcefield_spawnroom.bundledmesh

and uses this technique

Shader: BundledMesh.fx

Technique: Alpha

Type: 1

Texture: objects/vehicles/eu_titan/textures/eu_forcefield_corridor_c.dds

Texture: objects/vehicles/eu_titan/textures/eu_forcefield_b.dds

Texture: Common\Textures\SpecularLUT_pow36.dds

eu_titan_corridor_lower_left is a bundle also,but its mesh is a staticmesh

ObjectTemplate.activeSafe Bundle eu_titan_corridor_lower_left

and uses this technique

Shader: StaticMesh.fx

Technique: BaseDetailDirtCrackNDetailNCrack

Type: 0

Texture: objects/vehicles/as_titan/textures/as_titan_interior_color.dds

Texture: objects/vehicles/as_titan/textures/as_titan_interior_03_detail.dds

Texture: objects/vehicles/as_titan/textures/as_titan_interior_dirt.dds

Texture: objects/vehicles/as_titan/textures/as_titan_interior_crack.dds

Texture: objects/vehicles/as_titan/textures/as_titan_interior_03_detailb.dds

Texture: objects/vehicles/as_titan/textures/as_titan_interior_crackb.dds

Texture: Common\Textures\SpecularLUT_pow36.dds

SimpleObjects,Bundles,DestroyableObject and PCO's can all be listed in the StaticObjects.con

Share this post


Link to post
Share on other sites

DEVILMAN is right, creating an object bundle with all the mesh parts attached would work fine and would not require any extra texturing work since the meshes would stay as they are, and since the object would no longer be a PCO, the bots would not try to interact with it. I will continue working on the mesh you sent me if you still want a static textured version of it. It would be easier to work from the original bundledmesh version of the object instead of the converted to static version.

However there seems to be some textures missing from the package you sent me

objects/staticobjects/textures/color_02.dds

and also many of the materials are missing their normal maps and I don't see a texture for them in the folders. Did DICE really texture this giant object with no normals? lol.

Does anybody have a working Dl link for the BF2 ShaderWrapper and the MAX Collision importer script? All my links are 404.

Edited by Coronaextra

Share this post


Link to post
Share on other sites

I am using the term static loosely as in an object that is not a PCO. I just don't want it a PCO, so any suggestions are welcome. It is set as a bundledmesh just like Devilman said:

GeometryTemplate.create BundledMesh eu_titan_exterior_main_backCollisionManager.createTemplate eu_titan_exterior_main_backrem collision eu_titan_exterior_main_backObjectTemplate.create Bundle eu_titan_staticObjectTemplate.saveInSeparateFile 1ObjectTemplate.mapMaterial 0 metal 0ObjectTemplate.hasCollisionPhysics 0ObjectTemplate.physicsType 3include eu_titan_static.tweak[\code]Remdul create a collision mesh importer for max which is on his BFMeshView site:  http://www.bytehazard.com/bfstuff/

I will have to look for BF2 shader wrapper, I think I have it on an external hard drive somewhere.

I will track down and load up the missing textures.

Edited by Dnamro

Share this post


Link to post
Share on other sites

If,as you say "Bots navigate through complex structures better as statics than PCOs"

Have you considered, if their behavior, would be better,if 1 minute was spent, remming out the Titans entry points and AI Templates

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×