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.

Bug Reports / Plains have incorrect texture alignment

Author
Message
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 12th May 2005 12:20
By default plains have culling turned off. When you texture the plain it actually looks correct because you are seeing the back side of the plain. When you turn culling on (to make a see-through mirror type object) the texture is backwards. Is there any reasoning behind this insanity?


This uses an animation file that comes with DBP.



spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 12th May 2005 23:10
I found this out aswell the other day. Built a cube out of 6 plains and played different animation to each face and all anims are mirrored:



Boo!
David R
20
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 14th May 2005 06:06 Edited at: 14th May 2005 06:07
Same here;

In my beautiful pic below, the sky is actually a mirror image of what its supposed to appear as



[url=www.lightningstudios.co.uk][/url]

Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 1st Sep 2005 14:15
Got tired of waiting on this one and wrote a function to make my own plains corrected. Here it is if anyone wants to use it. You can add your own find free object,mesh, or memblock code to it if need be.



Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 1st Oct 2005 19:33
This isn't a bug with planes but more down to the way animation files are handled. Animations need to be mirrored before displaying on screen whether it be done internally by us or controlled by yourself in code.

As far as planes go they have the correct texture alignment.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 1st Oct 2005 21:25 Edited at: 1st Oct 2005 21:35
It does the same thing if you just texture the plains. They look correct because culling is off by default on plains. If you turn culling on and rotate it so you can see it then you can see that the texture is mirrored and the normals are inversed.



Gives the included result. Also yrotating a plain to 180 has no effect on it

Ah you guys new they were wrong as you made culling off by default and made the default y rotation be 180 to make them look correct. Run this code to see how it is really off. It turns culling on and sets all rotations to 0.



Attachments

Login to view attachments
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 1st Oct 2005 21:54
It's just down to the way the planes are made. If we change this now it has the chance of affecting a lot of peoples code so best to leave as it is.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Oct 2005 03:42
Fair enough. I'll post that plain function in the code snippets forum in case anyone needs it as this thread will most likely be deleted now.

Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 2nd Oct 2005 04:00
If you would prefer I can make another "make plain" command with an extra parameter that will work in the same way as your ammended function.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Oct 2005 04:18
Well that would actually make the plains correctly (the way I and a few others would think anyway). I would have thought it would be faster than my function if it was built into DBP but my function and make object plain runs at the same speed here. I can use my function just as easily as I have a usefull function include file that I can put it in and call.

The corrected plain also makes set object to camera orientation work properly. As that command mirrors plains with DBP primitive plains as is.

Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 2nd Oct 2005 04:32
Modified version of "make object plain" is now in the source code that uses the same data as you have done for making planes.

The new code is -



Just add the ,1 parameter on the end to use the alternative method. Now we have the best of both worlds in upgrade 5.9
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Oct 2005 07:23
Awesome

spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 3rd Oct 2005 00:26
Wicked!

I also posted a code snippet in Lost's post that used 5.8 vertex commands to achieve similar result in that it jiggles the vertex positions and uv data so that animations and textures appear correctly, and so that you can cull the plain.

Boo!

Login to post a reply

Server time is: 2024-03-28 11:29:23
Your offset time is: 2024-03-28 11:29:23