Log in to reply
 

When 3D Car Models are downloaded, How do the wheels spin? (3D Modeling question)



  • What is it that tells the 3D Application that the 4 circles on the bottom should be able to spin?

    Does that have to do with the rigging process or what? Curious.


  • MODERATOR

    @JZersche a lot more than that and yes it's rigging.



  • @JZersche Actually... ignore my very bad and confusing description... :blush: I got caught between game and modelling application and made a mess of the explanation... sorry. :(



  • @JZersche Well, its complicated to explain if you don't know the basics...
    There is only one(or two, if the rear wheels are different) wheel models actually "present" in the model. The game copies the front left(and, if you have different rear wheels, rear left) to all the other sides.

    Now where does it copy them? That is defined by something called a dummy. It's just a point in 3D space so that the game engine knows where to put functionality, one of them being this function.

    As for the spinning part, thats done by the game itself. The game knows what to spin because of the dummy name(wheel_rr, wheel_rf, wheel_lr too if there is no custom rear wheel). The copied wheels (front left, and if the model uses rear wheels, rear left) are named [wheel_lf] and [wheel_lr]. So that the game knows that it should be copied.

    Of course there is a lot more things you need to do, but thats the basis of it.

    @FoxtrotDelta Rigging? I have never ever "rigged" anything... mind explaining?



  • @AHK1221 https://www.lynda.com/Maya-tutorials/Vehicle-Rigging-Maya/133340-2.html

    Anything involving bones and dummies in a 3D model is referred to as 'rigging'.



  • @LeeC2202 Oh... well I though rigging only applied to things whose vertices need to be manipulated using bones....

    Well, you learn something new every day!



  • @AHK1221 said in When 3D Car Models are downloaded, How do the wheels spin? (3D Modeling question):

    @LeeC2202 Oh... well I though rigging only applied to things whose vertices need to be manipulated using bones....

    Well, you learn something new every day!

    XD

    So, when you get a model off say a site like.. https://squir.com/vehicles/33625-jeep-wagoneer-woody-1980.html

    The wheels are actually separate objects in the model?

    I'm not much of a scripter, or modeler yet, and have a very slight clue towards reverse engineering and hex data but I am good with CSS3 and HTML5, and am studying SQL.. and Javascript currently. I just released a Firefox Theme here for anyone interested.

    https://forums.gta5-mods.com/topic/9892/release-mozilla-firefox-dark-colored-theme-designed-by-me

    At least I can release something for the time being XD



  • @JZersche I dunno if the wheels are seperate on that model, if they arent people need to seperate/detach them. But in vanilla vehicles, yeah, they are.



  • @AHK1221

    Right, I figured. If they're connected to the model, you just edit the model and detach em. Not like you can't do that. If you pay 80 - 300 dollars for a 3D Model of a car you better be able to remove the tires XD



  • @JZersche The physics engine do that. How? A interpolation of coordinates per frame syncronized with game variables like distance traveled, entity speed, main parent current torque, displaced mass, direction, surface material in contact with the wheel collider and mesh material properties (mass, grip, flexibility, boucing, etc), etc.

    Summarizing: The wheel is not spinning by any scripting tick, is just the response to the previous variables sum calculated by the physics engine, in that way, the processing in CPU can be less in response to the physics properties for the object normalized by presets (all that data in vehicle handling and metadata files).

    The wheel clones are by default, called when exists the propper dummy in the model hierarchy (as before was said and is a technique used in CGI to procedural clonation of 3D objects with symmetry like a wheel) and attached to the vehicle with joints handled with presets (attach type, rotation axes limits, attach resistance, dampers bump - rebound, etc). Is a intelligent and dynamic way to use wheels in vehicles, saving precious 3D and params bytes.



  • To anyone who distributes knowledge like this freely to others:
    Thank you, Your sharing of knowledge is what helps make the world go round, and inspires other programmers to do the same (hopefully).

    Also, I know a person who basically knows just about everything, I've known him since I was 13, and I'm 25 now. To this day, I haven't found a question he couldn't answer. So if anyone needs help with a script, I could possibly help, but there could be a charge involved. He very infrequently reponds to me, but is a reliable source of information because if I ever need to know something, I could get him to respond. He's usually very busy, but yeah. Thank you. AHK1221, Rarefacer, LeeC2202.

    You guys are awesome.


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.