Log in to reply
 

How do I add a custom .ydr object to a ymap scene?



  • How do I add a custom .ydr object to a ymap scene? I added a .ydr file to the rpf, and referenced the object via the ymap. Like:

        <archetypeName>chair_artwall</archetypeName>
    

    With chair_artwall.ydr and chair_artwall+hidr.ytd inside the rpf (this is basically a copied and renamed existing art frame from in-game, with custom high-res image). It doesn't show up, though.

    I'm probably missing a step. Does anyone know which one? Thanks.



  • It almost seems like this site is dead. :) But I keep trying anyway.

    I found a way to add/register my chair_artwall.ydr to an existing ytyp collection. So, the object loads. However, it does not load the image inside chair_artwall+hidr.ytd for it. Shouldn't that be autoloaded, in case of 'Very high' graphics?

    Please, someone respond.



  • Sigh. This was never going to work to begin with. The hidr.ytd file requires the same image name (inside) as the uneditable .ydr files. :( And if you try and name it to that, OpenIV says a name like that already exists.

    Wasted an entire day for nothing.



  • @meimeiriver you must modify the ytyp file of the folder to set the object.
    Go to the end of the x.ytyp file and copy the last <item></item> block
    paste it under and change the copyed name from the item block with your object name same for texture you've to set it here in the texture dictionnary line.



  • @Shaezbreizh said in How do I add a custom .ydr object to a ymap scene?:

    @meimeiriver you must modify the ytyp file of the folder to set the object.
    Go to the end of the x.ytyp file and copy the last <item></item> block
    paste it under and change the copyed name from the item block with your object name same for texture you've to set it here in the texture dictionnary line.

    And that's pretty much what I finally managed to do (see above).

    What I wanted to do, though, turned out to be impossiible, after all. I took an existing art frame, like apa_mp_h_acc_artwallm_02.ydr, and renamed it to, say, renamed.ydr. Problem is, I can consequently rename *apa_mp_h_acc_artwallm_02+hidr.ytd to renamed+hidr.ytd too, but *renamed.ydr still expects the high-res replacement image to be named apa_mp_h_acc_artwallm_02. So, if I try and set that name in renamed.ytd, OpenIV tells me the name is already in use (which it kinda is).



  • @meimeiriver you can change the texture dictionnary used inside the .ytyp of the folder.



  • @Shaezbreizh said in How do I add a custom .ydr object to a ymap scene?:

    @meimeiriver you can change the texture dictionnary used inside the .ytyp of the folder.

    I wonder, do you have an example of that? I used the ytyp files from addonprops, but that only contains hashes, so it's very hard to determine what the proper values should be.



  • I still don't get this to work. :( Consider this:

        <Item type="CBaseArchetypeDef">
          <lodDist value="30.00000000"/>
          <flags value="536870912"/>
          <specialAttribute value="0"/>
          <bbMin x="-0.68351500" y="-0.05398700" z="-0.68227290"/>
          <bbMax x="0.68351500" y="0.00042600" z="0.68227290"/>
          <bsCentre x="0.00000000" y="-0.02678050" z="0.00000000"/>
          <bsRadius value="0.96614160"/>
          <hdTextureDist value="5.97000000"/>
          <name>chair_artwall</name>
          <textureDictionary>chair_artwall</textureDictionary>
          <clipDictionary/>
          <drawableDictionary/>
          <physicsDictionary>int_mp_h_accessories</physicsDictionary>
          <assetType>ASSET_TYPE_DRAWABLE</assetType>
          <assetName>chair_artwall</assetName>
          <extensions/>
        </Item>
    

    The object spawns just fine, but there's no way I can get it to use the image from chair_artwall+hidr.ytd, whatever I try.



  • @meimeiriver addonprops tool made by method is outdated ( he relesead this tool before OpenIV team made ytyp editable that why there is hash instead of name).
    Sollahola made a tool that work better for that or you can still do it manualy if you've only one prop

    here with the code I see, your texture dictionary used is the prop one wich work only if the prop have embeded texture.
    change the <textureDictionary>chair_artwall</textureDictionary>
    to <textureDictionary>chair_artwall+hidr</textureDictionary>



  • @Shaezbreizh said in How do I add a custom .ydr object to a ymap scene?:

    change the <textureDictionary>chair_artwall</textureDictionary>
    to <textureDictionary>chair_artwall+hidr</textureDictionary>

    Sadly, that didn't work either.

    Also, I don't mean to know better, but I thought you never define the +hidr ytd file as textureDictionary. Way I understood it, the +hidr ytd file is simply meant to be used automagically when present. As how it's defined in the manifest, for instance (format copied from another artwall image):

          <assetType>AT_DRB</assetType>
          <targetAsset>chair_artwall</targetAsset>
          <HDTxd>chair_artwall+hidr</HDTxd>
    

    But it's not loading, even with

    <textureDictionary>chair_artwall+hidr</textureDictionary>



  • @meimeiriver well the best way is to open it with gims , change texture dictionary and rename it



  • @Shaezbreizh said in How do I add a custom .ydr object to a ymap scene?:

    @meimeiriver well the best way is to open it with gims , change texture dictionary and rename it

    I don't understand what you mean. Whatever textureDictionary I use, it simply doesn't get used for alternate image. :(

    Btw, I don't have to register chair_artwall+hidr itself in ytyp too, right?



  • @meimeiriver idk then. rename it to something else like texture2 or whatever and try to input this name in the <textureDictionary>texture2</textureDictionary>.
    But as I said, to do it properly you must use gims ( or zmodeler) so you can change everthing



  • @Shaezbreizh said in How do I add a custom .ydr object to a ymap scene?:

    @meimeiriver idk then. rename it to something else like texture2 or whatever and try to input this name in the <textureDictionary>texture2</textureDictionary>.
    But as I said, to do it properly you must use gims ( or zmodeler) so you can change everthing

    The problem is, that all these artwall frames (.ydr) are read-only. So far actually every .ydr object I encountered. So, there's no changing them. Normally, changing out the accompanying texture inside the +hidr.ytd file does the job.



  • @Shaezbreizh See, here's the problem. I will use real name.

    My chair_artwall is a copy of apa_mp_h_acc_artwallm_03.ydr. It has an embedded picture of p_h_acc_artwallm03_d. The latter is the problem: it's a hardcoded name; so, regardless of whatever textureDictionary, it expects a name in the .ytd file, also called p_h_acc_artwallm03_d. And that image name takes precedence (as it's already defined elsewhere).

    So, like I said, seems like this will never work. Or am I completely misunderstanding the process?



  • Oh, FFS, I figured it out! :)

    My assumption about the naming convention was flat-out wrong (they do seem to be using the same names, but it turns out to be irrelevant). Thing is, it was working all along, but I forgot one parameter in ytyp:

      <hdTextureDist value="500.00000000"/>
    

    This value determines the distance, in meters, from the object, at which the HD texture takes over and becomes visible. It was set to 5m, and I was too far away from the painting to ever see the HD texture kick in! LOL. All good now!


Log in to reply
 

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