Page 1 of 1

Re-applying textures

Posted: Thu Jul 16, 2009 4:32 pm
by daniel
hello me again,
i'm trying to edit the shipped stardestroyer for a space map.for this i converted the imp_cap_stardestroyer2.msh found in data_***/Worlds/***/MSH to an obj.file with repsharpshooters meshtool.Then i impoted the obj file into XSI and deleted/edited a few polygons, freezed everything , saved, then exported it to an xsi file with crosswalk to the msh folder and finally converted this file to the imp_cap_stardestroyer2.msh with repsharpshooters mshex and replaced the original msh file with my new one. everything fine until here. i can import my new msh file to ZE and into the game, changes are there , game works fine. BUT: Neither in ZE nore in the game the object has textures! As i already said, i didn't change these so far.
As you might know, the imp_cap_stardestroyer2(such as most of the props-bldgs , etc.) doesn't have a tga file for the textures but in the game of course normally there is one. So my quesion is: How do i get the originally texture for this onto it again??

thx a lot for advise

Re: Re-applying textures

Posted: Thu Jul 16, 2009 5:15 pm
by MandeRek
You must assign the texture to the obj in XSI or it will be texture-free. I suggest this, since there aren't TGAs to be found:

Code: Select all

1. Open the model up in Hex editor
2. Find all texture names, so ending with .tga
3. Find what parts are fitted with these textures (if you're lucky, it's 1 texture for the whole model)
4. Make some TGAs, with the names you've just found
5. Assign the right parts of the model to the texture with the right name
6. Export, and delete those TGAs you've made in step 4
OR

Code: Select all

1. Open the model up in Hex Editor
2. Find all texture names, so ending with .tga
3. Search through the assets/common files, or with a search program, and see if you have succes finding your texture
4a. If you do, reassign the model with the correct parts to the correct textures
4b. If you don't find them, follow from step 3 in the above plan..
Hehe.. I guess one of these will work!

Re: Re-applying textures

Posted: Fri Jul 17, 2009 5:01 pm
by daniel
thanks. ok i think i'll try both plans.if none of those work i'll just make my own stardestroyer-texture for my ultimate-empire-soace map :stormie: :vader2: :thumbs: .

EDIT
first of all: sorry for the double post :D ,
but i did find a texture that seems to be for the stardestroyer: imp_cap_stardestroyer_dome.
ok,well i've converted all the imp_cap_stardestroyer-files to msh and imported them to XSI.
But when i attach the texture i found to it(regardless if i use cubic,planaerXY,UV,etc. ), it looks completely screwed up. how can i attach it rightly, so that it looks as in the game?

Re: Re-applying textures

Posted: Sat Jul 18, 2009 6:40 am
by MandeRek
There is a big chance that the dome texture is for a dome model (an object which flies through the sky, without other purpose). It might also be that collision and shadowvolume mess it up. Can you show us a pic of how it is now?

Re: Re-applying textures

Posted: Sat Jul 18, 2009 9:06 am
by daniel
I know, normally the _dome files are for the sky-dome things(i know what they are :D ).But in this case it really seems to be for the real stardestroyer because i found another texture that looks exactly like the stardestroyer-dome ingame.(so that's why i think that the imp_cap_stardestroyer_dome belongs to the big one). And sorry no i can't show u a picture cause i don't have a website for image hosting.or is there another way to show u images?

Re: Re-applying textures

Posted: Sat Jul 18, 2009 9:13 am
by MandeRek
http://imageshack.us
^Free for everyone. Anyhow, did you open the original model/msh, as I said, and searched for TGAs? What are the results?

Re: Re-applying textures

Posted: Sat Jul 18, 2009 10:03 am
by daniel
ok well with the hex editor idea i did find the tga file that must be the right one: spa1_bldg_stardestroyer_02.tga .
but when i apply it to the imp_cap_stardestroyer2 in XSI it looks like this( to me it seems that a few parts are right, others are not ): Image (the imageshack thing somehow didn't work for me)

Re: Re-applying textures

Posted: Sat Jul 18, 2009 10:13 am
by MandeRek
daniel wrote:ok well with the hex editor idea i did find the tga file that must be the right one: spa1_bldg_stardestroyer_02.tga .
but when i apply it to the imp_cap_stardestroyer2 in XSI it looks like this( to me it seems that a few parts are right, others are not ): Image (the imageshack thing somehow didn't work for me)
The spa... means it's in BF2_ModTools\space_template\worlds\...\msh

Re: Re-applying textures

Posted: Sat Jul 18, 2009 10:22 am
by daniel
eer..yeah i know that , but i also have it in my data_***/Worlds/... bacause im making a space map. Anyway here's an image ( got is working now):Image That's how it looks rioght now anyway(sry its a bit small)

EDIT: http://yfrog.com/12rec23p

Re: Re-applying textures

Posted: Sat Jul 18, 2009 4:41 pm
by AceMastermind
daniel wrote:...As you might know, the imp_cap_stardestroyer2(such as most of the props-bldgs , etc.) doesn't have a tga file for the textures but in the game of course normally there is one...
All textures for any msh that has a texture are located in the modtools, textures don't just magically appear. To find what textures a msh uses you simply open the msh file with a hex editor and search for all instances of tga.

The textures for imp_cap_stardestroyer2.msh are:
spa1_bldg_stardestroyer.tga
spa1_bldg_stardestroyer_01.tga
spa1_bldg_stardestroyer_02.tga
spa1_bldg_stardestroyer_03.tga
spa1_bldg_stardestroyer_05.tga
spa1_bldg_stardestroyer_06.tga
spa1_bldg_stardestroyer_08.tga
spa1_bldg_stardestroyer_light1.tga
and a detail texture:
spa1_bldg_stardestroyer_detail_01.tga

When we say re-assign a texture that just means you need to tell the object cluster which texture it needs to use, the UVs are still there but it doesn't know what texture it needs.

If you select an object and open up the Render Tree(hotkey 7) then you'll see what's going on, there's only material data on the object, it needs an image node connected to the diffuse port of the material(phong/lambert) and an image(texture) connected to the image node. You can click on the image node then go New>New From File and browse to and select the image that goes with that object cluster.
There's more than one way to re-assign a texture in XSI but if you want to learn more about what you're doing and why then you should use the Render Tree.

Meshtool merges all objects and leaves one material for the whole thing but the UVs are still intact, so you'll need to separate these objects and/or make polygon cluster selections according to what texture they may need, this can be a lot of work depending on which msh you converted.

I would actually recommend the msh>SWBFViewer>Vivaty Studio>XSI approach since it filters out everything but the main geometry used and it keeps them in separate object clusters which makes it much easier to re-assign the textures. This method also requires that you invert all polygon normals since they get flipped in the process, to fix this simply press Y then ctrl+a then right click and select Invert Polygons.

Another way to get the .msh into XSI is to use this method:
.msh > SWBFViewer > .wrl > Accutrans3d > .obj > XSI

Importing asset objects

Posted: Sun Nov 01, 2009 5:10 pm
by daniel
hello,
how can i import objects that already exist in ´the game into XSI ? I know you have to use repsharpshooters meshtool to make a obj.-file of it first and thatn import it into XSI , which works fine but i never get the textures of the object as well. Only the object itself.Does anyone know how to fix this? thx in advise

Topics merged -Staff

Re: importing asset objects

Posted: Sun Nov 01, 2009 6:55 pm
by CodaRez
daniel wrote:hello,
how can i import objects that already exist in ´the game into XSI ? I know you have to use repsharpshooters meshtool to make a obj.-file of it first and thatn import it into XSI , which works fine but i never get the textures of the object as well. Only the object itself.Does anyone know how to fix this? thx in advise
Just get the textures from the assets as well and apply it to the object in XSI

Don't worry, UVs for stock models are alrdy taken care of.

Re: importing asset objects

Posted: Sun Nov 01, 2009 6:58 pm
by daniel
okay well i already got the asset-tesxtures n' all. but hhow EXACTLY do you mean i have to apply 'em ? what tried till now didn't seem to work. thx

Re: importing asset objects

Posted: Sun Nov 01, 2009 7:09 pm
by CodaRez
:shock:

http://www.gametoast.com/forums/viewtop ... 36&t=13539

You can ignore the *unique UVs* part cus stocks alrdy have em.

(But you MUST do that steps for ur own models k?)

Re: importing asset objects

Posted: Sun Nov 01, 2009 7:22 pm
by daniel
i know how to apply textures n stuff in XSI :P . what i meant specific for this case. i just want to add the textures of an object in XSI correctly and exactly in that way as the texture should be - u know what i mean?- i don't wanna have to apply them all over again by myself. And thats exactly what i can't find out how to do.

Re: Re-applying textures

Posted: Mon Nov 02, 2009 10:58 am
by DarthD.U.C.K.
thats not possible using the obj-format (and there arent less complicated ways of importing models from battlefront)

Re: Re-applying textures

Posted: Mon Nov 02, 2009 11:46 am
by daniel
ah . okay then.