Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

[SA] Morphing in-game


Shmoopy
 Share

Recommended Posts

How to morph a mesh in-game


- Tools needed:

- Step 1:
Import your model , I chose to import the Admiral model , select the part you want to modify if your model has multiple parts , I chose the chassis, [Right-click] on it and click on [Hide unselected] , then expand the + Editable mesh and go to - Vertex mode and select the vertices which you want to apply your modification on:


46ec5d27_o.png


Run the script that you downloaded:


B1.JPG


Click on export , make sure that the vertices are still selected :


d8c7daec_o.png


- Step 2:

You should obtain the vertices ids like shown below :


b0ae24cf_o.png



Make a new ini file out of it like this :


3113e87c_o.png


Save your ini file to the cleo folder

- Step 3:
Use this script to manipulate your vertices :






const  chassis = 0x64C              wheel_rf_dummy = 0x650             wheel_rm_dummy = 0x654             wheel_rb_dummy = 0x658             wheel_lf_dummy = 0x65C             wheel_lm_dummy = 0x660             wheel_lb_dummy = 0x664            door_rf_dummy = 0x668             door_rr_dummy = 0x66C              door_lf_dummy = 0x670             door_lr_dummy = 0x674             bump_front_dummy = 0x678           bump_rear_dummy = 0x67C           wing_rf_dummy = 0x680                wing_lf_dummy = 0x684                bonnet_dummy = 0x688              boot_dummy = 0x68C                windscreen_dummy = 0x690           exhaust_ok = 0x694                misc_a = 0x698                    misc_b = 0x69C                    misc_c = 0x6A0                     misc_d = 0x6A4                    misc_e = 0x6A8 end0AB1: call_scm_func @VehNodeGetStructure params 2 car [email protected] node chassis ret: RwFrame [email protected] RpAtomic [email protected] RpClump [email protected] RpGeometry [email protected] RpMaterial [email protected] [email protected] = 1 // Beginning IDrepeatwait 00AD3: [email protected] = format "%d" [email protected]: [email protected] = get_int_from_ini_file "cleo\data.ini" section "chas_top" key [email protected]: call_scm_func @MorphGeometryPoints params 6 RpGeometry [email protected] starting_V3d_ID [email protected] num_Points 1 morph 0.0 0.0 0.4 [email protected] += 1until [email protected] == 185 // Ending ID + 1end_thread:MorphGeometryPoints   0AA7: RwMatrixCreate 0x7F2A50 num_params 0 pop 0 RwMatrix [email protected]//0AA5: RwMatrixScale 0x7F22C0 num_params 3 pop 3 combine 1 scaleoffset [email protected] RwMatrix [email protected]//0AA5: RwMatrixRotate 0x7F1FD0 num_params 4 pop 4 combine 1 rot_angle 90.0 rot_axis [email protected] RwMatrix [email protected]: RwMatrixTranslate 0x7F2450 num_params 3 pop 3 combine 1 pos [email protected] RwMatrix [email protected]@ += 920A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 //[email protected] -= [email protected] += 28 // RwV3d 1 - RwV3d in [email protected] -= [email protected] = 12006A: [email protected] *= [email protected]  005A: [email protected] += [email protected]   0085: [email protected] = [email protected] // RwV3d out 0AA5: RpGeometryLock 0x74C7D0 num_params 2 pop 2 Lockmode 0x02 RpGeometry [email protected] //rpGEOMETRYLOCKPOLYGONS = 0x01 ;rpGEOMETRYLOCKVERTICES = 0x02 ;rpGEOMETRYLOCKNORMALS = 0x04 ;rpGEOMETRYLOCKPRELIGHT = 0x08 ;rpGEOMETRYLOCKTEXCOORDS = 0x10 ;rpGEOMETRYLOCKTEXCOORDS1 = 0x10 ;rpGEOMETRYLOCKTEXCOORDS2 = 0x20 ;rpGEOMETRYLOCKTEXCOORDS3 = 0x40 ;rpGEOMETRYLOCKTEXCOORDS4 = 0x80 ;rpGEOMETRYLOCKTEXCOORDS5 = 0x0100 ;rpGEOMETRYLOCKTEXCOORDS6 = 0x0200 ;rpGEOMETRYLOCKTEXCOORDS7 = 0x0400 ;rpGEOMETRYLOCKTEXCOORDS8 = 0x0800 ;rpGEOMETRYLOCKTEXCOORDSALL = 0x0ff0 ;rpGEOMETRYLOCKALL = 0x0fff 0AA5: RwV3dTransformPoints 0x7EDD90 num_params 4 pop 4 RwMatrix [email protected] numPoints [email protected] V3d_pointsIn [email protected] V3d_pointsOut [email protected]: RpGeometryUnlock 0x74C800 num_params 1 pop 1 RpGeometry [email protected] 0AB2: ret 0:VehNodeGetStructure 0A97: [email protected] = car [email protected] struct005A: [email protected] += [email protected]  0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00AB1: call_scm_func @FrameGetAtomic 1 RwFrame [email protected] ret: RpAtomic [email protected]: call_scm_func @AtomicGetClump 1 RpAtomic [email protected] ret: RpClump [email protected]: call_scm_func @AtomicGetGeometry 1 RpAtomic [email protected] ret: RpGeometry [email protected]: call_scm_func @GeometryGetMaterial 1 RpGeometry [email protected] ret: RpMaterial [email protected]: ret 5 [email protected] [email protected] [email protected] [email protected] [email protected]:GeometryGetMaterial0AA7: call 0x74c760 num_params 2 pop 2 RpTriangle [email protected] RpGeometry [email protected] RpMaterial [email protected] 0AB2: ret 1 [email protected]:[email protected] += 0x180A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00AB2: ret 1 [email protected]:[email protected] += 0x3C0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00AB2: ret 1 [email protected]:FrameGetAtomic0AA7: call_function 0x7348C0 num_params 1 pop 1 RwFrame [email protected] RpAtomic [email protected] 0AB2: ret 1 [email protected]:[email protected] += 0x980A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00AB2: ret 1 [email protected]:[email protected] += 0x9C0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00AB2: ret 1 [email protected]:[email protected] += 0xA00A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 00AB2: ret 1 [email protected]



- Results:

1e8425ef_o.png
905f00d9_o.png

You can modify any part you want:

b6f6cceb_o.png
c1e5473f_o.png

Edited by Shmoopy
Link to comment
Share on other sites

look to RpMorph plugin in rwsdk.

Also, learn how to work with file read/write operations. Don't use INI for such tasks.

Edited by DK22Pac
Link to comment
Share on other sites

look to RpMorph plugin in rwsdk.

Also, learn how to work with file read/write operations. Don't use INI for such tasks.

 

RpMorph is definitely implemented in Gta SA ...

Oh , and I prefer to work with a 3 lines code for reading data rather than a sh*thole of 0A9D: readfile [email protected] size 1 to [email protected]

Edited by Shmoopy
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.