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 / Help with load object from file block!

Author
Message
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 25th Aug 2010 21:50 Edited at: 25th Aug 2010 22:03
I am having a really big problem with file blocks from the enhancement pack. I got all my vegetation and trees packed into a file block, but when I load them, the objects are fuzzy and the transparency and alpha mapping I apply for soft vegetation aren't applying (it doesn't look bad in this pic, but in full screen and when you move the camera it looks terrible):

Wrong


This is what it should look like. Again, it looks better in the picture above now because it looks brighter and it's a small image, but in full screen and when moving the camera, even the rocks which are also loaded from the file block look like they are being rendered in DBC . Look at the trees in the distance and see that they are much softer and smoother:

Right


My code looks something like this:

Without file blocks:


With file blocks:


It's really the same thing, just the object is loaded from the block, and I load each image from the block before loading the objects so that they will auto-apply to the objects. I also tried setting the compression rate to 0 to see if it was that, but I don't think it's that because up close the objects look fine. It's almost like a mipmap thing, except in addition alpha mapping won't apply. :/

EDIT: I think it may have something to do with needing to set that extra parameter that the "load image" command has, but the "load image from file block" command doesn't have it! Is there any way?
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 26th Aug 2010 21:00
Well, apparently you can't load object from blocks directly without pixel-perfect images.
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 26th Aug 2010 21:17
I don't have an answer for you (sorry), but I would like to know what the advantages are with using file blocks....

The fastest code is the code never written.
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 27th Aug 2010 04:54
That's ok man. The advantages are that the files are secure (at least from the average user), so if you load them directly it is much more difficult for people to steal your media. The files are encrypted (somewhat) and there is a password to open them.

Login to post a reply

Server time is: 2026-07-23 10:49:26
Your offset time is: 2026-07-23 10:49:26