Kenshi

Kenshi

データを表示:
[HOW] .xml and colisions
somebody can explain me how works properly the .xml and collisions?

How I should create a box colission in blender?

in other words, all the processing to make custom buildings and furniture.
< >
1-15 / 18 のコメントを表示
Originally posted by oi__io

https://imgur.com/a/TJcCRWz

hope that helps
SnugSnug の投稿を引用:
Originally posted by oi__io

https://imgur.com/a/TJcCRWz

hope that helps

MANY THANKS!

I was wondering what the process was for creating collision boxes in Kenshi. And, now I don't have to wonder anymore!

I assume this means that the collision meshes for vanilla items can also be edited/reconstructed? ("Bughouse, I'm looking at you...")
A slight bump.

Since i'm still having issues with generating a collision that works in-game. Using the link in previous post and several other methods i've read/tried i can't get the .xml to generate beyond a few lines of code. Eg:
<?xml version="1.0" ?>
<NXUSTREAM2>
<NxuPhysicsCollection id="C:\Program Files (x86)\Steam\steamapps\common\Kenshi\mods\Restful Base Props\Buildings\Furniture\flagpole.xml" nxuVersion="103" sdkVersion="284">
<NxSceneDesc hasFilter="false" hasLimits="false" hasMaxBounds="false" id="collision">
<NxActorDesc hasBody="false" id="name" name="Cube">
<globalPose>1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 -0.381098 -2.620310 59.866333</globalPose>
<NxBoxShapeDesc dimensions="5.000000 5.000000 65.000000"/>
</NxActorDesc>
</NxSceneDesc>
</NxuPhysicsCollection>
</NXUSTREAM2>

which is very different to any of the vanilla .xml collisions.

So any advice much appreciated.
最近の変更はSnugSnugが行いました; 2019年5月2日 8時44分
Snug...

I thought it was possible to change the collision box via the XYZ "footprint" in the character's race file in editor... I could be wrong... but it seems to be working for me for pathfinding and combat.. .Hull XYZ in the race file..


oh wait.. you mean for object.. oops


ok.. I took a look at a random object.. and I found this in the xml in the cannibal big camp building.... hmm... but that wont help interiors if you are making a new building would it? I want to eventually make a nest, like a termite nest and will need to look into collisions at some point..

"<NxBoxShapeDesc dimensions="1.003863931 0.920505881 21.190862656">
<NxShapeDesc userProperties="" name="Box006">
<localPose>1 0 0 0 1 0 0 0 1 10.303497314 -40.148681641 21.188861847</localPose>
<NxShapeFlag id="shapeFlags">"... looks like a box you can set the scale for and the "local position" center relative to the pivot point of the model.. (in case you model is lopsided)... best bet..just manually insert those numbers?
最近の変更はjustDerrickが行いました; 2019年5月2日 11時21分
Thankyou.

Derrick Moore & Son の投稿を引用:

I think i figured it out. During the save proccess for exporting collision, i wasn't selecting Active, and selected instead of parent and child. This seams to have done it.

I also chose to apply rigid mesh to base not deform.

Between these it now seams to be registering in-game.

Edit
The other difference this time was i exported the mesh after applying the rigid body to it..

So not sure which change made the difference.

https://steamcommunity.com/sharedfiles/filedetails/?id=1730807813
最近の変更はSnugSnugが行いました; 2019年5月3日 8時07分
SnugSnug の投稿を引用:
Thankyou.

Derrick Moore & Son の投稿を引用:

I think i figured it out. During the save proccess for exporting collision, i wasn't selecting Active, and selected instead of parent and child. This seams to have done it.

I also chose to apply rigid mesh to base not deform.

Between these it now seams to be registering in-game.

Edit
The other difference this time was i exported the mesh after applying the rigid body to it..

So not sure which change made the difference.

https://steamcommunity.com/sharedfiles/filedetails/?id=1730807813

A full description of your process would be most helpful! Thanks for coming back with your solution.

Inspired by your post, I had originally compiled a large bunch of ignorant commentary. :) I thought better about it and spent several hours looking through "documentation."

/sigh

Man, there is so much conflicting stuff due to the inclusion of so many different engines and libraries. And, I am no coder. I push verts, not code. :)

The solution - The Exporter is the Law. :)

IOW - Trying to figure out which is using what and how from third-party docs is futile and just staring at the exporter is all that can really be done without knowing more about "Kenshi" rather than Ogre3D, PhysX or Havok and/or whatever third-party open-source library they're using for collisions. The number of "dead links" in resource materials and old threads is... spectacular regarding some of these third-party versions they've used.

Anyway, it seems that, for basic purposes, the collision mesh is just intended to be whatever mesh is dictated by the xml and then reconstructed (AFAIK, by Ogre3D conventions) in-game and assigned as a collision mesh for... _____ (Havok? Other?) It's basically a "do 3d, use exporter, don't think about other stuff" kind of thing.

This is good inasmuch as we can simplify it by -> xml=collsion mesh (and stuff?) and .mesh files =3d displayed object and displayed materials/alpha effects/other. No surfing of rat's nests threads or 404's necessary. :)

When you selected deform and parent child, you may have been telling the exporter that it was eligible for cloth effects, morphing, PhysX, and rigging. Typically, a grouped/rigged object without assigned rigging will not be displayed/generated by engines for "reasons." For mesh assignments for specific physics, those usually will still be rendered but they'll be default/static and/or "broken" in some way, since their parameters haven't been applied appropriately.

ie: No bone, no object, and no collision mesh in this instance. That, right there, would have likely kicked out the mesh and the engine wouldn't have likely pursued trying to load anything else regarding that object.

Kenshi has an error log. It loves talking to itself... There's tons of stuff in there, most of likely due to orphaned assets still referenced. However, you may be able to find log entries regarding your operation that will be much more specific regarding "what happened." That could shed some light on details you may be able to use in the future.

Congrats on your success! I can only hope my future efforts will turn out the same way!
https://steamcommunity.com/sharedfiles/filedetails/?id=1731116456
https://steamcommunity.com/sharedfiles/filedetails/?id=1731117235

Couple of quick references, to be used with the link tutorial above.

edit: Ignore the comment [wrong thumb] my content library has them with different thumbs.
edit2: i read those logs alot, lol. Definitely helps with pin pointing specific mod related issues, even if one doesn't truely understand the cause one can fiddle with the root.
最近の変更はSnugSnugが行いました; 2019年5月3日 13時31分
Morkonan の投稿を引用:


And, I am no coder. I push verts, not code. :)


HAW... this was my mantra for years... but last year I started doing some simple code stuff, and like wow... it's empowering for an artist, i think

(hah.. one time I went outside and got a "dowsing stick" to help my programmer buddy find a bug )
最近の変更はjustDerrickが行いました; 2019年5月3日 13時55分
SnugSnug の投稿を引用:
...Couple of quick references, to be used with the link tutorial above.

Thanks! (I lol'd at "Green Outline." :) )

edit2: i read those logs alot, lol. Definitely helps with pin pointing specific mod related issues, even if one doesn't truely understand the cause one can fiddle with the root.

I've glanced through them before after a couple of crashes. But, it seems like some of the errors are "expected." IOW - Stuff that is just going to continue to error out because of changes, but doesn't effect gameplay.

Is that the case? Or, for instance, is seeing fifty-eleven errors in those logs actually seeing fifty-eleven dire errors that the devs have to fix? Is there such a thing as a clean log file?

Derrick Moore & Son の投稿を引用:
HAW... this was my mantra for years... but last year I started doing some simple code stuff, and like wow... it's empowering for an artist, i think

I just think you want to share your pain and will gleefully suggest that I start to "code" only so you can bathe in my tears... :)

It's subtle, suggestive of "learning a new 3D app because doing so is "empowering." :)

"Am vert pusher, not code-monkey. Need more vert pushing."

"Hey, Mork, look at all these free exporters and converters and all the power and joy you can experience if you just learn "Blender." All these free operations that would cost you thousands of dollars in a professional app! Don't mind the fact that it's designed by committee! It's great!"

<Mork tries to do the learn on Blender, gouges out his eyes and goes to Hot-Key Hell>

"HAHAHAHA! I can't believe that you actually believed me! HAHAHAHA!"

:)

Yes, I admit, coding is a great thing for someone who loves 3D to learn, provided its complimentary to one's intent.

(Blender is great, too. I used to chase such things, starting off with XSI and then Milkshape just because those had import/export support for popular game formats, then moving on to more complex apps for awhile. Now... everything is Blender this and Blender that and I'm old and my wrist hurts and there's a new version every five minutes that no tutorials match up with. And, plus, I like complaining about that. What happens when I can't complain about being forced to learn stuffs? !! o.0 :) )

(hah.. one time I went outside and got a "dowsing stick" to help my programmer buddy find a bug )

Ducks. Their world is filled with little ducks... O'Reilly book, check. Gel wrist-wrest, check. Lumbar support, check. Dual monitor, check. Compiler, check Cheetos, check. Stackoverflow link, check. Duck, check.

There's a "Learning Python" book sitting on my computer desk... It stares at me accusingly every time I walk by it.

Serious question, though:

When looking around for solutions, I came across a number of different exporters for Ogre3D and related stuffs to third-party apps used in Kenshi. One, and which one it was I can't remember atm, had some detailed cloth settings and such... It appeared one could export a cloth group for simulation with dampening an' all that really cool "let's make capes" stuff.

Have you seen any cloth settings or export options for that in the suggested exporter?

Maybe a tag/entry in the file structure that's switched off or something? I saw some PhysX settings and the like, IIRC, for some specific items, perhaps in their file structure. (I think I was looking to see what they used for the Lantern and opened that up in an editor.)

The point - Capes, of course... Because I want my PC to set itself on fire. :)
Morkonan の投稿を引用:

I'm not really into item editing at moment only furniture/buildings. So i haven't looked as skeleton rigging or animations that are part of default template. I was contemplating trying to animate my flags or water via physics... but decided to leave that can of worms alone for now, given how buildings are treated differently.

That said, in blender there are different attributes that can be applied to the collision softbody, cloth, fluid, smoke etc whether Ogre deals with these i don't know, or they're redundant info on export.

In the FCS there are some setting within for defining material type although i think that's to do with how it affects light or bounce. There are also Physics that can be applied but not edited (one can edit at root but i had little success with only minor edits (flame height))

The fcs has presets for animation, physics,function that change based on item, furniture, character. Some seem to be locked into the mesh, as i stated earlier.

In the modding forum there are the plugins and templates for download and quick reference guide for animation in sticky.

PS some ones done a cape mod recently
https://steamcommunity.com/sharedfiles/filedetails/?id=1730610744
最近の変更はSnugSnugが行いました; 2019年5月4日 15時35分
Mork nailed it..

hmm.. cloth.. I'm sure I've seen a cloth setting in game..I'm gonna go check
SnugSnug の投稿を引用:
...
In the modding forum there are the plugins and templates for download and quick reference guide for animation in sticky.

PS some ones done a cape mod recently
https://steamcommunity.com/sharedfiles/filedetails/?id=1730610744

That looks just like a static mesh, though.

What I was referring to was an exporter, and it may have been designed specifically for Ogre3D, not the one issued in the modding resources, that seemed to suggest that Ogre3D could use cloth settings for dynamic cloth. ie: "The capes! They blow in the wind!" :)

So, I got kind of excited... But, was tired, and had already spent hours looking at Ogre3d, Havok, etc stuff and my brain was mushed. But, I do remember seeing that somewhere and, if so, there could be some engine in Kenshi that we could hook into.

Tell Kenshi/Physx/Havok (only used for collision detection? Maybe in combat? Dunno..) that "this object is "cloth" and you should treat it with "cloth dynamics."

But, the only thing that exhibits any dynamic properties seems to be PhysX items like the Lantern, attached and not yet severed but currently useless Limbs and then the Ragdolls for corpses. (I can't remember if a character colliding with an object on the ground will move it. I don't think those are enabled.)

I haven't seen one "flag" in Kenshi or a cloth banner fluttering in the wind. The HN seem to be pretty proud of themselves, so you'd think they'd have big fluttering banners on either side of their gates if the Developers had the chance to do it.

Oooh, even better - All the NPCs in HN patrols carry tiny little hand-held stick flags and wave those around as they walk, 'cause they're just that darn enthusiastic. :)

It's not impossible, I wouldn't think, to cludge-together a "dynamic acting" "Cape." But, that's only if Kenshi doesn't mind extra rigging and animations for clothing items. If it does, then it'd require a character skeleton replacement with extra bones for animating capes and new animations... Which is a bunch of work to do for just a neato cape that still has to get a slot dedicated to it. (I've heard mixed results on co-opting the Belt slot. It seems to be finicky.)

Derrick Moore & Son の投稿を引用:
Mork nailed it..

hmm.. cloth.. I'm sure I've seen a cloth setting in game..I'm gonna go check

https://www.youtube.com/watch?v=SmHeP9Sve48

;)
最近の変更はMorkonanが行いました; 2019年5月4日 16時29分
Okay, getting a little off topic from OP here so appologies.

Foliage mesh in the fcs have a windfactor setting and a density setting, allowing them to be affected by physics in-game.

There is also a separate category of Physics Attachment which has lanterns in it. They have a .phs file and and FCS setting to determine which bone they're attached to, and a physics preset dropdown for handling light/fx etc. Edit: one may be able to fit a cape here.

Normal items (armour) don't have these settings, Collision is an on/off toggle while the physics setting is "used to represent items when dropped" rather than when been worn. There is also no ability to add a physics effect to items, in the same way as one can furniture etc.

Once again the FCS varies in options depending on the target and what maybe possible with one part is restricted from another. Sometimes there's a work around like material textures etc or a root edit, but i think limitation of modding sums it up.
最近の変更はSnugSnugが行いました; 2019年5月5日 7時46分
SnugSnug の投稿を引用:
Okay, getting a little off topic from OP here so appologies.

Foliage mesh in the fcs have a windfactor setting and a density setting, allowing them to be affected by physics in-game.

There is also a separate category of Physics Attachment which has lanterns in it. They have a .phs file and and FCS setting to determine which bone they're attached to, and a physics preset dropdown for handling light/fx etc. Edit: one may be able to fit a cape here.

Normal items (armour) don't have these settings, Collision is an on/off toggle while the physics setting is "used to represent items when dropped" rather than when been worn. There is also no ability to add a physics effect to items, in the same way as one can furniture etc.

Once again the FCS varies in options depending on the target and what maybe possible with one part is restricted from another. Sometimes there's a work around like material textures etc or a root edit, but i think limitation of modding sums it up.

That is Gold Level Intelligence work right there. You're awesome! A heck of a lot more concise than some descriptions I've read. You should make a tute! ;)

Yeah, I saw the Lanterns bit. It basically gets it effected by Physx when running, but since it's not really a cloth sim it doesn't have to worry about distortions and volume preservation or self-collision, dampening, or a wind emitter/system etc..

Hmmm.. no way to add a physics attribute, then. So, if you can add it to furniture, could a cape be an "equipped furniture" item? :) Hey, I have never been above outright lying to a computer program or simulation in order to get it to do what I want. :D

I've seen others add items to that available slot. I guess it's a null or even a bone, would have to look at the rig to be sure. Thing is, from what I have read and seen, Kenshi doesn't appear to lock-down rigs in any way. You can add custom rigs and animations, according to the Propaganda (Feature Set Descriptions) for instructions and the like. I've seen others have added what appear to be custom rigs for some new mobs and the like and not just scaled up bones in some standard rig, so it should be possible to substitute/overwrite or add a rig if necessary. (Adding additional bones to equipped gear, though, that would be a winner right there. Everyone gets to hold animated pinwheels... )

Collision being "on/off" for dropped items? So... can we throw caltrops and nets behind us, then? (Will look, probably much like "limbs" in that they'll bounce around if dropped. May have even been expressly for that purpose. May not have mass effects or runspeed/nav effects, dunno.)

Time to start digging into .mesh conventions and the other formats, perhaps. And, now I gotta learn the FCS. Was having so much fun training my new recruits in Mongrel, though...

The thing is, while the FCS may only allow certain things, that doesn't mean some of these libraries/engines they used don't have other things enabled in them. A toggle could be as simple as editing a .mesh file and inserting <do dynamic cloth=1> and <wind generator=3.3, 0.0, 0.0, 0.0> to get Ogre3d & Physx to respond to it.

PS- It's not just about "capes." I use that just as an example of what Kenshi doesn't natively exhibit, but yet may still have hidden away somewhere. (That stuff can be resource-intensive for little gain.) There could be an emitter system somewhere for explosions and real smoke and building fires or a way for characters to... "jump off a cliff" or something. Maybe if these things were in an engine and they didn't include those features in their builder module... they're still there, switched on, and waiting to be dug up? :) No reason to turn them off if you're not using them and your own dev mod can't toggle them...
Back on topic.

If one exports a collision, and uses it in-game it will generate an associated *.bin file. One needs to re-name the collision or delete the *.bin if one intends to replace the existing *.xml. In other words if one makes a mistake in blender simply correcting the mesh and re-exporting the collision with an overwrite will not reflect any changes in-game.


Morkonan の投稿を引用:

Hmmm.. no way to add a physics attribute, then. So, if you can add it to furniture, could a cape be an "equipped furniture" item? :) Hey, I have never been above outright lying to a computer program or simulation in order to get it to do what I want. :D

Collision being "on/off" for dropped items? So... can we throw caltrops and nets behind us, then? (Will look, probably much like "limbs" in that they'll bounce around if dropped. May have even been expressly for that purpose. May not have mass effects or runspeed/nav effects, dunno.)

Furniture and armour have a drop down menu for adding physics effects... these are nearly all related to animation or lights like dancing flames or bubbles etc. These cannot be edited through FCS, only picked. However, they are stored in a folder where one can edit,add or fiddle with directly, if one has the knowledge (i don't), doing so may add the desired effect as a preset into the FCS.

The collision toggle for armour, i don't know whether this affects the worn or unworn state, and may be more related to clipping etc rather than how it acts once dropped. The physics part specifically states "used to represent items when dropped" but i'm not sure if it's the item itself or an applied effect for the proxy mesh that represents the dropped form of the item, during its transition from inventory to the ground. Many items have a simple box mesh when they aren't been worn.
< >
1-15 / 18 のコメントを表示
ページ毎: 1530 50

投稿日: 2019年4月21日 6時15分
投稿数: 18