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 / jGpuSkin - Skeletal animation plugin for DBPro

Author
Message
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 24th Nov 2017 03:49 Edited at: 24th Nov 2017 03:57
Quote: "I'm not sure what you mean by "multi-animations". The plugin already allows playing unique animations on a per-bone basis"


Yes which is perfect for 99.9% of what I need.

I am creating this function in order to give a little bit extra to the gaming experience, going further than is necessary because I want the animations to enhance the look of the behavioural AI and character conditions. And I want this function to be used for facial expressions in the future.

I will create two animations for certain character states and behaviours, and use a value to mix the two or three animations together. It is easier for me to play 2 or 3 animations to represent a result; than to produce, index and lots of animations for each possible state.

For example

Given a level of player character energy; a low interpolation value of 0.0 would play a tired sequence, and a value of 1.0 will play a full energy character sequence. 0.5 will play a half tired sequence. I will not have to produce and export a median animation; just mix the two extremes. I can also blend in another animation which causes the character to shake slightly as it receives damage, while playing the base animation. I've added a timer to exclude the additional animations when they are no longer required.

Another example is for running; a low value of 0.0 would play only the jogging animation, a value of 1.0 will play the sprinting animation, and 0.5 will something which will look like a mixture of the two. If the character is holding a heavy item on its shoulders; or has just landed from a high jump, I will have the option to include an additional animation with an exhausted running sequence. I can also randomize the influence of each extreme so that the running does not look robotic.

Pretty much the interpolation of animations, much like the Interpolate frames function in your plugin.

It just makes things easier for me in Blender and the animation database; the less animations I need to define, the better.

This will all slow down the performance, but I have a feeling that shorter development time and 'natural' limb movement will be worth the stretch.

Sorry if the explanation is not clear, this is something I just see in my mind, but find difficult to put into words.
Quote: "
I see some problems with this implementation; DBPro's and jGpuSkin's bone rotation angles are not equivalent"


While using your system, the DBPros objects will all be excluded. I am just using them to store bone positions and rotation values. There are 100s of instances of the LIMB POSITION X/Y/Z function, with various local variable names. I do not want to change all of that code because that tends to lead me to making mistakes.

So what I am doing is storing the position and rotation returned from AnimBone_GetPositionX( pAnimBone, Mode ) using world coordinates, into the limb rotation value. (Edit - I might need to replace limb direction functions, with limb angle functions, but that will not cause any issues)

This is all what I see in my head at the moment, I have just written the basic code thus far; but am confident it will work. And will show the end result in the release.

If I fail to accomplish this all, I will just fall back to the basics.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 24th Nov 2017 04:14
Ah now I see. Thanks for the detailed description, everything is quite clear now.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Nov 2017 09:57 Edited at: 27th Nov 2017 22:09
Hi everyone, Here is a beta version which contains quite a few modifications and bug fixes. The only change in terms of functionality is that AnimObjects no longer require an object/shader to be applied,they can now be used purely as animated skeletons for reference by other libraries. Let me know if you find any bugs.

[EDIT] Download removed.

Attachments

Login to view attachments
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 26th Nov 2017 20:36
Nice idea; I'll install it and let you know if any bugs occur.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 27th Nov 2017 03:02 Edited at: 27th Nov 2017 03:03
I have gotten the plugin to work in my game; I am just preparing basic animations before proceeding with the detailed.

There is an issue were a few vertices are being stretched to a fixed location in the world. My first assumption is that the vertices have no weights; but this is not the case; confirmed by the Blender ungrouped vertices menu command.

When the character is near 0,0,0, the stretching is reduced, assuming the character in your tool is at 0,0,0 - the vertices have some kind of absolute world position for some reason.



A lower detailed version of the character causes the issue at a different location on the mesh. The further away from 0,0,0, the



When loaded into your tool, or example code, or my engine near 0,0,0 - the affect is not pronounced.



Do you have an any suggestions as to how I can find the cause of the problem? Does this seem familiar to you? Mesh link have been sent to you via PM
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 27th Nov 2017 20:44
Thanks again for the timely assistance.

For others who may experience this problem. There is something in the Blender export .X format which may cause a small number of the vertices to pose inaccurately and get stretched to point 0,0,0.

The first solution suggested was to import the .X file into FragMotion, then export it as a DBO; then import it into the jGPU Skin tool. A permutation matrix of 1,0,0, 0,1,0, 0,0,-1 will be required to fix the rotation of the imported mesh.

I have yet to try, but this solution might work if you use Save Object in DBPro code, or export from another .DBO exporter.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 27th Nov 2017 22:08 Edited at: 1st Dec 2017 03:40
You're welcome man, glad to hear that fixed the problem. Here is another small update which corrects a bug with world-space euler angle calculation.

[Edit] Download removed.

Attachments

Login to view attachments
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 28th Nov 2017 15:21 Edited at: 28th Nov 2017 16:09
Hey Chris, I just noticed something is going wrong with the normals after re-exporting from Fragmotion. Either the normals are being modified, or I got the permutation matrix wrong. Will let you know if I find anything.

[Edit] Seems both problems are happening... Firstly the proper permutation matrix is: -1,0,0, 0,1,0, 0,0,1. Secondly Fragmotion is inverting the normals along the X axis (or rather, not transforming them alongside the positions); this can be fixed in the shader but I suggest correcting the vertexdata using something like:
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 29th Nov 2017 18:03
Thanks a lot for your analysis. That would have led to issues when writing the diffuse shader.

Prior to using the suggestion above, I noticed that the converted character was facing backwards. I used an offset rotation on the model to correct this thinking that was all that was wrong.

I have now implemented what you suggested.


Tonight I will be trying out your other plugin to see how can improve the performance so I can establish a level completion strategy which will yield the best results.

As it stands I have implemented regular instancing of parts of the buildings and terrain. I am finding that high instance object counts, low limb counts is very efficient for memory, but not efficient when it comes to CPU usage. So obviously, increasing the limb count and reducing the object count does well to boost CPU performance, but it is not practical for running large worlds in 32bit executables. So I am trying to find the sweet spot of having enough memory to avoid crashing in late game, and enough performance to run the game successfully on cheap hardware.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 1st Dec 2017 03:38 Edited at: 18th Dec 2017 00:48
[Edit] Download removed, see first post for latest release.

Attachments

Login to view attachments
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 1st Dec 2017 19:31
Well that's interesting because I was loading having to load separate objects for each LOD level, prior to using your plugin. Your solution looks a lot more efficient.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 7th Dec 2017 00:29 Edited at: 18th Dec 2017 00:49
[Edit] Download removed, see first post for latest release.

Attachments

Login to view attachments
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 9th Dec 2017 07:11 Edited at: 9th Dec 2017 07:11
Hi everyone,
Here is an example which shows how to render large numbers of AnimObjects using my jGfx plugin's GeoInst command set. Using this method does mean sacrificing animation quality due to sharing source AnimObjects across multiple instances, however I think it could be expanded upon for RTS games or maybe even "Ultimate Epic Battle Simulator" clones. I'm very interested to hear framerates across various GPUs, Please post your GPU specs and FPS. This example yields about 165fps @10,000 zombies on a Geforce GTX1050ti, but it could be considerably faster if combined with a proper culling scheme.

Attachments

Login to view attachments
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Dec 2017 08:51
36 FPS : 10000 Characters

Below average gaming PC

AMD A10-6800
8GB Ram
NVidia GeForce GT 740 - 4GB Ram

I was going to try out jGFX plugin with the jGPU skin objects; you beat me to it. This is going to be very useful for rendering crowds.

As you stated, fantastic method for someone wishing to make an RTS or epic battle game like Total War and War Band.

These example projects are extremely helpful.
James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 9th Dec 2017 09:07
83fps, specs in sig
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 9th Dec 2017 09:51
Thanks guys.

@Chris - Sent you a PM
Chris Ritchie
12
Years of Service
User Offline
Joined: 7th Jan 2006
Location: Norn Iron
Posted: 9th Dec 2017 20:52
79 FPS

AMD FX6300 3.5ghz
8GB Ram
NVidia GTX 660 ti - 4GB Ram

Looking very good revenant

Lead programmer ULIDIA
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 10th Dec 2017 07:57
Thank you
Ortu
DBPro Master
10
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 10th Dec 2017 16:43
very impressive
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 10th Dec 2017 23:00
Thanks Ortu
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 18th Dec 2017 00:55
Updated the first post with a new version.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 18th Dec 2017 03:15 Edited at: 18th Dec 2017 03:16
Quote: "Added Mesh tools for flipping vertex normals along each axis."

Lovely. I will need to remember to use this; sometimes it is quite difficult to tell that the normals are the wrong way round when certain shaders are applied.

Quote: "Added the abillity to force a specific mesh LOD when rendering each camera."


This seems like a fantastic feature; I am using a number of camera's for cutscenes. I also been using a single camera to image process to display multiple views of the same scene simultaneously. I am assuming that based on the camera's current position, the LOD system will adjust accordingly as I call SYNC CAMERA; or II would also need to call an jGPU update on all actors prior to the SYNC CAMERA call.

My next experiment involve the implementation of customizable clothing and character appearance.

For character editing, I am thinking of have a number of base meshes, female or male, that the players will select. The next step will involve tweaking the appearance of the face and body using slider controls. I think I will have to use a vertex shader function to adjust the appearance of the mesh. I think the GPU will handle this more efficiently than the CPU, which would need to run a calculation on 10s of 1,000s of vertices on every player and NPC which comes into rendering range for the first time, not to mention on every adjustment made in the character editor.

For clothing (and hair), based on the experiments made with your plugins it would seem that storing all possible items of clothing to be included in as few limbs as possible. These would also need to fitted to the specific base character mesh. The workflow will be made more efficient if I need not export, convert and import too many models. In the game, without usage of the native limb functions, I could exclude any invisible clothing using mesh exclusion, LOD functions and the last resort, vertex to pixel clipping in the shader.

If any of that sounds incorrect, let me know.

Minor feature requests:
First feature request is for the tool version to be displayed in the about box or a splash screen. (The .exe import file was renamed so I ended up using the old version thinking it was the new one)

I will need to keep mesh counts low for optimal work flow. If for some reason in the future I would need to export 100s of meshes; it would be ideal to be able to run command line conversions or batch conversions within your import tool. My second feature request for the future. For me this is a minor feature because I do not want to be in a situation where I'd need to convert more than 30 meshes; but this is just a prediction. If it is not too difficult, in a future update please provide a command line conversion or batch conversion feature; or DBP U77 and DBP9Ex plugin commands to perform the same task; which ever is easiest.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 18th Dec 2017 05:56
Quote: "sometimes it is quite difficult to tell that the normals are the wrong way round when certain shaders are applied"

Agreed. After importing or loading an object into the tool, it should look like the light is coming from over your left shoulder.

Quote: " I am assuming that based on the camera's current position, the LOD system will adjust accordingly as I call SYNC"

Yep, LOD is recalculated per-camera each time they are sync'd. JGS_Update should only be called once per loop to tell the library how far animations have progressed since the last screen update. AnimObject_Update is used to recalculate skeletal transforms before sync. It is needed if you are not using update mode 2 and need access to bone transforms before sync. It is also needed if you if you manipulate bone transforms, then need to read transforms back before sync (example, rotate parent then try to read child's world position).

Quote: "First feature request is for the tool version to be displayed in the about box or a splash screen."

Quote: "in a future update please provide a command line conversion or batch conversion feature"

Will do; I will add the build date to the about dialog, and will start working on a batch conversion utility for the importer.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 18th Dec 2017 11:14
Thanks for the consideration and information; as helpful as always. The new example code is also extremely helpful.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 19th Dec 2017 09:12
Updated first post with a small update:

Plugin Updates:
-----------------------------------------
-Fixed a crash; Deleting AnimObjects which used update modes 2 or 3 would crash on the next call to JGS_Update

Import Tool Updates:
-----------------------------------------
-Added build dates to the Import Tool's "About" dialog
-Forgot to remove some test code, caused incorrect bind pose matrices with certain objects



I've attached an alpha version of the WIP batch import tool to this post. At the moment the tool is stand-alone and uses a Settings.txt file to pass conversion parameters, The next version of the import tool will contain a GUI-enabled version.

Attachments

Login to view attachments
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 19th Dec 2017 11:02
That was very quick.

I will be testing the new build over the course of the next few weeks and will let you know how it all works from my end.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Jan 2018 18:18 Edited at: 9th Jan 2018 18:26
Hope you enjoyed restful Christmas and New Year break.

I have experienced rather strange behaviour in my NPC storytelling system. Certain jGPU character models are not moving or rotating to specified coordinates; and others are.
The first suspected cause of this problem was some kind of mistake made in the NPC class. I was 100% certain of this because of the clue highlighted in blue below. But now I am only 50% sure the problem is coming from my code because of the clue highlighted in red.

Here is what is happing in my system.
I obtain a new position in an animation and assign it to each actor in a scene. - If the actor is set as the NPC speaking to the player as part of a conversation, the actor successfully moves to the correct position - If the NPC is not set as the one speaking prior to initialization, the NPC does not move to the correct location.

Therefore, the following line of code works only on the NPC set as the speaker in the conversation. Which points to an issue in my code. There are only a few calls to AnimObject_SetPosition; the call for an actor to be repositioned, and a call for the players/dynamic-entities to be repositioned. The last call to AnimObject_SetPosition, per camera, prior to each camera render is the on the actors, that which are the subjects of this concern.



Here is where things get really spooky, and is the reason I require your insight in finding the root cause of the problem. The following line of code was used to apply a sine wave movement to the non speaking NPC, the ones which do not move as expected.

AnimObject_SetPosition ob, x# + Sin(HiTimer()), y#, z#

It turns out the character indeed moves from side to side in a sine wave motion, but from the wrong location; at the characters spawn location, and not the location indicated in my scene timeline.

To clarify, given a standard dark basic object, and an AnimObject, as was used in a test I performed; the dark basic object would move to the correct location, but the AnimObject would not.

To make things even more spooky, both objects, given the same coordinates from the same variables in the same block of code with the addition of a sine wave value; both objects would move from side to side, but the AnimObject character moved from its spawn location, and not the location assigned to it. Throughout the lifetime of the character AnimObject after action starts, nothing appears to assign the character's position to its spawn location.


If that result was not demon possessed enough, get this; the AnimObject_GetPosition returns the location assigned to the character object, the correct location; but the character did not move; or rotate.
Dark Basic U77 - The previous version, and current version of the jGPU plugin


Have you ever experienced any situations where given a series of AnimObjects got positioned and rotated by the set position/rotation commands, and not others?

It appears that have either made a very dreadful mistake in my code, which I have been searching for a number of days; or there is some kind of conflict coming from some kind of iteration or variable assignment block in the plugin code, causing the wrong AnimObject to move.
It would take days, possibly weeks for me to reproduce the error in small program which I could share with you, especially when I am not sure what part of my code could be at fault. There are database parsers, diagram parsers, .NET dlls and Blender scripts involved.
I will continue to look for clues. There a number of further tests I am preparing. If you have any ideas of tests I should perform, it would be really helpful.

Have a good day.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 11th Jan 2018 02:36
Hi Chris,
Other than being sick twice in the last month with no coding time, Christmas was quite nice thanks. I hope your holiday was equally pleasant (minus the illness ofc).

These are the bugs nightmares are made of.. I've never experienced anything like what you describe, so it's difficult to suggest what the problem might be.

The plugin's world matrix implementation is quite simple; only the AnimObject_SetPosition/Rotation/Scale commands modify world matrices, and they merely overwrite the existing matrix values. The world matrix isn't actually applied until the next update, where each bone is transformed into world space before updating the shader's palette array (assuming usage of the "JGSWORLD" semantic) . This should happen automatically at sync-time when using the default AnimObject update mode.

The plugin does not index AnimObjects; The pointer-based nature of the library should rule out the possibility that values are being applied to the wrong object. The AnimObject commands operate directly on memory specified by the pointer passed into them, and AnimObjects are completely self-contained/unaware of each other. The update routines use a linked list to iterate through the AnimObjects, where each list element is referenced once at the top of the loop to obtain the current AnimObject's pointer. Those pointers are then accessed using structure pointers so I don't need to muck around with offsetting addresses and such.

It is extremely strange that your characters obey the sin wave movement yet ignore the initial coordinate values, it shouldn't be possible for the plugin to omit part of the value without knowledge of what that value should be, and the plugin doesn't track position coordinates outside of the values which are over-written (there is no special handling involved). The fact that your objects are able to move (albeit bound to the origin) suggests the world matrix is indeed being updated/applied. I don't want to jump to conclusions but (assuming there isn't a simple typo somewhere) this kinda sounds like it may be a compiler error, omitting the first part of the expression or something.

Sometime this week I'm hoping to get time to run some tests as well. Hopefully we can come up with a simple way to reproduce the problem, without such code these things tend to be extremely difficult to pinpoint.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 11th Jan 2018 19:37
I see. I did try updating the objects, and the system immediately after the coordinate assignments.

I think there could be an issue with me using different cameras and synchronization commands. Each camera view uses the 'SYNC CAMERA' command, with a full SYNC call situated at the end of the loop after the jGPU update.

I will be working on a number tests to try to find out why the assigned and returned coordinates match, but visual locations differ. Swapping the NPCs and meshes made no difference.

I will also rewrite the key functions to avoid any compiler errors.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 13th Jan 2018 09:39
Hi Chris,
Here is a stripped-down version of the plugin which lacks the update management system. This version performs full animobject updates during every sync, and therefore suffers from reduced performance. Culling and LOD remains intact so no code changes should be required for testing. It will help me to rule out a significant amount of code if the problem still happens with this version.

Note: While I don't think it should be causing any problems, Sync Camera is a DarkShader command which is intended for rendering full-screen camera shaders. You may be able to avoid a little overhead by switching to a Sync Mask+FastSync pair.

Attachments

Login to view attachments
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 15th Jan 2018 03:33
Thank you.

I have used the stripped down version of the plugin, and the results are the same. I have not found a solution. For the record; I have not yet used any of the LOD functions, but intend to do so.

I still have some tests to perform at my end for the purpose of finding clues, so I'll keep you posted.

Many thanks for the tip regarding Sync Masking; my camera views are actually rendered images from a designated camera for synchronous cutscenes and comic strips. I have replaced Sync Camera with Sync Mask + FastSync. Any camera shaders can be applied to the images as they are pasted using the ImageKit.

Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 25th Jan 2018 05:58
For what it may be worth; I am posting a quick update on my progress with the problem I have encountered with my code. I continued to work on solving my problem today, and found a new clue at the end of my session.

It is true that when applied to NPCs who are talking, as is obviously implemented in my code, the NPCs go to the correct position. The NPC who is not talking but is set to the position, did not move to the correct position; remains at spawn.

Today's test was to see what happened to all other NPCs and the player if given the target position the offending NPC would not apply, during the update call for the offending NPC.

I expected to see the other NPCs move to the correct position, as they do if applied in their own updates.

The result was that all AnimObjects moved to the offending NPCs spawn location. The variables are all valid because a number of ordinary DBP objects moved to the correct location, and the program log indicates that variables match the correct location, as do the AnimObject_GetPosition command results.

So if there is a compiler problem or conflict, it is applying the spawn position to the animation shader of all AnimObjects and not the new position (and angular) values, during an update call to a certain type of NPC.

I will continue this debugging session tomorrow. I will see what I am going to try next, before I attempt to rewrite the code, I'd prefer to spend a little more time to find out the cause of the problem before diverting around it.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 25th Jan 2018 19:34 Edited at: 26th Jan 2018 03:40
Deception encountered. Assured relief. I just found out where the compiler problem occurred. - EDIT: After further tests, the problem came from broken code dealing with NPC and array management in my code; but I'll leave this post here for reference as to what disclosed the problem.

I assigned the animated values to global test variables instead of UDT variables, and all NPCs moved to the correct location when referencing the global variables.

The variables in use happened to be part of a UDT variable within a UDT array, not that common for me, so I placed the variables inline. Same problem occured.

So I appear to have a corrupted UDT array, or possibly, conflicts within UDT arrays in general; even if the array and plugin returns the correct values, something I cannot determine goes wrong when the plugin applies the values.

This is not the last of this kind of occurance, but at least I and us all know what to look out for. I will write some new UDT arrays or non UDT arrays and hopefully I will evade the problem.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 26th Jan 2018 03:37 Edited at: 26th Jan 2018 03:37
So after seeing the global variables prove that something is wrong with my UDT arrays, and adding new batch of effective logs, I found out what appears to be the route cause of the problem.

The reason why the movement worked for some NPCs and not others is because of duplicate AnimObjects existing in the environment during certain NPC states because of broken code in the DBP project .

The moving objects were excluded, but the duplicates at spawn looked like the real player objects, but should not of existed and were not part of any browsable array . Getting rid of the excess objects resulted in a what appeared to be a missing NPC, but it was excluded. If all happened to be included (which they are by plugin default), I would have seen two copies of the same NPC in different locations, another way the route cause could have been found.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Jan 2018 17:30
Hi Chris,
You have no idea how happy I am to hear the good news. The coding time I had been hoping for never came, making me worry that I had left you hanging. Last weekend my great grandmother hit her head and suffered a mild concussion, so I've been giving her my full attention until she is back to 100% (not to worry though, she is doing quite well).
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 26th Jan 2018 23:22
Quote: "Last weekend my great grandmother hit her head and suffered a mild concussion, so I've been giving her my full attention until she is back to 100% "


I am deeply sorry to hear about the incident. I hope for a pleasant recovery and am sure she is pleased to have your attention.

Don't worry about me, I was just keeping you up to date. These problem solving situations are a day in the office for me; this was just a little itch compared to some of the major program errors I've experienced. It was for the most part bad timing and little hard luck, if the problem occured while I was rewriting the NPC system I would have noticed the cause a lot sooner.

Enjoy the time you are spending with your family. Hopefully I will get the game out to the community so that it can start attracting finance, resources and developers to your plugins.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 27th Jan 2018 01:00
Thanks for the kind wishes, luckily her doctor said it wasn't too serious and to expect a speedy recovery.

Quote: "Don't worry about me, I was just keeping you up to date."

I just still hadn't ruled out the possibility that the plugin was at fault and it was really bugging me lol
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 27th Jan 2018 20:57
For a moment there, it really did look like the problem was coming from the plugin, right up until the point 'it started to work' when I changed some of the code.
Zep
16
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 1st Feb 2018 12:22
Quote: "- Compiled using DBPro9Ex from this version on. If anyone here still uses XP just let me know and I will upload a version compiled with u7_7."


Raises hand. Uses XP. No rush, but I'd like to try this someday.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 2nd Feb 2018 01:24
Hi Zep,
Here is an XP-compatible version of the import tool, I will include both versions in future updates.

Attachments

Login to view attachments
Zep
16
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 2nd Feb 2018 02:33
Quote: "Hi Zep,
Here is an XP-compatible version of the import tool, I will include both versions in future updates."


Thanks, revenant chaos.

Hope I'm smart enough to use it
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 5th Feb 2018 02:34 Edited at: 9th Feb 2018 06:22
Hi everyone,
Here is a beta release which adds the ability to share effects across multiple AnimObjects. Sharing effects improves performance and reduces load times; It is recommended to share effects across AnimObjects whenever possible. Download contains the new plugin and two updated examples.


Updated Commands:
-----------------------------------------
AnimObject_SetEffect pAnimObj, EffectID [, ShareEffects] ;<-New overload to indicate usage of a shared effect

[Edit] Download Removed.

Attachments

Login to view attachments
James H
11
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 5th Feb 2018 03:44
Hi rev, you seem to have forgotten to upload
Win 7 Pro 64 bit SP1, AMD A4-5300 APU 3.4GHz, 8GB DDR3, NVidia GeForce GTX 750 1GB GDDR5, ASUS A55BM-E
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 5th Feb 2018 03:51
Oops, thanks James lol
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 9th Feb 2018 06:21 Edited at: 10th Feb 2018 08:19
Hi everyone,
Here is another beta release which adds dynamic batch rendering via a new AnimBatch_ commandset. Batch rendering reduces draw calls by grouping identical AnimObjects together at render time. The AnimBatch commandset is only compatible with welded AnimObjects which contain 40 weighted bones or less. I've also added a command for returning draw call statistics. Download contains a new plugin, keywords file and a new example project+media.


New Commands (12):
----------------------------------
pAnimBatch = AnimBatch_MakeNew(SkeleFilename$) ;// Creates a new AnimBatch and returns it's pointer.
AnimBatch_Delete pAnimBatch ;// Deletes an AnimBatch and all AnimObjects which exist within it.
iCount = AnimBatch_GetMaxWeightsPerVertex(pAnimBatch) ;// Returns an AnimBatch's Vertex weight requirements; for use when loading the AnimBatch's effect.
iSize = AnimBatch_GetBoneMatrixPaletteSize(pAnimBatch) ;// Returns an AnimBatch's required bone palette size; for use when loading the AnimBatch's effect.
iSize = AnimBatch_GetMaxBatchSize(pAnimBatch) ;// gets the max number of objects which can be grouped into a single draw call.
AnimBatch_SetupRender pAnimBatch, ObjectID, EffectID ;// Sets the Object and Effect which the AnimBatch should use when rendering.
pAnimObj = AnimBatch_GetMasterAnimObject(pAnimBatch) ;// Returns the batch's "master" animobject which is used as a prototype when creating/rendering all animobjects within the batch.
AnimBatch_SetCameraMask pAnimBatch, dwMaskBits ;// sets an AnimBatch's camera mask.
dwMaskBits = AnimBatch_GetCameraMask(pAnimBatch) ;// gets an AnimBatch's camera mask.
pAnimObj = AnimBatch_MakeAnimObject(pAnimBatch) ;// Creates a new AnimObject within the batch and returns it's pointer.
pAnimBatch = AnimObject_GetAnimBatch(pAnimObj) ;// Returns a pointer to the animobject's AnimBatch. Returns 0 if the animobject was not created within an AnimBatch.
Count = JGPU_GetDrawCalls( [CameraID] ) ;// Returns the number of AnimObject draw calls which were performed during the last sync. Returns sum of all cameras if no CameraID is specified.


[Edit Feb-10] Re-Uploaded to include shared effects examples from the previous beta

Attachments

Login to view attachments
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 12th Feb 2018 03:39
Many thanks for the latest instalment. I look forward to trying out out.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 8th Mar 2018 14:32
Hello RC, hope things are good.

I am working on some new animations with some higher poly models.

I encountered an issue with the 19th Dec import tool, some of my verts are missing weights according to the tool; but not Blender.

I sent your a PM just a moment ago with more information. I am posting here to alert you.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 8th Mar 2018 16:44
Hi Chris,
I've been doing quite well thanks, I hope things are going good for you too. Thanks for letting me know, I will look into this as soon as I get the chance.
revenant chaos
Valued Member
11
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 8th Mar 2018 21:38
Replied to your PM.
Chris Tate
DBPro Master
10
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Mar 2018 04:55
Thanks RC.

There is either some kind of bug with the message counter at the top of the page; it said zero messages; or I may of refreshed the conversation without scrolling down to see that there was a new message, meaning that the forum code thinks I saw the message just because it loaded. I will send this feedback to the webmaster, TheNext, who seems to be pretty cool person.

So the models; I remembered that I had changed the Blender layer for my bones a while ago since last using your import tool or DBP. So I wondered if the Direct X exporter only works on bones situated in one layer; in which case is true.

The exporter does not iterate, or recognize BONEs on other layers, even if visible and selected for export. It does however, export meshes on other layers.

This alteration lead to the problem, so I'll have to put the bones in the same layers as the meshes in Blender.

I will have to hire someone to improve on the export script, it is more convenient for me to hide the bones using the layers feature. And quite frankly it would be nice to have an option to export direct to DBO from there, although a simple post-export shell command would take about 5 minutes to write I suppose .

I can probably start scripting blender to send the result directly to your tool via command line to be converted immediately upon export, once command lines are ready.

Thanks for the rapid response.

Login to post a reply

Server time is: 2018-09-22 11:07:13
Your offset time is: 2018-09-22 11:07:13