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.

DarkBASIC Professional Discussion / Problems with FPS Creator entity textures

Author
Message
Kingius Returns
11
Years of Service
User Offline
Joined: 17th Oct 2013
Location: UK
Posted: 3rd Nov 2013 20:10
Has anybody else had problems with FPS Creator entities, which are basically .x files and DDS textures, when imported into DB Pro with the Load Object command?

Sometimes I have to load the DDS manually as an image and then it appears, as if by magic on the model. Sometimes it just works by itself. But then there are times when nothing I seem to do makes the texture appear on the model; loading it up and manually applying it the model. And yet these models appear textured properly when inside FPS Creator and I can see within the FPE file the reference to the exact texture it's using and so can eliminate that from the list of possible points of failure.

Any ideas about what can be done?
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Nov 2013 21:13
If they are simple text format X files then you can just open them in Notepad and look for file names and see what's expected. That assumes the files are specified in the X file which they might not be.

Have a look at some standard examples to get the idea. If you locate the "harp.x" model in your DBPro Media/Models folder and open it in NotePad you'll find somewhere in the file the following lines:



That's telling DBPro to look for a file called "harp_0.bmp" in the current project folder. If your file is called "harp.bmp" for example then DBPro won't be able to use it from the x file information and you'd need to rename it.

That advice won't work for all X files. If the X file is a large text file I usually open it in Wordpad instead since Notepad struggles with large files. If the file is in binary format then you're a bit stuck without access to a decent modelling package.

Another complication is that objects which use multiple textures can't always be textured correctly using builtin DBPro commands.

Hope this helps.

If you're stuck try posting a specific example either here or in the FPSC forums - there should be lots of people who can help you there.



Powered by Free Banners
BlackFox
FPSC Master
17
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 3rd Nov 2013 21:22
As Green Gandalf pointed out, you will need to check the X file to see what the extension is being called. Even in FPSC it sometimes happen. If the X file points to DDS but a PNG texture is used, then no texture will show.

Also, did you remember to glean any information from the information I provided you here? As you can see from my screenshots provided, I make our levels in FPSC, then import into my DBP app to look at it and see if anything needs adjustment, etc. All my textures show up because I not only load the model, but also since the model references the texture file(s) and the level is loaded in a "similar fashion" to how FPSC does it, it points to the folder where the textures are. I lay out my folder structure for loading the media the same as FPSC does. In other words, you may need to set paths, etc in your code so the model and such know exactly where to look for the pieces according to your needs.


There's no problem that can't be solved without applying a little scripting.
Kingius Returns
11
Years of Service
User Offline
Joined: 17th Oct 2013
Location: UK
Posted: 3rd Nov 2013 22:07
DDS file is in the same folder as the .X file which I'm loading. It is the correct DDS file for the model because it is referenced in the .X file itself. As a double check I also confirm that the FPE references the same file (which it does).

The .X file itself I can't post here because it's part of a paid for model pack. However I can tell you that I can load other entities and .X files (say, one from Turbo Squid) fine and the textures do work when I load them up and apply them. What I'm needing to know is any extra steps that people take when they hit problems like this. The entities that I'm trying to load are characters. The Vikings work fine... others I'm not getting textures appearing using the same code, or any other code I'm trying.

As a quick tip, I recommend using Notepad++ to look inside files and not Notepad or WordPad because it's a MUCH better text editor. It also has plugin support for things like Hex edit mode, XML formatting and so on. Also, you can right click a file and go 'open in Notepad++' on any file; even binary ones, so it's super convenient.
BlackFox
FPSC Master
17
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 3rd Nov 2013 23:29
Quote: "What I'm needing to know is any extra steps that people take when they hit problems like this. The entities that I'm trying to load are characters."


I wish I could offer more, but I made our developments so I can create the core level (geometry) in FPSC, build the entire level(s) as a complete build, then port into DBP and go from there. I coded it to use the "level#.zip" files from the build, which is where I also copy the associated folders such as texturebank, segments, etc. That's why I mentioned the folder structure, but perhaps my method is for using the actual FPSC level along with the media whereas yours is more porting the media only into your project.

Quote: "As a quick tip, I recommend using Notepad++ to look inside files and not Notepad or WordPad because it's a MUCH better text editor. It also has plugin support for things like Hex edit mode, XML formatting and so on. Also, you can right click a file and go 'open in Notepad++' on any file; even binary ones, so it's super convenient."


I like Notepad++, but we actually use TextPad ourselves. But you are correct- it is nicer to edit the files with either Notepad++/TextPad.


There's no problem that can't be solved without applying a little scripting.
Kingius Returns
11
Years of Service
User Offline
Joined: 17th Oct 2013
Location: UK
Posted: 4th Nov 2013 08:33
I'm actually doing a similar thing; I'm also importing levels from FPS Creator into DBPro but I have that working fine. Your solution for this sounds more advanced than mine because you are able to look inside the zip file. Very neat. I have to copy the files from the zip file and load those.

I also load up entities such as doors and switches and have solved problems with those. Some of the switches are animated, which is great as I can play the switch moving inwards within DBPro. Now I'm on character entities.

I'm not trying to replicated FPS Creator but use the assets I have in a more flexible engine which I've got full control of.
BlackFox
FPSC Master
17
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 4th Nov 2013 21:31
Quote: "I'm actually doing a similar thing; I'm also importing levels from FPS Creator into DBPro but I have that working fine. Your solution for this sounds more advanced than mine because you are able to look inside the zip file. Very neat. I have to copy the files from the zip file and load those.
"


Originally, I was copying the required files as well. Later I switched to using the "level#.zip" files which made things easier. All I have to do is place the zip files, and copy the required textures for entities/segments. I use the build from FPSC to do this so I know exactly what I need.

I don't know if this will help, but it was a discussion on loading FPSC level with entities. Ched80 got the furthest in this post. He set his code up more or less similar to what the FPSC source does. Mine is also setup in a similar method, but it has more features that work within my app. I am not sure if that is of any use to you, but I thought I'd direct you to it just the same.


There's no problem that can't be solved without applying a little scripting.
Kingius Returns
11
Years of Service
User Offline
Joined: 17th Oct 2013
Location: UK
Posted: 4th Nov 2013 22:51
Thanks, I'll take a look

Login to post a reply

Server time is: 2025-05-15 22:38:11
Your offset time is: 2025-05-15 22:38:11