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 / any way to reverse a 3d object?

Author
Message
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 8th Sep 2013 22:26
I'm toying with a polygonal sidescroller, and not sure how to reverse the direction of an object. What I'm trying to do is basically create a mirrored version of my model, but it's created with overlapping planes so I can't just change the orientation.

http://mattsmith.carbonmade.com/
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 8th Sep 2013 22:35
scale object obj, -100, 100, 100?

Your opinion and the incorporation of thermal noise equations in a high-voltage oscillator circuit are mutually equivalent in relevance.
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 8th Sep 2013 22:45
Awesome, thank you!

http://mattsmith.carbonmade.com/
Inflictive
17
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 9th Sep 2013 11:07
I think that would turn it inside out. What I would do is just rotate the object 180 degrees. Or perhaps scale object -100,100,-100 (which is essentially turning it around anyway)
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 9th Sep 2013 18:46
Exactly, TheComet showed a way to invert the vertexes (turn it inside out).

You need


Regards Sph!nx
www.mental-image.net
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Sep 2013 21:02
I think you need to read the original question again.



Powered by Free Banners
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Sep 2013 21:44 Edited at: 10th Sep 2013 22:10
Quote: "I think you need to read the original question again."

Compiler error 0x72fe3: Reference 'you' in sentence is ambiguous,
in post [#m2484899] from user [Green Gandalf].
--did you forget to use an '@'?

(who are you directing that sentence at? )

TheComet

horses
pictionaryjr
17
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 11th Sep 2013 00:44 Edited at: 11th Sep 2013 00:45
This is a pretty half assed function but I made it in like 15 minutes. This will mirror the object across a certain axis and culls it b/c when the faces are mirrored the back of the plains will be facing out. There's a faster way to do it just by locking the vertex data I believe, but I didn't feel like venturing that far.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Sep 2013 00:49
Quote: "who are you directing that sentence at?"


I was replying to the previous two posters .

Rotations won't give you mirror images.



Powered by Free Banners
Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 11th Sep 2013 15:56
Quote: "I think you need to read the original question again."

... Must have been asleep! Well, it's solved now.

Regards Sph!nx
www.mental-image.net
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Sep 2013 16:26
You could also scale the textures by -1 on X, which has a similar effect to scaling the plain.

But, are you sure you want to just mirror your sprites?
I mean, if your using layers and going to a lot of trouble with the artwork, wouldn't it be cool to have mirrored versions of the sprites, that way you can add shading more accurately. If you draw your sprites with the light source at the top left, then mirroring them will mean the light source is at the top right. Just a thought is all, I always notice and appreciate when someone has drawn both directions, shows a really high standard I think.

One other thing - you could use a normal map for lighting... using a shader, you could have several light sources acting on the sprites, the sprites could be more about just flat colour than shading, as the normal shader would take care of that.
I have messed around with a 2D shader engine, and it's intriguing stuff, I think it'd be possible to come up with something really unique, just using a normal map lighting shader on plains.

I am the one who knocks...

Login to post a reply

Server time is: 2026-07-07 00:08:29
Your offset time is: 2026-07-07 00:08:29