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 / Fastbone shader doesn't work with my models

Author
Message
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Sep 2012 23:56
Hey guys


I'm working on an RTS/RPG game and naturally there will be a lot of units on the screen, so I tried to apply a fastbone shader to the units.

The shader works with every model except for the unit models. I didn't make the models, but they all originate from one person and have been exported from 3DS Max using the Panda exporter.

I have attached an example. The program just crashes.

Any help?

TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown

Attachments

Login to view attachments
Xystus
20
Years of Service
User Offline
Joined: 2nd Sep 2003
Location:
Posted: 1st Oct 2012 00:58
I had a lot of problem with panda exported.

Try exporting without materials and use native dbpro commands to texture the object.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Oct 2012 13:13
Do you have an example with fewer limbs, less than 60 say? Also, can you provide a text file version of the model so we can see what the problem is?
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Oct 2012 20:03
Sorry this is taking so long. Our character modeller is currently not available, I'll upload the necessary media when I receive it.

TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Oct 2012 15:33 Edited at: 3rd Oct 2012 15:49
No problem.

I suspect your problem is connected with the numbers of limbs and vertices in your model. The fastbone shader you're using is an old one and uses a bone matrix palette with 32 entries. DBPro now supports 60 (look at the bone shaders in your Compiler/Effects folder). However, it's possible your model requires a larger palette in which case it might not be possible to display it correctly using a bone shader in DBPro.

Your program runs without crashing if you turn off the tangent calculations by using



However, the bone shadered version doesn't display correctly.

Tangents and binormals seem to be calculated by default in DBPro even when they're not used by the shader and their calculation can slow things up enormously at load time (but that's not your problem here). They also take up more space in your model which means that large models can exceed the limits allowed by DBPro. IanM explained these to me a while back but I forget the precise values for these.

My guess is that your model is exceeding two rather different limits so a simpler model might work fine. A text version of your X file would enable me to inspect it manually and see if there's anything else weird going on.

I'll have another look at your model and see if I can spot anything else.

Edit Just checked the vertex count in your model - it seems quite small so my guess is that the number of limbs is the problem.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Oct 2012 20:11
Still haven't received any information from the modeller, but I tried fragmotion to export the model. It doesn't crash anymore after importing and exporting it, but the wings are all screwed up on this model (attached).

Perhaps it's because I'm not using an updated version of the bone shader as you mentioned.

TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown

Attachments

Login to view attachments
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 4th Oct 2012 00:32
Solved the issue with the wings. It has given a significant boost in performance, but is there any way to increase speed even more?

The fix was this:



Here are the tests I did. Units on screen vs frames per second:

30 Units - 70 fps
60 Units - 38 fps
90 Units - 25 fps


Any suggestions for speeding it up even more?

TheComet

"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
Dar13
15
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 4th Oct 2012 02:28
Quote: "Any suggestions for speeding it up even more?"

Less bones?

Are those statistics with the new fastbone shader or no shader at all?

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Oct 2012 02:38 Edited at: 4th Oct 2012 02:39
Yes, that seems to have fixed the issue. I wonder what FragMotion did to the model?

I'm not sure how to speed it up further. Are you using clone object or instance object? You might be able to speed it up by having fewer frames - but I haven't checked the frames so that might not work.

Edit And what Dar13 just suggested.

Login to post a reply

Server time is: 2024-03-29 09:09:14
Your offset time is: 2024-03-29 09:09:14