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.

Work in Progress / WOLFextra - FREE DBpro addon! Need a command??? Ask for it!

Author
Message
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 6th Mar 2007 09:18
How about limb counterparts to the existing object screen x(), object screen y() and object in screen() commands?

LIMB SCREEN X (Obj, Limb)
LIMB SCREEN Y (Obj, Limb)

LIMB IN SCREEN(Obj, Limb)

This would be useful for labelling objects with their limb names, limb textures etc. Great for debug...
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 30th Mar 2007 14:55
Hi Wolf,

Just a quick punt and a bug report:

The command
WOLF_SetLimbTextureName ObName, Limb, TextureStage, String

crashes if the texture stage is set as 0


Cheers!
Wilf
FXTC
20
Years of Service
User Offline
Joined: 3rd Jul 2004
Location: CzechRepublic
Posted: 1st Apr 2007 18:26
I like the Frustum Culling,but in dbp work slow with large level.
DLL = speed up

AMD X2 3800+ dual core 1024MB RAM,2x200GB hdd,GforceFX5700GT128MB,IBM21"
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 2nd Apr 2007 04:18 Edited at: 2nd Apr 2007 04:18
I just turned it into a DLL, it's about 10 or 11x faster than the DBP code version. I'm waiting to add LiTs 3DWS importer, together they'll work beautifully.


Come see the WIP!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 3rd Apr 2007 16:34
Sorry for not paying more attention to this. I have been REALLY busy! As soon as things slow down in my schedule, I'll continue!

Drac
20
Years of Service
User Offline
Joined: 10th May 2004
Location:
Posted: 3rd Apr 2007 20:48
I don't think it's possible natively with dbpro, but setting an object's transformation via a matrix directly would be useful as it should be loads faster than converting it from matrix to euler to matrix again. Sounds like that'd be difficult though.

Do, or do not. There is no try.
-Yoda
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Apr 2007 17:56
Object scale x/y/z()

These are currently missing!!!

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 11th Apr 2007 18:40 Edited at: 11th Apr 2007 18:41
Function, getObjectScale...



You can modify it for the specific axis.


Come see the WIP!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Apr 2007 18:59
Yes, but thats much slower than simply getting the objects scale!

Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 11th Apr 2007 21:22
Quote: "Yes, but thats much slower than simply getting the objects scale!"


Then store the scale in a variable and retrieve it as needed.

Terrain Generation has a whole new face.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Apr 2007 23:22
I'm writing functions for people to use, so I don't want to have to tell them to change a variable each time they scale an object!

Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 12th Apr 2007 00:53
Diggs - It shouldn't be too hard to implement that into a dll, if Wolf doesn't do it, check out IanM's Matrix utility Post, and ask there, he may be willing to add it.

Terrain Generation has a whole new face.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 12th Apr 2007 11:37
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 12th Apr 2007 12:17
Quote: "Yes, but thats much slower than simply getting the objects scale!"

It's not all that slow. You shouldn't be using it in real time, so it really shouldn't matter.

Alternately, you could encapsulate the Scale Object command into a function, scaleObject(). Whenever you used it, it could store the scale in an array, which the command getObjectScale() could return extremely fast.

If you are writing functions for people, a DLL probably isn't the way to go with that, since you'd really be distributing the DLL for that function.


Come see the WIP!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 12th Apr 2007 22:00
The rotation/position/scale information are ALL held internally in the DBpro structures inside a matrix. To extract the scale, you have to get the length of the axis vector. In short, any way that you do it is going to be somewhat slow, but it can definately be easily added.

Syncaidius
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 15th Apr 2007 22:26 Edited at: 15th Apr 2007 22:26
Any News/progress?

Epimetheus
21
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 16th Apr 2007 02:29
If it hasn'r already been mentioned, some type of command to subdivide an object into a nodetree would be helpful, however, probably difficult to implement.

Just a suggestion...
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 14th Jun 2007 15:03
Sorry to bump an old thread, but this wouldn't really be suitable in your new thread.

In Dark Basic, when you glue and object to a limb the Object Position and Object Angle commands stop working. You instead have to use the Limb Position and Limb Direction commands, querying limb 0.

The problem is that this is very very slow compared to the Object Position commands. I'm willing to bet that you have a trick up your sleeve that could fix this. I use this extensively in Geisha House for weapon placement. If there was a fast command to return the position and orientation of a glued object, it would be fantastic. I am using WOLFextra in Geisha House, and if this additional functionality wouldn't be that difficult to add then it would help me out a lot.


Come see the WIP!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 14th Jun 2007 17:09
Cash,

I have had some discussions with Mike in past about the speed of the Limb Direction commands. The reason that it is slow is because the global values are not calculated at SYNC. They are only calculated IF you ask for them. Once a Limb Direction / Position command has been called, the global values are calculated and a flag is set so they are not calculated again. Once the SYNC command is called, those flags get reset to false.

I just made an attempt to add commands to do this to be sure only the frame 0 calculation is done. It made no difference. In fact, it seemed slower. I'll see if I can come up with another way of doing it, but it looks like you are stuck for now. Sorry...

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 14th Jun 2007 17:10
That would probably help me out too, as that's how I give weapons to characters in my FPS. I don't usually check for their position though but I doubt it keeps the same position when it is unglued, in which case I'll need it.


Vote today and play the games!
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 14th Jun 2007 17:19 Edited at: 14th Jun 2007 17:20
@WOLF -
That makes sense, to an extent. However, if an object is glued to a limb then it must be calculating the position and direction of that limb in order to position the glued object each sync.

When an object is glued to a limb, it is fast. When you query the limb position and direction of the glued object each loop it is much slower. However DBP does it internally seems to be much faster than manually requesting the information.

Basically, the position and direction of the glued object isn't calculated unless you call it. However, DBP must have already calculated the position and direction of the limb upon which it is glued. That's the information that I want. Since it must already be calculated then it must be fast.

I always know to what limb an object is glued. I can supply the parent limb of the glued object to a function if necessary, although DBP should already know what the parent limb of a glued object is.

What are your thoughts on this?


Come see the WIP!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 14th Jun 2007 17:46
Quote: "What are your thoughts on this?"


I think you should try the new version
I have been able to speed things up a bit. I learned a couple of things too

Here are the new commands:
WOLF_FindLimb0Global ObjNo
Extracts the global limb 0 data from the specified object number
You can then retrieve the data with:

WOLF_GetLimb0AngleX()
WOLF_GetLimb0AngleY()
WOLF_GetLimb0AngleZ()
WOLF_GetLimb0PosX()
WOLF_GetLimb0PosY()
WOLF_GetLimb0PosZ()


Let me know your results!

-Ron

Attachments

Login to view attachments
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 14th Jun 2007 18:45
Very cool. These commands are indeed faster than the native DBP limb commands. Not infinitely faster, but noticeably faster. With 100 sphere limbs (non animated) I gain 20-30 fps with your commands. I'm adding them to Geisha House right now.

I really appreciate this. Every little bit helps!


Come see the WIP!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 14th Jun 2007 18:55
How are you using the actual data?

The data is stored in a matrix. The only "calculation" that takes place is converting the matrix to Euler angles. If you are then applying the Euler angles to another object, the values are then converted back to a matrix again and applied to the other object. If that is how you are actually using the data, a LARGE speed boost could be gained by somehow directly transfering the matrices. You would go from two data conversions to zero

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 14th Jun 2007 19:49 Edited at: 14th Jun 2007 20:13
I apply the orientation and position directly to the weapon objects in all cases except for one. Every character has two hands, so I do this two times for every one screen object per loop. Here's the original code...


So basically, if you made a command that oriented an object to another object's limb 0 orientation and position, it would be absolutely perfect

I'm doing this because a glued object can't have collision, which is the foundation of my combat system. The weaponcube is glued and I just stick the weapon right onto it.

The other situation where I record the position is for the player character when you cast a spell. That's just a one time thing though whenever that happens. The weapons happen every single loop.

[Edit]
I tested the new commands properly now. The positioning looks great, but the limb directions cause the object to spin around crazily. The commands are labeled with 'angle', is it returning the angle or the direction?


Come see the WIP!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 14th Jun 2007 21:24
Cash,
I'll have to look at the problem with the limb angles in those commands. I didn't test the commands very well.

Try these new commands though:

WOLF_ApplyLimb0ToObject SourceObjID, DestObjID
It must be used inside your loop to update each iteration. This will use that matrix directly. It should be SUPER FAST! The only issue with using the matrix directly is there is an internal flag that I need to set that says not to use the rotation vectors. So, the object can not be updated with other rotation/position/scale commands once you use it. I have added a command to release it from using the matrix data.
WOLF_ReleaseObjectFromLimb0 ObjID

Attachments

Login to view attachments
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 15th Jun 2007 05:55
Okay, I've been pulling my hair out on this one. It worked perfectly in my example program, but it wouldn't work in Geisha House no matter what I did.

I then found out that it was culling the objects improperly. Basically, it treated them like they were located at 0,0,0. If the character was on screen near that location then the non animated equip item would appear in his hand.

I tried it out in the example program again and moved the character behind the camera. The same problem happened. The weapons no longer appeared in his hand unless I moved the camera to just the right position.

The first set of commands appear to work the same way as well - they don't seem to return the positions when the object is culled and it treats them as if they were at position 0,0,0.

The problem will probably be very obvious to you. I really appreciate all of your help. Can't wait to see how it turns out


Come see the WIP!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 15th Jun 2007 07:10
Cash,
I'll have to look at it next week. I'm out of town tomorrow morning through Sunday...

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 15th Jun 2007 07:40
Oh sadness Enjoy your trip!


Come see the WIP!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 15th Jun 2007 08:04
A function for finding a free vector. Please.

http://3dfolio.com
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 15th Jun 2007 16:23
What about:

Wolf_getFaceTextureName(obj,limb,face)

[/center]
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 15th Jun 2007 20:53
I have just come across a need for an EXCLUDE LIMB ON command that would work the same as EXCLUDE OBJECT ON. IS that something that you could do?

Thanks



Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 15th Jun 2007 22:57
@ Wolf,

Commands moving vertices/polys out towards camera and away from it, csg commands and mousex/y capturing particular vertices/polys either in this or mesh tools - and WOLFextra in MeshTools paying for MeshTools (of course)?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 15th Jun 2007 23:19
@Scraggle

U said that what i was going to say lol

So exclude limb on is the one we need


[B] - LINKIN PARK - [/B]
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 21st Jun 2007 04:15
Wolf Wolf Wolf!! I've got the GREATEST command EVER!

Check this out - a command that returns a list of objects on the screen. After all, DBP knows what's on screen and what's no. We have no idea. We have to loop through our objects and test them one by one with Object in Screen, but in order to render and cull the objects, DBP already knows what's there, eliminating the need for a slow DBP check.

Here's my fuzzy idea...

integer=Wolf_getObjectVisibleCount()
obj=Wolf_getObjectVisible(index)

For me the problem is that I loop through every item each loop. I test to see whether or not each item is on screen, and I build a list of objects that are on screen, and do that second list I apply all kinds of beautiful code. If I have 1000 items than this is a constant source of slowdown for the game. If I could directly access what DBP was doing then I'd never have to manually build the list myself, it would already be there.


Come see the WIP!
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 1st Jul 2007 12:40
@ Wolf,

How goes this, Meshworks & 3DCM?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 1st Jul 2007 16:57 Edited at: 1st Jul 2007 16:58
Could u make command Wolf_LimbInScreen(Obj,limb) So we could then use something like this..




[B] - LINKIN PARK - [/B]
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 2nd Jul 2007 04:15
Another simple request.

GetCurrentCamera()

http://3dfolio.com
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 18th Jul 2007 00:20 Edited at: 28th Jul 2007 08:22
@ Wolf,

Ping? Ping?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 1st Aug 2007 21:16
Wolf - I currently found a need for something like a 'Point Limb' Command. I know I can work around it currently by using an object, pointing the object to what I want my limbs to point to, then telling my limbs to rotate to the angles of the dummy object. This works ok, but it would be a lot easier (and probably faster) to just point a limb

Visit the Wip!
Epimetheus
21
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Naples, Florida
Posted: 2nd Aug 2007 12:22
Yes, a point limb command would be very useful for my purposes as well.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 2nd Aug 2007 15:23
@ Wolf, you out there?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 2nd Aug 2007 19:26
Sorry guys!

I've been in and out of town lately. I've also been working hard on 3D Character Maker, an update to Enhanced Animations and another "un-announced" cool project (you will hear about it soon ).
I haven't been around the forums much lately because of how busy I have been. So, I haven't really been watching this thread. Things should be slowing down for me soon though. I'll read through the suggested commands and see what I can do!

revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 4th Aug 2007 09:36
How about a way to set unique uv coords to each separate texture stage. now i think this would be wicked complicated, but some sort of CSG subtract function would be cool. that way we could have destructible terrain and such.
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 5th Aug 2007 05:46 Edited at: 5th Aug 2007 05:46
Quote: "that way we could have destructible terrain and such"


This is already possible with the native DBP commands. (and it's fast)

Visit the Wip!
Bush Baby
19
Years of Service
User Offline
Joined: 23rd Apr 2005
Location: A cave beneath Jerusalem
Posted: 5th Aug 2007 16:44
Yeah, but CSG subtract would still be damn nice. Especially if somebody made a level editor that utilized it

#11 - Thou Shalt Practice What Thou Preach
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 5th Aug 2007 22:24
@Bush Baby - This is also possible using native undocumented DBPro commands from FPSC extensions.

PentiumIV 1.60GHz, 256MB, NVIDIA GeForce FX 5200 128MB, AC'97, WinXP Pro SP2, DirectX 9.0c (Feb2007), DBPro 6.6b
http://www.myspace.com/producerolby
http://www.olby.times.lv
Bush Baby
19
Years of Service
User Offline
Joined: 23rd Apr 2005
Location: A cave beneath Jerusalem
Posted: 6th Aug 2007 02:01
Undocumented DBpro commands from FPSC extensions doesn't exactly sound native

#11 - Thou Shalt Practice What Thou Preach
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 6th Aug 2007 02:20
i really need a command to make my camera or object slowly turn toward a certain xyz.

vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 6th Aug 2007 03:03
EZRotate does that



Login to post a reply

Server time is: 2024-11-24 03:49:20
Your offset time is: 2024-11-24 03:49:20