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 / Weird model deformation

Author
Message
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 25th Oct 2011 15:42
Testing out my game on a friend's PC and the strangest thing happened. He's using the exact same code that I am with the same files, but he occasionally gets this crazy model deformation when the monsters animate. Check this out:

http://img69.imageshack.us/img69/2549/deformedzombie2.png

But on my pc it's fine... Is it a DirectX version issue perhaps? Has anyone else seen this? It's like the bones of one model are being used on the body of another model...

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 25th Oct 2011 15:54
I saw something similar recently. I think Green Gandalf was looking into it at the time. There were vertices making a model get stretched really odd.

From what I can remember it was from an FPS model with dodgy vertices but they were fixed by manually editing the data.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 25th Oct 2011 15:56
Do you think it's odd that it'd happen on one computer but not another though?

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 25th Oct 2011 16:16
Not all graphic cards works in the same way, nor do all directx.

Cheers.

I'm not a grumpy grandpa
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 25th Oct 2011 16:29
Hmm... What could I do to prevent that? Hardly professional for my game to only work on certain cards...

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 25th Oct 2011 20:07
Nowadays last laptop or descktop come with powered graphic card, but I'v got that problem at home .... in my old pc ImageKit works perfectly, and in new one gives me an error.

Cheers.

I'm not a grumpy grandpa
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 03:29
Hmm... This concerns me greatly... How can I expect to be able to release a game without knowing if people will have it work or not?

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 26th Oct 2011 03:42
Even commercial games suggest you the minimum requirements to run the game. You can try not to charge you game with so many polygons if you want your game work in most PC. We can make a hight resolution game and specify the requirements necesary for the game so people don't have to buy it if they have old PC.


Cheers.

I'm not a grumpy grandpa
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 03:49
Hmm... The video card that's causing the problem is quite high brow. But perhaps you could point me in the right direction for using the commands such as PERFORM CHECKLIST FOR GRAPHICS CARDS and other commands to be able to limit the types of cards that the game is played on? So that people without a powerful enough card can't play it?

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Oct 2011 04:00
Use another 3D package to export the model/animation. (or convert it to something else and try it out)

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Oct 2011 04:55
Is that model using a bone animation shader?
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 04:59
It is indeed.

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Oct 2011 05:04
if it is one of evolved's shaders, open the file with a text editor and find the line that says
and try to increase that number. I am not sure, but I think it has a max limit of 64.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 05:35
Interesting! I'll give that a go and let you know how it goes!

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 07:00
One question about that though, Rev... Is that something that would give a different response between computers? I mean, it works perfectly fine on my development PC and the number of bones in the model isn't changing...

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Oct 2011 07:07
GPUs range in behavior quite a bit (especially across different brands) so I am thinking that it is possible. I have experienced similar problems in the past, and that was the solution I found on my geforce 9600gt.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 08:47
Good to know. I'll try it out and report back here!

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 12:21
Hmmm... It still happens. So I gave it a go with advanced lighting turned off, and it still does it. No shaders or anything like that...

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2011 14:04 Edited at: 26th Oct 2011 14:05
I get something like this when texturing a model occasionally. You could try a different texture format?

I would consider using another animation method too, maybe Enhanced Animation? I have published games that use it with around 3000 downloads and no similar issues reported...

EDIT: Actually I think that bad guy looks pretty cool deformed like that but I doubt it looks good moving

CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 14:24
Ahaha sometimes they turn into just a mess of lines though, which is not good. I'll give the texturing a try. But those models are from the FPSCX10 pack that TGC made up I would have expected them to be as enhanced as they could be!

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2011 14:36
I have a feeling the models are not at fault here but rather the shader you are using is not compatible with some graphics cards. Any chance you can use the original model and standard animation commands?

CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 26th Oct 2011 14:59
Like I said though, it still happens when shaders arent used.

However, I think I just narrowed it down to the texture files. I was texturing using DDS files. When I use PNGs it seems to work fine.

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2011 15:09
Yes I think I had the same issue when using dds now that I think about it... hopefully that's a workaround then?

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 27th Oct 2011 00:03 Edited at: 27th Oct 2011 00:04
Quote: "Hmmm... It still happens."
That sucks, I figured it was worth a try. Since it still happens without the shader, I guess that only leaves the model to be at fault. Have you had a chance (or: Do you have any software) to re-export the model? You might want to try contacting the model's author.

Quote: "the shader you are using is not compatible with some graphics cards"
From what i have seen, when a GPU Isn't able to handle a shader (doesn't support the correct PS/VS version), the objects which use it wont show up at all.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 27th Oct 2011 11:33
Oddly enough, using BMP textures rather than DDS seems to have fixed it! Still thoroughly testing the theory though... Can never be too sure...

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Oct 2011 11:41
Quote: "Oddly enough, using BMP textures rather than DDS seems to have fixed it! Still thoroughly testing the theory though... Can never be too sure..."

BMP's can be rather huge though... I would try PNG out too first.

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 27th Oct 2011 11:43
hmm... Are you letting dbpro auto-load the texture with the model, or manually applying the texture? Does it happen if you do the opposite?
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 27th Oct 2011 12:17
Given the way my engine is set up, I have to manually apply them. I might go with PNGs or even JPEGs if I can. Don't want it to have too juicy a performance hit, but I don't want to run into problems again :S

This is what I get for trying to use FPSC model packs in a DBPro game hahaa

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 27th Oct 2011 12:22
Quote: "I might go with PNGs or even JPEGs if I can."

JPEG's take ages to load...

Quote: "This is what I get for trying to use FPSC model packs in a DBPro game hahaa"

I use them all the time and rarely have any problems. FPSC is DBPro too after all

They are a lot cheaper than the alternatives too!

I agree this could be down to applying them to the models when they could load automatically with the model but as with most FPSC character models there are normally a few textures available for each model... Have you tried specifying the texture layer too?

I would seriously consider editing the character loading script in your engine, don't dismiss it just yet it might be necessary

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 27th Oct 2011 12:36
You could also try converting the texture(s) to another variant of the DDS format. Is the model in .X format? If so, does the problem still occur if you convert the model to .DBO format?
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Oct 2011 12:43 Edited at: 27th Oct 2011 12:48
Strange that the DDS format should give problems. However I note that you mentioned:

Quote: "But those models are from the FPSCX10 pack that TGC made up"


That could be the source of your problems. The DDS file format has changed with DX10 and my guess is that changing the format to PNG, etc, has changed the format back to one that DBPro supports, i.e. DX9. What happens if you simply load the original DDS files into DBPro and save it in the DDS format, i.e.



DBPro uses DX9 so the resulting file should be in the old DX9 format. If the file then works that suggests that the change from DX9 to DX10 is the source of the difficulties.

I have no definite idea why it should work on some computers and not others though. Perhaps it's working on machines which also have DX10 and but not on machines which only have DX9 (or vice versa)? It seems possible that DirectX automatically checks the file version and doesn't work correctly if a DX10 DDS file is loaded using a machine which doesn't have DX10.

Could you post one of the original DDS files so I can do some tests here? One of my machines has both DX9 and DX10, the other has only DX9.

Edit CumQuat, could you clarify which program you are using? DBPro or FPSC10?
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 27th Oct 2011 13:29 Edited at: 27th Oct 2011 14:44
I'm using DBPro. Here's one of the DDS files I'm using. I didn't actually know that DDS was DirectX specific. It might account for the problem as my dev machine is Windows 7 with DX11 and the machines that are having the problems are XP and Vista machines with DX9 and 10 respectively.

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Oct 2011 14:42
Thanks for that. I've done a simple test using the "tiny.x" model that comes with the DX9 SDK and I couldn't see any problems on either of my machines (Vista 64 bit with DX9+10, XP 32 bit DX9) so perhaps something else is the cause after all? Are you using the same version of DBPro on each machine? I'm using U77RC7.

Here's the code I used:



Could you produce a similar simple demo which shows the problem?

Quote: "(Side note... If this is violating copyright of some kind, I sincerely apologise to TGC)"


Blame me if necessary. You can delete the attached file now if you like.

I agree these issues can be really annoying. I spent a whole day and a half earlier this week trying to debug a shader demo only to find that the problems were caused by my use of the obsolete DBPro texture backdrop command. When I removed that all my problems disappeared.
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 27th Oct 2011 14:47
It definitely is frustrating!

I'm going to try out the DDS and .X conversion on a WinXP DX9 computer, then see if it runs ok

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Oct 2011 15:00
When I suggested loading and saving the DDS image using DBPro I forgot that DBPro changes the format. Your image has mipmaps but DBPro won't save those so they get lost. You can keep the pixel format if it's one of those supported by the extra save image flag - yours was as it happens (DXT1). The default DDS format exported by DBPro seems to be A8R8G8B8 which gives you rather large files - DXT1 files are much smaller.

Login to post a reply

Server time is: 2026-07-10 23:32:57
Your offset time is: 2026-07-10 23:32:57