News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

"Car" warping weirdly

Started by Overdrijf, May 17, 2013, 04:38:31 PM

Previous topic - Next topic

Overdrijf

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.

Overdrijf

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

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

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

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

#5
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.

Komeuppance

Lol... good stuff.  I laughed really hard when the dinosaur exploded.

-Robert

zaqrack

This was great, thanks for sharing :))))

CTG

 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. :-\

Duplode

Quote from: CTG on May 30, 2013, 10:15:34 AM
.vsh and .res files: 0 downloads? Nobody tried them. :-\

I didn't. That video is genius, though  :D 

CTG

#10
Sure. T-Rex should be added to ZSC 2014 official cars.

Overdrijf

Thanks everyone, glad you liked it.

Overdrijf

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.

Overdrijf

I never shared the dinosaur either. Here it is, for people who want to try it. If I find it I might at some point add the file for making your ice roads disappear too.

Overdrijf

And here are the roads. Rename this file "GAME1.3sh" and rename the existing "GAME1.P3S" to something like "GAME1 original.P3S" and the straights and corners of ice roads will be invisible, but still there as far as the physics engine is concerned. This file only does visuals. Fun fact: the preview in the track selection menu renders the track using the same 3D models, the same road pieces are invisible on there as well.

Right, so that should be it for the forum archeology for now.