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 / A curious problem with using 3d planes as tiles...

Author
Message
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 26th Dec 2010 21:18 Edited at: 26th Dec 2010 21:20
Hi guys,

I'm trying to make a top down level using 3d planes as tiles.

However I have hit a small problem, as you can see in the picture below.



The tiles seem to have "overspill" almost to the textures. I have checked that the images have been grabbed ok. and I have also attempted different sized planes (although I wasn't expecting that to make any difference).

I have checked the flag on all the load image, get image etc. commands.

And am running out of ideas.

Does anyone have any suggestions?

Thanks as always

Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 26th Dec 2010 23:19
Save the images you created in dbpro with get image and open them in another picture viewing program to see if you are in fact grabbing the right position.

My computer surpasses all the technologies of the day. What computer do I have?

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 26th Dec 2010 23:39
Increase the size of the plains by 1% (Or so)
Use the set object filter on the tiles?

My signature is NOT a moderator plaything! Stop changing it!
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 27th Dec 2010 00:11
@madscientist:
I thought that, and have checked the grabbed tile images to make sure they are correct. which they are.

@mobiius:
I have tried tiles sized 10,31 and 32; and a few inbetween; all seem to suffer from the same problem.
I hadn't tried set object filter; but I have now, and sadly no joy. still the same

Thank you both tho

Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 27th Dec 2010 01:14 Edited at: 27th Dec 2010 01:25
=PRoF=, I guess I'm dense. What is the problem with the tiles? What are you expecting to see? Is there an image that is not showing up?

One of the things I've noticed is that it really matters when you put the texture on a plane.

For instance, setting the object's emmissive property before you put the texture on can have a strange effect.

=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 27th Dec 2010 01:36
@Rich:
The grey areas are supposed to join seamlessly, but as shown in the picture, they are broken up by the occasional line where the tiles join.

Even more confusing, is that a couple of times in the picture a tile is drawn fine in one place, but is wrong in another.

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 27th Dec 2010 01:52
Don't know if it could be a culling or polygon zsort issue by DBPro,
can you post a code example we can compile and test for a fix
tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 27th Dec 2010 04:47
What is the texture you are using? Is it a portion of a larger texture? This looks like bleeding from a tiled texture.


A 3D marble platformer using Newton physics.
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 27th Dec 2010 06:19 Edited at: 27th Dec 2010 06:37
Oh, I see. So the texture is basically grey, with a strip of color along the edge, darker blue if there is no tile to the "east" and "south" and a lighter greenish if there is no tile to the "north" and "west".

And you have what, 16 different combinations of tile edges with which to determine what part of the texture is on each tile? That would be my guess, since it would give you one 4 bit "nibble" (see below) for each tile. But I could just be guessing wrong.

Perhaps its nothing to do with the texture, but maybe a glitch in the decision making process of which texture goes on each tile?

Yah, some code would be good, but it's probably a LOT of code, eh?

One thing that might help to track it down is to substitute a texture that has each case written right on it, i.e. with a numeral "0" on the texture area that is used by your first type of tile (one with no adjacent tiles?) and a numeral "1" on the second case texture, etc. That way you can see easily see which cases are giving you the trouble.

http://en.wikipedia.org/wiki/Nibble

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 27th Dec 2010 09:54
I think that your problem comes from mipmapping, Have you tried set object filter? If not, try 0 or 1.
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 27th Dec 2010 15:40
@Rich Dersheimer:
Thats it, you have it exactly And yeah, its not too much in the way of code; but extracting the relevent bits from the whole project would be a bit of a pain.
The curious thing about the problem I was having is that in several places in the original picture, the same tile is drawn correctly in one place, but incorrectly in another.

@Mobiius & @revenant chaos:
Apparantly using set object filter worked the second time I tried it. I did try it last night when mobiius suggested it, but I think I put it before I textured the tiles and it didn't work.

So yeah, problem solved by simply using



but after the object had been textured.

Thanks to everyone who suggested stuff

Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 27th Dec 2010 17:08
Quote: "but after the object had been textured."


Yah, I had the same problem with setting the object emmissive first, it didn't always affect every plane, but only some of the planes. Weird. Glad you got it sorted though.

Login to post a reply

Server time is: 2026-07-21 20:35:30
Your offset time is: 2026-07-21 20:35:30