Log in to reply
 

Quaternation sh*t


  • MODERATOR

    I have this painting, apa_p_h_acc_artwalll_03. It's slightly tilted, leaning against a wall:

    		<Pitch>-3.99999809</Pitch>
    		<Roll>1.63242022e-12</Roll>
    		<Yaw>90</Yaw>
    

    In ymap, it comes out as:

      <rotation x="0.0246776585" y="0.0246776585" z="-0.706676" w="0.706676" />
    

    As correctly seen here in CodeWalker (image on the right). But in-game it appears to be standing straight up:

    Rotate already!

    Wut?! We're not talking about some infinitesimal rounding error, here: the painting is tilted for 4 whole degrees! What's going on here?!

    P.S. Whoever thought of this convoluted Quaternation sh*t should be taken into the yard and be shot! :) Nothing but a PITA, and not even working properly!



  • Same issue as yours, I converted the following Menyoo map to .ymap (Los Santos Electric Railway [Replace]洛圣都电气化铁路) but two specific replaced items aren't rotated in-game (rail catenaries replacing prop_cs_20m_rope.ydr and prop_cs_30m_rope.ydr), standing always in a horizontal position when loaded as addon map.

    However they are correctly rotated/shifted when loaded in both Menyoo or Map Editor in-game or when displayed in Codewalker. Weird, weird bug indeed... :/



  • @meimeiriver @UsernameNotRequired I guess you're talking about the ScriptHookVDotNet Quaternion? Have you guys considered to open an issue ticket over at the shvdn repo?
    https://github.com/crosire/scripthookvdotnet/issues


  • MODERATOR

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver @UsernameNotRequired I guess you're talking about the ScriptHookVDotNet Quaternion? Have you guys considered to open an issue ticket over at the shvdn repo?
    https://github.com/crosire/scripthookvdotnet/issues

    Pardon my daftness, but how does ScriptHookVDotNet play into this?!



  • @meimeiriver It has a Quaternion method. I thought you guys are talking about scripting. See, that's some information missing in the OP's post. Anyway, my bad. Forget that I was here.


  • MODERATOR

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver It has a Quaternion method. I thought you guys are talking about scripting. See, that's some information missing in the OP's post. Anyway, my bad. Forget that I was here.

    No scripting involved, just a Menyoo map/item converted to ymap. And the rotations DO come out right in CodeWalker. So, Menyoo's got it right, CodeWalker got it right, but just not the game. :)


  • MODERATOR

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver It has a Quaternion method. I thought you guys are talking about scripting. See, that's some information missing in the OP's post. Anyway, my bad. Forget that I was here.

    There's also this: Quaternion Converter, which confirms the resultant Quaternation values (back and forth). So it's absolutely the game.



  • @Cyron43 Thanks for your suggestion, I don't know if this issue happening with some converted maps is related to ScriptHookVDotNet anyway I opened a ticket on Github if it is indeed the case here: https://github.com/crosire/scripthookvdotnet/issues/726

    @meimeiriver Yes this is the strange part of this problem, the Codewalker app is supposed to display the content almost exactly as it would appears in-game, anyway in our situations the rotation/tilt aren't taken into account only when loaded as addon map.



  • @UsernameNotRequired If you don't call into shvdn with any code, it is not responsible for this issue. This was a misunderstanding from my side. Sorry.


  • MODERATOR

    @UsernameNotRequired said in Quaternation sh*t:

    @meimeiriver Yes this is the strange part of this problem, the Codewalker app is supposed to display the content almost exactly as it would appears in-game, anyway in our situations the rotation/tilt aren't taken into account only when loaded as addon map.

    And that's the strange part. I've had other occassions, btw, where like a 'cover' object, to seal one of those slightly crooked prop_ld_dstpillar_06 objects, came out straight, instead of the minutely tuned rotations I gave it.

    It's almost as if the game does some 'clever' auto-adjusting at times; but, at other times -- almost always, really -- rotations get obeyed without fault. So, it must be a bug somehow.

    EDIT: Could be the result of some physics conflict too. Not all that likely, but I'm going to test this with the object stand-alone, sans other props around them.



  • @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.


  • MODERATOR

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.

    LOL, I was thinking the exact same thing. :) Going to test that.


  • MODERATOR

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.

    One thing, though, the map loads just fine with Menyoo Spooner, with the painting properly tilted. And objects aren't frozen by default in Menyoo. Besides, I don't know of a 'frozen' ymap property, even if I wanted to set it (maybe's it's in that flag number nobody seems to know anything about?).



  • @meimeiriver I can develop an enterprise application but don't ask me about ymap. LOL


  • MODERATOR

    @meimeiriver said in Quaternation sh*t:

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.

    One thing, though, the map loads just fine with Menyoo Spooner, with the painting properly tilted. And objects aren't frozen by default in Menyoo. Besides, I don't know of a 'frozen' ymap property, even if I wanted to set it (maybe's it's in that flag number nobody seems to know anything about?).

    FYI, In an unprecedented act of quoting myself, LOL, I think this flag actually makes an object dynamic:

    <flags value="1572865"/>

    And this just keeps it static:

    <flags value="32"/>



  • @meimeiriver Oh I think I just found a fix! In my case every objects were set as static (<flags value="32"/>) but the rotation/tilt weren't taken into account, instead I used the value used for the electric poles (<flags value="1572877"/>). I Selected randomly this object in Codewalker as this is a 100% static unmovable/unbreakable mesh in-game) which I applied to all my statics.
    Now magically the rotations are applied! Tada! ^__^


  • MODERATOR

    @meimeiriver said in Quaternation sh*t:

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver Have you guys considered the physics effects? Objects can tip over if they are not frozen.

    LOL, I was thinking the exact same thing. :) Going to test that.

    Sadly, it didn't work. Painting, stand-alone, is still positioned fully straight, not rotated 4 degrees at all.


  • MODERATOR

    @UsernameNotRequired said in Quaternation sh*t:

    @meimeiriver Oh I think I just found a fix! In my case every objects were set as static (<flags value="32"/>) but the rotation/tilt weren't taken into account, instead I used the value used for the electric poles (<flags value="1572877"/>). I Selected randomly this object in Codewalker as this is a 100% static unmovable/unbreakable mesh in-game) which I applied to all my statics.
    Now magically the rotations are applied! Tada! ^__^

    That's a great find! :) Thank you!!


  • MODERATOR

    @UsernameNotRequired said in Quaternation sh*t:

    @meimeiriver Oh I think I just found a fix! In my case every objects were set as static (<flags value="32"/>) but the rotation/tilt weren't taken into account, instead I used the value used for the electric poles (<flags value="1572877"/>). I Selected randomly this object in Codewalker as this is a 100% static unmovable/unbreakable mesh in-game) which I applied to all my statics.
    Now magically the rotations are applied! Tada! ^__^

    P.S. It's sad to see so many of the old crowd gone, as ymap is just where GTA V began to become real interesting. But, at it would appear, the community can still help each other. :)


  • MODERATOR

    @UsernameNotRequired said in Quaternation sh*t:

    Selected randomly this object in Codewalker as this is a 100% static unmovable/unbreakable mesh in-game) which I applied to all my statics.

    Hmm, I hope you have a backup, LOL, as I just tested this out myself, replacing all '32' flags with '1572877'. That wasn't a success, as several objects lost their collision (and became essentially 'phantom', to speak in Second Life terms). Like heist rugs, for instance. Also, a bag of money I had sitting on the floor got kicked over when I ran into it.

    So, I'm going to reserve 1572877 for objects that absolutely need it. And maybe put an invisible prim.. err, dummy_car over it, so it won't budge (if I ever find out how to set transparency on ymap objects, that is).



  • @meimeiriver Just out of curiosity, would it be possible to make static objects tip over by changing this flag? Trees or powerline posts for instance. It would be great if we could run them over. Oh oh or just think about those wind generators. We could cause some mayhem with these! :D


  • MODERATOR

    @Cyron43 said in Quaternation sh*t:

    @meimeiriver Just out of curiosity, would it be possible to make static objects tip over by changing this flag? Trees or powerline posts for instance. It would be great if we could run them over. Oh oh or just think about those wind generators. We could cause some mayhem with these! :D

    Not every object became phantom, or I'd have sunk thru the house immediately. :) But many objects lost their collision nonetheless, and/or became moveable. So, this may not work on every tree (or any tree at all, for that matter); but I'm going to experiment a bit with it, and I'll let you know.

    N.B. Slightly unrelated, but it's too bad you don't do ymap. You can really do fun things with it; like scaling objects, for instance. Paintings, for one. Many objects will scale (which I really consider a major thing, building-component wise); but some objects won't budge at all. Hmm, that might actually be flag-related too, LOL. I will experiment with that too.


  • MODERATOR

    @Dekurwinator said in Quaternation sh*t:

    @meimeiriver just try to set other values for pitch for example -8 or 8 and see if object change his rotation, for myself i have sometimes bugs with rotation where are change in something other than Yaw (pitch or roll or both) then i will fix it manually, or snd me just menyoo xml and in free time i will look at it

    Damn, I thought the issue had been resolved, using the (above mentioned) special flags. Alas, today I encountered another faulty entry:

    <Placement>
    	<ModelHash>0x8bbfb426</ModelHash>
    	<Type>3</Type>
    	<Dynamic>false</Dynamic>
    	<FrozenPos>true</FrozenPos>
    	<HashName>prop_ld_handbag</HashName>
    	<InitialHandle>119095</InitialHandle>
    	<ObjectProperties>
    		<TextureVariation>0</TextureVariation>
    	</ObjectProperties>
    	<OpacityLevel>255</OpacityLevel>
    	<LodDistance>16960</LodDistance>
    	<IsVisible>true</IsVisible>
    	<MaxHealth>1000</MaxHealth>
    	<Health>1000</Health>
    	<HasGravity>true</HasGravity>
    	<IsOnFire>false</IsOnFire>
    	<IsInvincible>false</IsInvincible>
    	<IsBulletProof>false</IsBulletProof>
    	<IsCollisionProof>false</IsCollisionProof>
    	<IsExplosionProof>false</IsExplosionProof>
    	<IsFireProof>false</IsFireProof>
    	<IsMeleeProof>false</IsMeleeProof>
    	<IsOnlyDamagedByPlayer>false</IsOnlyDamagedByPlayer>
    	<PositionRotation>
    		<X>-541.768188</X>
    		<Y>4444.32471</Y>
    		<Z>35.0575562</Z>
    		<Pitch>9.00000286</Pitch>
    		<Roll>1.29662396e-06</Roll>
    		<Yaw>35.999794</Yaw>
    	</PositionRotation>
    	<Attachment isAttached="false" />
    </Placement>
    

    It comes out, (in me2ym) as:

    <Item type="CEntityDef">
      <archetypeName>prop_ld_handbag</archetypeName>
      <flags value="1572877" />
      <guid value="0" />
      <position x="-541.7682" y="4444.32471" z="35.0575562" />
      <rotation x="-0.0746191" y="-0.0242450777" z="-0.308062673" w="0.948125243" />
      <scaleXY value="1" />
      <scaleZ value="1" />
      <parentIndex value="-1" />
      <lodDist value="500" />
      <childLodDist value="500" />
      <lodLevel>LODTYPES_DEPTH_HD</lodLevel>
      <numChildren value="0" />
      <priorityLevel>PRI_REQUIRED</priorityLevel>
      <ambientOcclusionMultiplier value="255" />
      <artificialAmbientOcclusion value="255" />
      <tintValue value="0" />
    </Item>
    

    Causing the handbag to just stand up straight. Both the X and Y values are so small, though, this may actually be a me2ym conversion issue.


  • MODERATOR

    @Dekurwinator said in Quaternation sh*t:

    @meimeiriver ive used your values for rotation and object prop_ld_handbag spawned by ymap has exacly same rotation like this spawned by menyoo. Theres no issues for me.

    Thank you for testing this!

    I re-tested this myself, and the handbag suddenly appeared correctly. I smelled a rat, walked towards it, bumped into it, and, lo and behold, it rolled back to an upward position! I'm guessing because its flags make it moveable somehow:

    <Item type="CBaseArchetypeDef">
      <lodDist value="40.00000000"/>
      <flags value="537001984"/>
      <specialAttribute value="0"/>
      <bbMin x="-0.21432900" y="-0.06014400" z="-0.55755700"/>
      <bbMax x="0.21432900" y="0.06014400" z="0.06122500"/>
      <bsCentre x="0.00000000" y="0.00000000" z="-0.24816600"/>
      <bsRadius value="0.38115220"/>
      <hdTextureDist value="5.00000000"/>
      <name>Prop_LD_HandBag</name>
      <textureDictionary>prop_bag_walet</textureDictionary>
      <clipDictionary/>
      <drawableDictionary/>
      <physicsDictionary>prop_bag_walet</physicsDictionary>
      <assetType>ASSET_TYPE_DRAWABLE</assetType>
      <assetName>Prop_LD_HandBag</assetName>
      <extensions/>
    </Item>
    

    That's easily solved, of course: I'll just copy it into my own props.rpf, but with regular flags. :)

    Thanks again.


Log in to reply
 

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