Stunts Forum

Stunts - the Game => Custom Cars with Stressed => Topic started by: Overdrijf on May 17, 2013, 04:38:31 PM

Title: "Car" warping weirdly
Post by: Overdrijf on May 17, 2013, 04:38:31 PM
Hi there again,

After a suitably long break from Stunts I have picked up another sort of project. I'm making a joke movie with "leaked" footage of a new visual setting for a different game, and what better game to use for that look than Stunts? However, the two "cars" I've made for it warp really weird the moment I try to get them to turn. They drive just fine (the car.res is just a copy of my kart at this point, as are the STDA and STDB files), but their looks get completely messed up. I thought it was because I had used 4-sided polygons that weren't flat planes, but I split all of those into 3-sided polygons, and the result stays exactly the same. Could it have to do with how the "first eight vertices are reserved for the corner vertices of the shape's bound box" (quoting the wiki), could I have screwed those vertices up somehow? Or is it something much simpler?

Anyone else who's seen this at some point?

Note: I'm only including one of the objects. The error in the other seems to work exactly the same, but it's also larger in size than anything I've made before, including my unfinished van project, so I'm trying to exclude any problems that may be due to its size from the equation for now.

Edit: The good news is: it's not the model. I've just managed to majorly screw up the .RES somehow, modifying it has given me a new variation of this bug. I can probably work around it.

Edit again: O, no, never mind, that was just the effect of crashing and restarting, the double version of the bug is less weird than the single version.
Title: Re: "Car" warping weirdly
Post by: Overdrijf on May 26, 2013, 08:40:58 PM
It seems this will be one more question for the great archives of "we have no idea". But since I teased you guys with this topic I can't really withhold the finished video. It's probably not as funny if you don't know Primal Carnage, but still, here it is (http://www.youtube.com/watch?v=jD0eQxvSHSI).
Title: Re: "Car" warping weirdly
Post by: dstien on May 27, 2013, 09:53:08 AM
Hi Big O!

Every polygon in this shape is flagged as 2-sided. This disables angular culling, which in turn may result in some funky issues with the Stunts engine's archaic drawing routines. To fix this:

Stressed handles the shape bounding box behind the scenes, so you don't have to worry about that. Stunts polygons should be convex (http://en.wikipedia.org/wiki/Convex_and_concave_polygons) in order to render properly. Drivable shapes must have wheels due to the transformations when turning. If you don't want wheels you could scale them down to a single point.
Title: Re: "Car" warping weirdly
Post by: Overdrijf on May 27, 2013, 11:35:59 AM
Thanks, I didn't know about the flip function (and plain forgot about the steering wheels). I'm definitely taking this with me to future projects.
Title: Re: "Car" warping weirdly
Post by: Komeuppance on May 29, 2013, 09:33:30 AM
LOL!!

Amazing, even though I've never heard of Primal Carnage I still laughed out loud.

How'd you get the "dodo" to run away??

-Robert
Title: Re: "Car" warping weirdly
Post by: Overdrijf on May 29, 2013, 11:27:31 AM
I edited the 'game1' file to make ice-roads green, then I made a track out of ice roads. Looking back on it I would use the normal asphalt roads next time, because even after adding a lot of grip to his ride I couldn't get Skid Vicious to drive very fast around the corners. The "running away" part is it coming out of a corner onto a straight, it's the kind of moment that just happened, and looked great.

Originally the dodo was supposed to try and jump the bridge with me in hot pursuit, but somehow he kept failing to follow the final bit of track leading up to that bridge, which makes it look like he isn't just following a road.
Title: Re: "Car" warping weirdly
Post by: Komeuppance on May 30, 2013, 08:36:47 AM
Lol... good stuff.  I laughed really hard when the dinosaur exploded.

-Robert
Title: Re: "Car" warping weirdly
Post by: zaqrack on May 30, 2013, 10:05:58 AM
This was great, thanks for sharing :))))
Title: Re: "Car" warping weirdly
Post by: CTG on May 30, 2013, 10:15:34 AM
 STDODO.3sh (7.25 kB - downloaded 3 times.)
 STDADODO.vsh (121.04 kB - downloaded 0 times.)
 STDBDODO.vsh (8.33 kB - downloaded 0 times.)
 CARDODO.RES (0.92 kB - downloaded 0 times.)

.vsh and .res files: 0 downloads? Nobody tried them. :-\
Title: Re: "Car" warping weirdly
Post by: Duplode on May 31, 2013, 05:08:13 PM
.vsh and .res files: 0 downloads? Nobody tried them. :-\

I didn't. That video is genius, though  :D 
Title: Dodo racing
Post by: CTG on June 02, 2013, 01:38:50 PM
Sure. T-Rex should be added to ZSC 2014 official cars.
Title: Re: "Car" warping weirdly
Post by: Overdrijf on June 26, 2013, 05:03:03 PM
Thanks everyone, glad you liked it.
Title: Re: "Car" warping weirdly
Post by: Overdrijf on June 29, 2020, 09:35:29 AM
Rereading this topic after several years I noted that the "solution" is not present here. Might as well have it in the same thread as the question. I think it was Duplode who remarked that the first shapes in the file (not those corner vertices from the first post, the first actual shapes you can edit with stressed) are on any normal car the front wheels, which visually steer around corners. So Stunts does something to the first so many vertices or so to get that effect. And that's why a "car" with no wheel would warp weirdly, Stunts is trying to do wheel movements on non-wheel shapes.