Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / Extracting texture from .x file to dds for FPSC model.

Author
Message
Yesiamjames
14
Years of Service
User Offline
Joined: 13th Jun 2012
Location:
Posted: 14th Jun 2012 02:43
Hi,

I'm new to FPSC, I've only been using it for 3 days.

I'm trying to work out how to import my sketchup models in to FPSC. I'm experimenting with using a DNA strand model I made atm just to try it out.

So far I've converted it to a .x file and placed it in /entitybank/mine I've also created a .fpe file by using another file as a template (I haven't got any idea about scripting yet). And I've created a 64*64 BMP for the thumbnail.

Here's the problem. Firstly the thumbnail doesn't appear. The model imports in to the map editor with no problem whatsoever, it even has the original texture. Unfortunately when I test the level it is pure white, no texture.

So how do I get the thumbnail to appear? And how can I use the texture from the .x file or export the texture from it so I can save it as a .dds?

Also don't know if it's relevant or not but FPSC seems to have automatically created a few files: d.dds, DNA.bin, dna.dbo

destroyer of the illogicons!
J Swain
15
Years of Service
User Offline
Joined: 28th Dec 2010
Location: Sweden
Posted: 14th Jun 2012 15:15
The thumbnail must be a bmp file with the same name as the fpe file.

You must open the fpe with notepad and set the path to your texture file.
Poloflece
16
Years of Service
User Offline
Joined: 14th May 2010
Location: Australia
Posted: 14th Jun 2012 15:47
Hey, welcome to the tgc forum, great to see someone making their own custom media for the program.

The .x file does not have a texture within it, so unless you have 1 single texture file. I'd believe that somewhere on the forum there is a multitexturing tutorial for sketchup (I imagine you textured the model in sketchup) to fpsc but I have been unable to find it.


Cheers

Poloflece

Yesiamjames
14
Years of Service
User Offline
Joined: 13th Jun 2012
Location:
Posted: 14th Jun 2012 17:16
Yeah I've been told that .x files don't have textures but this just doesn't make sense. If I import the .x in to the map editor I end up with a textured image:



But as soon as I get in to the game it appears white.



If I try entering anything to the textured line I get white in the map editor and invisible in game. Prehaps it's because I used colours applied to faces in skechup rather than textures.

Also the thumbnail still doesn't appear even though I've made sure it's a 64*64 bmp with the same name as the fpe (I've even checked it's nothing to do with case sensitivity).

Here's the fpe in case there is something I'm doing wrong here.

;header
desc = dna

;ai
aiinit = appear1.fpi
aimain = default.fpi
aidestroy = disappear1.fpi

;spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0

;orientation

model = dna.x
offx = 0
offy = 0
offz = 0
rotx = 0
roty = 0
rotz = 0
scale = 100
fixnewy = 0
defaultstatic = 1
materialindex = 15
collisionmode = 0
strength = 0
isimmobile = 0
soundset =
soundset1 =

;visualinfo

textured =
effect =
castshadow = 0

;Animationinfo
animmax = 0
anim0 = 0,0
[href]null[/href]

I've got a feeling I'm gonna need a lot of help lol.

destroyer of the illogicons!
anayar
16
Years of Service
User Offline
Joined: 19th Aug 2009
Location: Minneapolis, MN
Posted: 14th Jun 2012 18:14 Edited at: 14th Jun 2012 18:16
Multitextured models must be set to dynamic also the textures you used should all be in the same folder as the x file. I HIGHLY recommend taking a look at the official community guide put together by nickydude as it covers this as well as hundreds of other useful topics.

Also you must leave "Textured=" blank.

Cheers,
Anayar


For KeithC
Yesiamjames
14
Years of Service
User Offline
Joined: 13th Jun 2012
Location:
Posted: 15th Jun 2012 00:18
I've got it working now I think the problem was that the DNA model used colours rather than textures. I decided to import a larger model I was working on to see how well FPSC would handle it.



The tank is something like 30,000 polygons (due to it having over 100 guns) and it is 80m long. I'm having 3 problems with it.

1. Collision seems to be box based rather than by polygon.
2. Physics glitch (it falls through the floor if I don't turn physics off.)
3. black bits on the texture are transparent even though I haven't turned transparency on.

Is there a way around these problems?

destroyer of the illogicons!
unfamillia
15
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 15th Jun 2012 10:48
Hi Yesiamjames,

Welcome to the forums.

Get this Entity Maker Then import your model and your texture, then click the save icon. It will ask you if you want to have Box or polygon collision. That should sort your collision issues.

The black parts being transparent are because FPSC, as an engine, treats pure black (0,0,0) as transparent. What i do is, open up Gimp or Photoshop, select by colour, choose the black parts of the texture and turn up the brightness a tiny bit, just enough to take it from pure black. That should solve your transparency issues.

As for the physics; is the tank supposed to move or is it a static entity?

Unfamillia

[url=www.touchoffear.webs.com][/url]
anayar
16
Years of Service
User Offline
Joined: 19th Aug 2009
Location: Minneapolis, MN
Posted: 15th Jun 2012 15:03
@Unfamilia: This wont work as Entitymaker requires that you have one texture on your models. He's trying to get multitextured models working.

@Yjames: To change the collision find where it says "collisionmode=" in the .fpe and change the value to either 2 or 3 (do a quick search on this as I'm not sure of the value).

Cheers,
Anayar


For KeithC
rolfy
20
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 15th Jun 2012 15:25 Edited at: 15th Jun 2012 15:50
If your using more than one texture you need to make the entity dynamic, if your entity is dynamic the only collision you will get is box (collisionmode=1 for poly collision but only if entity is static).
Usually an entity with 30,000 poly's would crash FPSC, occasionally it wont and looks like you were lucky this time (I think this is because your model is dynamic and you haven't forced FPSC to calculate poly collision for all those faces...yet).
If your entity was static and using a .dds texture which doesn't use an alpha channel, export as DXT1, you wont get any problems with pure black colours.
You need to learn to uv unwrap your models and you need to learn low poly modeling you definitely need to learn not to use high poly models in game engines. At 80 metres long if the tank is supposed to move it wont be going very far in FPSC and that's the only reason to make it dynamic (using multiple textures may be convenient but you should learn to unwrap).
Break your model down into smaller parts and build it in editor rather than trying to throw one huge entity in there.

Awesome! Its one of those threads.
Yesiamjames
14
Years of Service
User Offline
Joined: 13th Jun 2012
Location:
Posted: 15th Jun 2012 16:03
Thanks for your help. Does anyone know how to convert a multitextured image to a single texture? Where possible I'd rather do this.

destroyer of the illogicons!
Poloflece
16
Years of Service
User Offline
Joined: 14th May 2010
Location: Australia
Posted: 15th Jun 2012 18:37
You would need to uv map your model to allow it to be all on a single texture, I suggest you use a program like lithunwrap to do this. It is pretty tricky to get your head around though so I recommend you look up a tutorial.


Poloflece

Yesiamjames
14
Years of Service
User Offline
Joined: 13th Jun 2012
Location:
Posted: 16th Jun 2012 01:18
Downloading Lithunwrap now Lol this is getting rediculous, I've had to download about 20 new programs in the last week. Thanks for your help though everyone. Hopefully in time I'll be able to give this much back once I've learned a bit more.

destroyer of the illogicons!

Login to post a reply

Server time is: 2026-07-05 11:31:05
Your offset time is: 2026-07-05 11:31:05