Author Topic: "Car" warping weirdly  (Read 3146 times)

Overdrijf

  • Helen`s Lover
  • **
  • Posts: 651
  • Professional idiot
    • View Profile
"Car" warping weirdly
« 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.
« Last Edit: May 23, 2013, 05:59:25 PM by Overdrijf »

Overdrijf

  • Helen`s Lover
  • **
  • Posts: 651
  • Professional idiot
    • View Profile
Re: "Car" warping weirdly
« Reply #1 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.

dstien

  • Moderator
  • Stunts Master
  • *****
  • Posts: 160
    • View Profile
    • Stunts Tools
Re: "Car" warping weirdly
« Reply #2 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:
  • Remove the 2-sided flag for every regular polygon
  • If the polygon faces the wrong direction, select all its vertices, right click on the vertex list and select "Flip" from the context menu.
  • Select all the polygons, right click on the polygon list and select "Compute cull data" from the context menu.

Stressed handles the shape bounding box behind the scenes, so you don't have to worry about that. Stunts polygons should be convex 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.

Overdrijf

  • Helen`s Lover
  • **
  • Posts: 651
  • Professional idiot
    • View Profile
Re: "Car" warping weirdly
« Reply #3 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.

Komeuppance

  • Stunts Addict
  • *
  • Posts: 38
  • Stunts Stunts
    • View Profile
Re: "Car" warping weirdly
« Reply #4 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

Overdrijf

  • Helen`s Lover
  • **
  • Posts: 651
  • Professional idiot
    • View Profile
Re: "Car" warping weirdly
« Reply #5 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.
« Last Edit: May 29, 2013, 11:52:24 AM by Overdrijf »

Komeuppance

  • Stunts Addict
  • *
  • Posts: 38
  • Stunts Stunts
    • View Profile
Re: "Car" warping weirdly
« Reply #6 on: May 30, 2013, 08:36:47 AM »
Lol... good stuff.  I laughed really hard when the dinosaur exploded.

-Robert

zaqrack

  • Administrator
  • Makes love with Stunts
  • *****
  • Posts: 4532
    • View Profile
    • ZakStunts
Re: "Car" warping weirdly
« Reply #7 on: May 30, 2013, 10:05:58 AM »
This was great, thanks for sharing :))))

CTG

  • Having only spam addict friends
  • ********
  • Posts: 20948
    • View Profile
Re: "Car" warping weirdly
« Reply #8 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. :-\
2243,18 km

Duplode

  • Breaths Stunts
  • ******
  • Posts: 3645
  • Fear is your only god on the radio
    • View Profile
    • The Southern Cross Stunts Trophy
Re: "Car" warping weirdly
« Reply #9 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 

CTG

  • Having only spam addict friends
  • ********
  • Posts: 20948
    • View Profile
Dodo racing
« Reply #10 on: June 02, 2013, 01:38:50 PM »
Sure. T-Rex should be added to ZSC 2014 official cars.
« Last Edit: June 02, 2013, 03:14:42 PM by CTG »
2243,18 km

Overdrijf

  • Helen`s Lover
  • **
  • Posts: 651
  • Professional idiot
    • View Profile
Re: "Car" warping weirdly
« Reply #11 on: June 26, 2013, 05:03:03 PM »
Thanks everyone, glad you liked it.

Overdrijf

  • Helen`s Lover
  • **
  • Posts: 651
  • Professional idiot
    • View Profile
Re: "Car" warping weirdly
« Reply #12 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.