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 / Flickering textures in DBpro after loading dbo model made in 3DWS

Author
Message
Jan E
8
Years of Service
User Offline
Joined: 29th Dec 2015
Location:
Posted: 29th Dec 2015 21:17
Hello enthusiasts!

After having created a 3d model in 3DWS that consists of multiple (separate) boxes and plains added together, everything starts flashing of flickering in DBpro once I have loaded the model and start moving the camera around.

I tried playing around with the " Set object" or " Set object texture" commands, but everything keeps on being messy with flashing textures in DBpro, while it looks good in 3DWS. Is it because the object consists of multiple (seperately textured) objects (in which vertices are unconnected)?

Help appreciated!

Here is my code:

wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 30th Dec 2015 03:37
Usually this means you have overlapping polygons.
Jan E
8
Years of Service
User Offline
Joined: 29th Dec 2015
Location:
Posted: 30th Dec 2015 12:07
Is this is very common? In tutorials I have viewed, it seems like multiple plains or boxes can simply be put together without flashing textures in DBpro.

How can this be avoided?

wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 30th Dec 2015 18:31
Well I don't know for certain that overlapping poly's is the problem, but you'd generally make sure that your edges aren't directly overlapping. If you like, you can upload a model that demonstrates the problem and I'll give it a look.

I used 3d world studio many years back and had other texture problems (probably) not related to your issue; so it might be a good idea to check out Map Scape instead if you want to possibly avoid other inconveniences. That's available for free here.
Jan E
8
Years of Service
User Offline
Joined: 29th Dec 2015
Location:
Posted: 30th Dec 2015 19:34 Edited at: 30th Dec 2015 19:44
It also appears that when edges are not overlapping (2 simple objects placed near eachother but not touching) flickering textures remain.

I have checked out Map Scape, but the problem occurs exactly in a similar fashion. I have added a screenshot of a model with 2 non overlapping objects near eachother with flickering textures.

I have added my main model in the zip files. If you and/or others can take a look, that would be extremely helpful!

Thanks in advance
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 30th Dec 2015 20:15 Edited at: 30th Dec 2015 20:16
Hi I don't see any files to download
Jan E
8
Years of Service
User Offline
Joined: 29th Dec 2015
Location:
Posted: 30th Dec 2015 21:32
Sorry, here are the files again in the attachment.

Thanks in advance!

Attachments

Login to view attachments
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 31st Dec 2015 08:09 Edited at: 31st Dec 2015 08:10
Analizing your model with my small inspect utility it seems that the model has lots of redundant overlapping planes and strange limbs.

get it here: https://forum.thegamecreators.com/thread/216106

P.S.
Once created the exe you can use it anywhere as a standalone
Jan E
8
Years of Service
User Offline
Joined: 29th Dec 2015
Location:
Posted: 31st Dec 2015 10:15
Yeah i know, its not the best model and it has overlapping faces.

However, even a simple model with non overlapping polygons also gives this problem (see screenshot in attachment and the test.dbo file uploaded before).

Attachments

Login to view attachments
wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 31st Dec 2015 15:04
Does it still happen if you set the camera range to 1,5000 instead of 0?
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 31st Dec 2015 16:24 Edited at: 31st Dec 2015 18:29
Are you using the version of DBpro available on Github here? https://github.com/LeeBamberTGC/Dark-Basic-Pro
I cannot seem to be able to get anything other than a very dark object using the code provided in any version of DBpro other than that version, if not using that version then what version are you using? I tried the other free version available through this sites home page u7.5, followed by most of the only upgrades I could find available - upgrades 6.7, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.61, 7.62, and 7.7rc7. Upgrade 6.9, 6.8 and earlier than 6.7 all have broken links as best I can tell It could be there is something wrong with my installations of DBPro but I don't think so on account everything else(my own projects and Evolveds AL) all work just fine.
Adding

gets rid of the flickering but there is a transparency issue with the mesh itself that I can't find a way of controlling, changing ghost/transparency values. It is almost as if its locked from standard DBPro commands accessing it. Even grabbing the mesh off each limb and making an object of them inherits the same transparency issue which to me suggests there is something unusual in the FVF data and converting the fvf has no effect either!
AndrewT wrote a model viewer in DBPro here https://forum.thegamecreators.com/thread/124936 which loads the model perfectly(don't bother exporting the .dbo from it as it inherits same results). Given the date of the post he obviously must have been using an upgrade earlier than that date and it could be quite an old one for all we know. So I suspect it is one of the upgrades no longer available that he used Therefore I can only deduce that Leadworks support for DBPro with 3DWS doesn't stretch beyond a certain date around this time. I think I recall GreenGandalf(a very well known user here) may have wrote some sort of shader for an export of 3DWS for a particular user he was helping out, but there may exist a specific way to setup your 3DWS model that is the same way that user had used prior to export. I could be wrong though as my memory is hazy.
Even if going down the route of grabbing meshes and reconstructing the model within DBPro is done and you ignore the transparency issue(which seems to cause the overlapping the same as in your screen shot), well there is no way of telling what limb has what texture as every limb reads the same texture data using DBPro's "Limb Texture Name()" command for each texture stage and the limbs themselves are not separately named either, so all the work of matching limb to texture would have to be done manually which would prove harsh for a complex 3DWS export. I don't have 3DWS to play with so I can only suggest uploading the .x version of export to see if we can load it into blender and re-export it to something DBPro can use. Other than that I can't think of an easy way round this.
wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 31st Dec 2015 23:32
@James That's odd, the test.dbo file worked fine for me on U7.0 once I changed the camera range..
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 1st Jan 2016 00:58 Edited at: 1st Jan 2016 02:34
It's odd because I was wrong, I had added convert object fvf 1,338 at some point and forgot to remove it when going through the updates, so changing the fvf did affect it after all although the transparency control seems to be locked out still. Only appears black from 7.4, 7.5, 7.7rc7, those are the only ones I bothered to retest as well as 7.3 and below which seem fine, but not much point in going further as what matters is we all can see that transparency and z depth order issue. A lot of what I wrote is wrong so can be ignored I think.

Edit
https://forum.thegamecreators.com/thread/99066 this is the shader I mentioned earlier, sadly the link within is no longer working for me.
Jan E
8
Years of Service
User Offline
Joined: 29th Dec 2015
Location:
Posted: 1st Jan 2016 23:31
It turns out that setting the camera range to 1,1000 solved the issue! Thanks for you help. I still womder though why so few have experienced this problem
wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 2nd Jan 2016 00:40
Glad that fixed it. You'll have more problems later on if you keep using 3dws though, I fear.

Login to post a reply

Server time is: 2024-04-19 20:39:25
Your offset time is: 2024-04-19 20:39:25