5 registered members (AndrewAMD, ozgur, Ayumi, 2 invisible),
690
guests, and 10
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Get BMAP's filename...?
#473220
06/21/18 19:34
06/21/18 19:34
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
Is it possible to retrieve a BMAP's original filename - somehow? Recently I've made a post saying that it cannot be done but still, asking does not hurt. I've written a function (for an in-game editor) that combines multiple entities into one. Now I want to save that entity/ mesh as an MDL. That's working to some degree already (mesh + skin points) but now I'm stuck at the skin. All entities use external files as skin textures. Maybe via some BMAP.d3dtex(or ptr?) pointer offset (or GetPrivateData maybe...)? Or some other function that I'm not aware of?
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: Get BMAP's filename...?
[Re: Superku]
#473234
06/22/18 18:51
06/22/18 18:51
|
Joined: Feb 2013
Posts: 122 Maysville, Ga
Evo
Member
|
Member
Joined: Feb 2013
Posts: 122
Maysville, Ga
|
Is it possible to retrieve a BMAP's original filename - somehow?
I'm not sure if this is what you're looking for, but I had a similar problem when developing my 2d game builder and EFX animation editor. To get original file names of external BMAP files, I had to use text_for_dir :
txt_for_dir(TEXT*name, "*.*");
You'll find a basic example in the manual. Just create a TEXT array for reading the strings. It will read the original names of all files within the selected folder and store it all into a TEXT array. Then you can just loop through the array and define/create/point to whatever is needed. I used this to read from a folder and create auto generated lists for external files in my EFX editor.
|
|
|
Re: Get BMAP's filename...?
[Re: FBL]
#473249
06/24/18 12:48
06/24/18 12:48
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
Yeah I could do that but... I don't want to create new bitmaps, the main usage right now is combining entities. Have a look at the following scenario for example: http://superku.de/entCombine.jpgI wrote a code to automatically place thousands of leaf entities around the base mesh (as I couldn't get it to look right in Blender after some time). I actually have a video of that from an earlier version: https://i.gyazo.com/aa7ec68b29ba24c413bc58459aa7f7f5.mp4Another scenario was where I had a bunch of coconuts covering the floor, which I replaced with the click of a button (or 2) by just one entity instead. Having to input the texture files is a little bothersome to me but oh well. Btw. I'd probably compare the buffers directly instead of using pixel instructions, *should* work if you grab the right BMAP member.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: Get BMAP's filename...?
[Re: Superku]
#473250
06/24/18 14:00
06/24/18 14:00
|
Joined: Oct 2007
Posts: 5,210 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
|
Oooh, i was once writing a general purpose editor. What i did was, read extern skin names from MDL7 files, write those to a metadata file(json) along with model name and content/model browser would use those files(also had thumbnail/preview images and other data about files) to show the list of available models. I think you can use a similar approach, either create those files if you have small amount of models or create them with a little script automatically. And use one of the entity skills/strings to remember which metadata file that entity came from and use that to get skin names.
I also remember converting internal skins to extern. But i remember some of those was not available in mdl7 sdk so i manually did some stuff, which ones were missing i do not remember.
3333333333
|
|
|
Re: Get BMAP's filename...?
[Re: Superku]
#473288
06/25/18 19:18
06/25/18 19:18
|
Joined: Sep 2003
Posts: 9,859
FBL
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
Ah I see. Ok, then exporting the bitmaps is not so much of a useful choice. I remember having my problems with MDL7 as well, mainly not understanding the SDK while wanting to write MDL7 files from Lite-C. I ended up exporting a D3D compatible vertex and triangle dump, together with a texture table, so I could easily create a loader and use the D3D mesh functions...
|
|
|
|