View previous topic :: View next topic |
Author |
Message |
Koobazaur Member
Joined: 08 Mar 2007 Posts: 22
|
Posted: Wed May 02, 2007 4:41 am Post subject: Coordinate system |
|
|
Hey,
I am wondering if there is any way to change the coordinate system in Deled? I am using the level geometry with Direct X which uses left-handed coordinate system so everything is mirrored. Flipping the coordinates and normals in my program is easy enough, but the UV coordinates are a bit of a bigger problem which I don't really want to deal with. |
|
Back to top |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Wed May 02, 2007 1:43 pm Post subject: |
|
|
I'm not sure who's wrong here, but the UV coordinates remain the same, you just need to mirror your geometry manually.
Also, I could imagine some setting in the options menu for that. _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Wed May 02, 2007 3:53 pm Post subject: Re: Coordinate system |
|
|
Koobazaur wrote: |
Ibut the UV coordinates are a bit of a bigger problem which I don't really want to deal with. |
How exactly? Nothing changes. Each vertex still has it's own UV, the same UV before you reversed the winding order.
v/n/u
1,2,3
4,5,6
7,8,9
just becomes
v/n/u
7,8,9
4,5,6
1,2,3
Quote: |
Also, I could imagine some setting in the options menu for that. |
That would break a lot of stuff unless it was written in the file which order was used. Because you would not know how to load in the files anymore. _________________
|
|
Back to top |
|
|
Koobazaur Member
Joined: 08 Mar 2007 Posts: 22
|
Posted: Wed May 02, 2007 8:22 pm Post subject: |
|
|
Hmmm crap... you seem to be right. I thought that if I mirrored my polygon manually by the Z plane the texture would, as a result, be inverted as well... silly me o.o |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
Posted: Wed May 02, 2007 8:38 pm Post subject: |
|
|
Koobazaur wrote: |
Hmmm crap... you seem to be right. I thought that if I mirrored my polygon manually by the Z plane the texture would, as a result, be inverted as well... silly me o.o |
No, I AM right. There is no problem to be sovled here. Just reverse the drawing order of your three vertices, and their associated data. You can load them into your program in reverse, or just draw them in your code in reverse, or load them 'properly', and swap them around after the fact.
The textures won't invert. The UV coords you specify ar the UV coords you will receive. _________________
|
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Thu May 03, 2007 6:11 am Post subject: |
|
|
Daaark is right indeed. And btw, Daark, that's a cool avatar you've got there (the first avatar of yours I actually like ) ! |
|
Back to top |
|
|
Daaark DeleD PRO user
Joined: 01 Sep 2004 Posts: 2696 Location: Ottawa, Canada
|
|
Back to top |
|
|
|