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 / Unsightly panty lines...

Author
Message
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 28th Jan 2018 09:20
At my wits end here...

What could be causing this? At first I thought it might be the texture, but I turned that off and still get that unsightly black line. If i move backward or forward, the line moves with me. (There is also a line on the wall that I circled)

default cube objects, 1 unit in size, placed by inc the positions by integers.

I'd like to solve this before I move on...




Attachments

Login to view attachments
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 28th Jan 2018 09:52
I think it's a camera setting...as playing with FOV, adjusting range, height etc will move the position of the lines, but they still remain...

What camera setting could it be?
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 28th Jan 2018 10:05
It's also not a graphic card problem, various testers of different cards and OSes see the lines too.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 28th Jan 2018 10:49 Edited at: 28th Jan 2018 10:50
Hmmm...if I replace the floor cube with a matrix....NO LINES. (still have the lines on my walls though)

Perhaps it is float errors with positioning of the cubes?

here's how I position them, am I doing something wrong there? They should be being placed at perfect units.

zero32
7
Years of Service
User Offline
Joined: 28th Jul 2016
Location:
Posted: 28th Jan 2018 18:05 Edited at: 28th Jan 2018 18:06
Try to make the scene bigger. Make the cubes a size like 10 or 100 and change the camera and cube positions accordingly
"It is only slightly easier than changing all sugar in a cake into stevia after it has already been baked" -Bisqwit
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 28th Jan 2018 23:49
Quote: "Try to make the scene bigger. Make the cubes a size like 10 or 100 and change the camera and cube positions accordingly"


Interesting, I'll try that and report back.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 5th Feb 2018 16:00
It's either a precision error or caused by filtering. That'd be my guess.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 6th Feb 2018 03:36
An easy thing to try would be to use floats for the positioning instead of integers.



So many games to code.....so little time.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 6th Feb 2018 07:23
Quote: "An easy thing to try would be to use floats for the positioning instead of integers.
"


I don't see how that could make a difference

the way I do it in 2 for/next loops... y=1 row=1

position object 1,y,0,row

would be effectively the same as

position object 1, 1.0,0.0,1.0

I don't see how using floats would make a difference, unless you know something I don't.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 6th Feb 2018 07:38
quick change to my loops show using floats makes no difference, lines still there.

zero32
7
Years of Service
User Offline
Joined: 28th Jul 2016
Location:
Posted: 6th Feb 2018 08:37 Edited at: 6th Feb 2018 08:38
i think the problem is the clipping of the sides of the cubes. instead of using cubes, you should create one big mesh from the map data. i cannot tell you how to do it just now, but im sure there are many ways to accomplish this. if you can wait a bit, i may come up with an idea that works for you.

here is your function, but i canged the floor to planes instead of cubes. i don't know if this still works with your collision system or anything, but atleast the lines on the floor should be gone:
"It is only slightly easier than changing all sugar in a cake into stevia after it has already been baked" -Bisqwit
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 6th Feb 2018 09:45
Quote: "here is your function, but i canged the floor to planes instead of cubes. i don't know if this still works with your collision system or anything, but atleast the lines on the floor should be gone:
"


Thanks, I'll give that a try. Only collision I worry about is the walls. I don't do any collision checks on the floors at all.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 6th Feb 2018 09:50
Quote: "here is your function, but i canged the floor to planes instead of cubes. i don't know if this still works with your collision system or anything, but atleast the lines on the floor should be gone:"


Hey, now that actually worked! I could have sworn I tried planes...but maybe I tried boxes!

One less worry now!

I'll have to try it with the walls now and see if my collision still works.

Thanks, zero32!
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 7th Feb 2018 04:01
So, I tried the same thing with the walls, except I made my own 4 sided box from plane objects.

converted them all to meshes, added the other 3 meshes to mesh 1

create object from that

save new object
load new object
had a nice box 4 sided box (no top or bottom).

However, in the game I still have the lines.

Starting to think it's a vertex problem, not sharing vertices correctly ...or something.

like when I combined the meshes, it's doing something wonky with the vertices instead of the new mesh combining the shared vertices, I get 2 sets in the same place. I don't know.

Because of the way I compose the map, I really need boxes for the walls and for collision. The floor is OK tho with the planes.

I continue my quest to remove the lines....
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 7th Feb 2018 05:11
Once you have the cubes positioned, try scaling them up by something like 1.01 (or whatever is appropriate to your scene scale, we want them to 'just barely' overlap.

If you get z-fighting, you may need to adjust your camera ranges and/or redduce the scale amount.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 7th Feb 2018 06:54
Quote: "Once you have the cubes positioned, try scaling them up by something like 1.01 (or whatever is appropriate to your scene scale, we want them to 'just barely' overlap."


I will give that a try. I had an idea to scale them before positioning which is what I was going to try next, but your idea sounds easier to scale after positioning.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 7th Feb 2018 10:07
Scaling didn't work, scaled from 99.5 all the way up to 105.5. Still had the lines.

Gonna run a test with planes I guess.

I'll have to redo my map format to try that though. That will take a while.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Feb 2018 12:36
Can you attach an example (code and graphics), I'd like to see if I get the same issue on my PC.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 7th Feb 2018 13:39 Edited at: 7th Feb 2018 13:40
Quote: "Can you attach an example (code and graphics), I'd like to see if I get the same issue on my PC.
"


I'm gonna mess with it for a while first. But the problem exists on multiple PCs with varying graphics cards.

I'll probably look at the vertex data between 2 plane and a 2 cube faces. Try and see if they differ.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 9th Feb 2018 08:12 Edited at: 9th Feb 2018 08:15
Well, I got it sorted out I guess.

I had to create 15 (or16) different plane objects for the walls.

plane objects like
Top , Bottom
Left, Right
Top, Bottom, Right
etc...

Good news is, no lines, and can keep my basic map shape the same

Bad news is, trying to remember all the object "shapes" I need as I make the maps.

I could probably figure out what shape goes where programmaticly via the map array, but I want to move on. Spent too much time on the "lines" already.

I may revisit the programmaticly part in the future. I know what needs done array wise, but I'm just sick of looking at it at the moment.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 9th Feb 2018 08:17
Oh, and using the shape planes broke my collision...but that should be easily sorted out.
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 11th Feb 2018 12:08
Decided to go ahead and figure out the planes for the walls programaticaly.

To confusing looking at my map data with 16 different object representing what planes go where.

Much easier to look at F "Floor" or W "Wall" and build out the planes for the walls depending on the -x -y +x +y of the surrounding map data.

It is a little more code (well, a lot more), but much easier to construct my maps.

Login to post a reply

Server time is: 2024-04-20 15:35:32
Your offset time is: 2024-04-20 15:35:32