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 / Question about UV coords and Matrix1

Author
Message
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 1st Jul 2011 03:32
I'm just starting to build a large object but before I move on I'm wondering not just about the normals but at the moment the UV coords.

If I can get away with using 1 texture (with three images tiled above each other ie 256x768), then hopefully I can get away with creating separate objects for floors, walls and ceilings.

What UV values would I need to use to split one image into three values?

Portions of the creation code so far:



If I can't use one image then I would have to go the long way round and create 3 separate objects and add them as limbs. I'm trying to massively reduce the amount of vertices used in the objects and share them with other faces...

Warning! May contain Nuts!
GregA
15
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 1st Jul 2011 05:14
Last summer I had a scene going in XNA that had 200,000 polygons and about 50 megabytes of textures, on an oldish video card. I haven't really stressed out DBPro yet, but Im guessing you are prematurely optimizing...

Unless you are working on an extremely primitive video card...
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 1st Jul 2011 05:19 Edited at: 1st Jul 2011 05:20
I am at the moment. I'm working on a laptop with an ATI Radeon 200M Express. The first time I tried this piece of code just using DBP's primitive cubes it was slow on this and my other laptop. So I changed it to just planes. Still slow on this.

I like the idea to optimise the vertices because I've another idea to through in after I have this working. I'd like to build curved corridors and rooms using another level generator algorithm...

I know it's late for me at the mo but in the morning I'm going to play around with UV's on a single plane object to see what results I get. Then I need to figure out manually setting the normals...

EDIT: Currently on a medium sized level I'm upto approx 80,000 faces and that's with optimised vertices.

Warning! May contain Nuts!
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 1st Jul 2011 13:35
UV coordinates range from 0 to 1. To go from the very left or very top to a third of the way down or across, simply use coordinates 0 and 1/3.

[b]
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 1st Jul 2011 16:24
Oh... I must be daft to have missed that... Thanks... That's the textures done, just got to figure out the normals now...

Warning! May contain Nuts!

Login to post a reply

Server time is: 2026-07-10 15:30:35
Your offset time is: 2026-07-10 15:30:35