Jump to content

Ren_712

Members
  • Posts

    327
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Ren_712

  1. @Krokara I'd suggest analyzing shader examples from wiki (screen space ones to be exact) and see what You are missing here. Because just copying and pasting stuff will not do. The code you posted is compatible with Dx9 HLSL. The only thing i'd need would be the 3d noise texture (that should be somewhere you got the code from)

  2. The_GTA This resource is beyond impressive. I found this topic just a week ago, immediately threw every other thing to study it.
    I'm particularly focused right no on using rw_shared.lua to read model data.
    This is a current result I've got with the standard model provided in the resource archive drawn using primitiveMaterial3D

    spacer.png

    The problems started when i decided to load some different models.
    The ones provided with the resource load with no issues, however Any other model (including original ones from gta3.img) fail to load.
    The same thing happens with clean math_3d_nonlin after typing draw_model (have replaced gf model with skyscr01_lawn.dff from original game)

    the err string for this particular file is:
    failed to read geometrylist: failed to read geometry #1: failed to read morph target vertex translation
    The script iterates through numVertices (a value much higher than an actual number) until this exception occurs
    the values from start to end don't make much sense...

    x 5.8774857670961e-39 y 5.8774997800807e-39 z 1.7060598161754e-24
    x 5.8774724547607e-39 y 5.8774829644992e-39 z 1.7060598161754e-24
    x 0 y 0 z 5.8774752573576e-39
     

    • Like 1
  3. i use dxDrawImage due to the rendering order (world textures are drawn before screen source is updated). That's why applying it to world texture will always result in 1 frame lag. It's not that noticeable on vehicles but on bigger surfaces it is. I don't need to apply changed matrices to vertex shader, everything that's needed can be passed to pixel shader directly (look into water_refract from community) or recreated from scene depth. As for the method mentioned in the article - it produces nice results:sslr.jpg

    • Like 1
  4. I noticed that you can get some information in vs from BLENDINDICES0 and BLENDWEIGHT0 semantics. This along with NORMAL can provide you with enough information to morph facial features , body etc . Works with any ped, however requires a lot of model related tweaking.

    le_neck.jpgbone_Indices18.png

    So what method did You use to morph the ped ?

    • Like 2
  5. 14 hours ago, Juuve said:

    Thank you and @Ren_712 for this script. I was looking for it but

    This is a shader or vehicle problem? I can simply draw something on back to hide holes but can i fix it somehow?

    @Juuve It's not really a vehicle problem, that's how the alpha channel is handled in this effect. I'd have to rewrite it ...
    If you don't want draw the vehicle post gui use this: https://www.solidfiles.com/v/mdy5QRqrMraZ2 or use non mrt variant instead

    • Thanks 1
  6. You will find more explanation on element 4x4 matrix here: https://wiki.multitheftauto.com/wiki/GetElementMatrix

    First 3 rows require: right, up, forward vectors. Fourth will be position. You can provide right and forward, and up will be cross product of the two.

    You can also create matrix provided 3 points in 3d space. And that is essentially what bone_attach does. The code is fairly easy to understand:

    hint: getMatrixFromPoints function in bone_pos_rot.lua

  7. On 31.01.2018 at 17:52, Dzsozi (h03) said:

    ..And I guess I would have to edit the .fx file, but I don't know what to do, edit where and what? I have no idea.

    set render state ZEnable = true; to enable depth testing (you'll find it in line 71 in effect file) ped_wall_mrt.fx (allso in the fallback effect ped_wall.fx)

×
×
  • Create New...