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.

Author
Message
shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 8th Oct 2012 23:36
hi, how can you read the info of a .dbo file created with 3dws so that you can position other 3d models within darkbasic pro by using some markers within the .dbo file? dunno if i asked that as clear as i could! but i basically want to put some markers within the .dbo and get db pro to read the location of the markers within the .dbo and then position another 3wd object at that marker! thus making level creation easier than manually putting in position data!

Hail to the king, baby!
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 9th Oct 2012 01:09
Create a program that loads and displays the .dbo, places, positions and edits the markers you want, and saves the extra information into a separate file.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 9th Oct 2012 04:21
shadey - The method I currently use is making a cube somewhere and applying a transparent texture with a specific name...

I then use that name [it is given to the limb inside the .DBO/.X] using limb checks and then identify the limb ID and there you go...

There are other methods which I intend to look at soon but for now that is my current process...

Mr Bigglesworth
18
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 9th Oct 2012 15:30
Or use Mapscape, it has native DBP support (it was made in it), all the features of 3D world Studio, and a entitiw and zone system.

http://www.evolved-software.com/mapscape/mapscape
shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 9th Oct 2012 22:03 Edited at: 9th Oct 2012 22:05
Mr Valentine, could you show me some example code wise please? As for mapscape, I already had tried that proggy but it didnt seem to want to carve or do much menu wise, I suspect it may not like windoze 7 very much!

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 9th Oct 2012 22:07
Examples of?

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 9th Oct 2012 22:08
examples of: Applying a transparent texture with a specific name...

I then use that name [it is given to the limb inside the .DBO/.X] using limb checks and then identify the limb ID and there you go...


I presume this is some neat function you have wrote in dbpro?

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 9th Oct 2012 22:10
umm... I can produce an exe showing but I think my limb code is from Dark Source and I just modified it to my needs...

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 9th Oct 2012 22:15
Ah,fair enough then! I will try and work it out I suppose.tnx for your help

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 9th Oct 2012 22:27 Edited at: 9th Oct 2012 22:28
yup, was in DarkSource

Quote: "•GetLimbNames - shows the limb names of a loaded model"


But you could always look at the example code that comes with that command... [EDIT - as in anything LIMB code related...]

You have the theory and method, just look for the relavant code... part of the fun is putting the code together...

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 9th Oct 2012 22:43 Edited at: 9th Oct 2012 22:47
yeh,never looked at the limb command enough,or ever used it in fact! but i know it exists for sure,i think i see what you meant clearer now about a transparent texture, the problem is though i am using physx for db pro and i apply a rigid body static mesh to the loaded object, so using invisible object may just make a player bump into something invisible!
**
But then again if i can grab the limbs name in db pro,delete it after grabbing its coords and replace it with an enemy model or whatever at them grabbed coords, then hell that could work!

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 9th Oct 2012 23:13
You can of course use a visible texture... I only suggested an invisible one so that you could delete it even if using dynamic loading... and place other objects in its place... say... a flame animation...

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 10th Oct 2012 11:49 Edited at: 10th Oct 2012 12:07
hmm! i have tried a few things but i am unable to get the classname of the limb in the dbo file, so i can delete that certain limb.
there is a command in darkbasic pro called limb name$ but that lists everything to do with that limb and not just the specific classname
As can be seen here:
http://i47.tinypic.com/2s1ao.png

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Oct 2012 11:54
Ok I could at least tell you the pseudo code and commands involved ^^



Hope that helps...



shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 10th Oct 2012 12:39 Edited at: 10th Oct 2012 13:38
ok i tried again with code, in the 3dws i named a texture brick2 and textured 2 blocks with it, then i used this code:





Amazingly it doesnt error and presumabely removes a limb,but i dont see it removed1 and v2$ doesnt get to equal "Worked!" coz i have it printing that string in the main loop
like this:






**edit**
also i tried "brick2.png" before but still didnt work,the texture is def called that
So hell I have no idea now!!

Hail to the king, baby!
shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 10th Oct 2012 13:28
actually it doesnt delete/remove anything coz for some reason it never finds the texture name!

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Oct 2012 14:38 Edited at: 10th Oct 2012 14:48
Try this: [EDIT - This goes inside your iteration of the checklist...]



Also, after you remove the limb, you need to refresh the checklist so perform another checklist after the limbs have been removed...

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 10th Oct 2012 15:28 Edited at: 10th Oct 2012 15:33
After alot of messing around,i found out that the problem was when i introduced a lightmap,without it this code runs fine:





of course i did change abit of code but only for a visual of the names to see what was going on!

I hope this little waste of time of ours serves as good use for anybody else wanting to do this!!


** edit **
tnx for the suggestions anyhow Valentine, i had tried the exists thing before but anyhow!

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Oct 2012 15:32
A result then I gather

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 10th Oct 2012 15:34
yeh kinda,of course i don't have any lights now so it has ended up a catch 22 thingy! lol

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Oct 2012 15:53
Export the erm thing as a .X I found texture issues with .dbo... and my view on .dbo is it is an old format which was designed to fit a purpose and that theory of mine is that it was created to support slow machines back in the days...

So try .X and your lightmap should work fine...

Let me know the result...

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 10th Oct 2012 16:02 Edited at: 10th Oct 2012 16:10
I not too clear on lighting using .x, i know it creates 2 models and i think you ghost the lightmap model yes?


Anyhow i added some more code to highlight just what i was trying to achieve! which is to delete unwanted limbs and replace them with a model of your choice at them coords,also slammed in a couple of rem statements to make it slightly clearer... here it is for anyone to look at:








baddiecount of course is just some var i set high like 5000 initially so as to avoid making the same object twice!

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Oct 2012 16:20
To be honest with you... I am waiting for Max P to update his converter for Dark Occlusions for 3DWS models... as I need .X not .DBO so I have forgotten what using 3DWS with .X is like... I should check it tonight... but yeah there was some sort of ghosting or whatnot... I cannot run 3DWS on this machine right now but will take a look tonight...

Also well done with that process! it's pretty much how I would handle object placement...

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 10th Oct 2012 16:22
yeh tnx,and tnx for the suggestion of getting the texture name of the limb,this indeed does seem to be the only way and worked in the end!

Hail to the king, baby!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 10th Oct 2012 17:05
Happy to help!

Another +1 for the MrValentine



Oh and it was nice of you to share the code for future readers!

If you got the cash spare... Dark Source has a lot of nifty snippets...

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 11th Oct 2012 00:57
Aww my suggestion got ignored...

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 11th Oct 2012 02:41
Quote: "Aww my suggestion got ignored..."


Not entirely... I am already thinking of making such an editor... been thinking it a while now... just waiting for my skillset to improve that little bit more...

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 11th Oct 2012 12:04 Edited at: 11th Oct 2012 12:05
As it goes, with more testing..it strangely only does one limb and no more! So damn, i think I too will try and write my own editor! Probably thinking along the lines of starting with a matrix and using its cells to place blocks there..or something
** Edit **
Especially now I know about limbs!

Hail to the king, baby!
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 11th Oct 2012 15:57
Maybe I'm missing something here but it sounds like you want the objects positions to be saved with the object? If so then you could always use:

add memblock to object

And then place any info you want in that memblock and it will be saved with the object.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 11th Oct 2012 16:18
Scraggle you can do that?

[side joke]

[looks at cat picture...] Yes Scraggle, I shall Obey...

[/side joke]

Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 11th Oct 2012 20:02
Yes you can. It was a request I made with Lee at a convention and he put it in there and then.
He's a nice chap
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 11th Oct 2012 20:05
Shall remember that one...

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 11th Oct 2012 20:29
Quote: "As it goes, with more testing..it strangely only does one limb and no more!"

because your code is wrong!

You shouldn't move throught the limb list from first limb to the last one. You should do the opposite!! Every time you delete one limb in the list your code skips one limb

shadey
16
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 12th Oct 2012 11:10 Edited at: 12th Oct 2012 11:11
Oh,tnx Brendy boy, never knew that, I will give it a go later, I guess you just use step -1 or something

Hail to the king, baby!
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 12th Oct 2012 20:46
Quote: " I guess you just use step -"

yes

Login to post a reply

Server time is: 2026-07-08 03:03:04
Your offset time is: 2026-07-08 03:03:04