Jump to content
The Dark Mod Forums

messed up my development environment with 'save selected as collision model'


Recommended Posts

I was trying to export a collision model to make a frobbable brush and I clicked 'save selected as collision model'. The 'select model' menu popped up with the last entity I had placed, a crate, highlighted. I x'd out. Now whenever I try to place any entity it's placing a crate with it. 1. how do I un-taff my collision models and 2. how do I actually make a brush into a frobbable object? Meaning, how do I actually export a collision model? Also, I know I have to assign the 'custom grabbable' entity, but do I place that entity and then set something in the spawnargs to refer to the brush I want movable and the collision model?

Thanks as always for the help. Coming really close to having a map that is fully playable and getting pretty excited, so it's heartbreaking to get stuck like this in a way that I can't continue for now!

Link to comment
Share on other sites

you should check first that the item you want to use is available by right clicking on one of the xyz views, select create model, try to find your item, if not found click on cancel and use reload models in file tab and look for it again, if not found then the item was not saved in the models directory, move it there, or if directory don't exist in your darkmod install, create directory models in the same directory as where all the pk4 files are. if item found then you can do the following.

 

so i dont screw anything up I always move what am making a collision box for to the editors xyz origin and place the base of the item on the xyz origin so I can move the collision box origin onto that origin.

 

create a box around your object textured with the collision texture, or select the collision texture and use that to make a box around the item, convert collision box to a func_static, press v to move the origin of the collision textured box to the bottom of the box(this is where it would rest if dropped on the ground), press esc twice so nothing else is selected, select collision box, save selected as a collision model, select the model you want to add the collision box to in the model selection screen, click on ok to select it or cancel to not select it.

 

to un-taff what you done find the collision box you made (<what ever its named>.cm) and delete it. will be in the model directory with the same name as the model you selected if you did not select one it might have been save as cm

 

to make a useable item there are three types. to use place the one you want in your world, eg atdm:moveable_custom_item

change name to something like what it is - name : bunch of grapes

change inv_icon path to a tga image or dds image - inv_icon : guis/assets/hud/inventory_icons/bunchofgrapes

change model path to path of your model with the collision box ase/lwo - model models/darkmod/bunchofgrapes.ase

if you can't find your model, just use the reload models option in file

the collision box is auto loaded with the model

 

if its the one that doesn't go in your inventory then you dont need to set the inv_icon path

it still needs a unique name so objectives and scripts can access the item when they need to

Link to comment
Share on other sites

you should check first that the item you want to use is available by right clicking on one of the xyz views, select create model, try to find your item, if not found click on cancel and use reload models in file tab and look for it again, if not found then the item was not saved in the models directory, move it there, or if directory don't exist in your darkmod install, create directory models in the same directory as where all the pk4 files are. if item found then you can do the following.

 

so i dont screw anything up I always move what am making a collision box for to the editors xyz origin and place the base of the item on the xyz origin so I can move the collision box origin onto that origin.

 

create a box around your object textured with the collision texture, or select the collision texture and use that to make a box around the item, convert collision box to a func_static, press v to move the origin of the collision textured box to the bottom of the box(this is where it would rest if dropped on the ground), press esc twice so nothing else is selected, select collision box, save selected as a collision model, select the model you want to add the collision box to in the model selection screen, click on ok to select it or cancel to not select it.

 

to un-taff what you done find the collision box you made (<what ever its named>.cm) and delete it. will be in the model directory with the same name as the model you selected if you did not select one it might have been save as cm

 

to make a useable item there are three types. to use place the one you want in your world, eg atdm:moveable_custom_item

change name to something like what it is - name : bunch of grapes

change inv_icon path to a tga image or dds image - inv_icon : guis/assets/hud/inventory_icons/bunchofgrapes

change model path to path of your model with the collision box ase/lwo - model models/darkmod/bunchofgrapes.ase

if you can't find your model, just use the reload models option in file

the collision box is auto loaded with the model

 

if its the one that doesn't go in your inventory then you dont need to set the inv_icon path

it still needs a unique name so objectives and scripts can access the item when they need to

 

I already tried several approaches in the past (thanks @VanishedOne & ERH+), but I can't create such a moveable item even as per you description above.

 

:(

 

1. Created a "brush model" --> Converted to func static --> Used save selection as xxx.lwo under the models folder of my WIP ---> model shows up there

2. Created model xxx.low and changed location to the coordinates 0 0 0

3. Created collision model over xxx.low at coordinates 0 0 0 ---> converted to func static

4. Saved collision model model for xxx..lwo --> the collision model shows up in the models folder

5. Deleted model and cm model

6. Created entity atdm:moveable_custom_item and selected xxx.low --> xxx model shows up

7. Added properties grabable/frobable 1

8. Ingame: cannot frob or grab the item in question

 

I don't get it. :( .

Edited by JackFarmer
Link to comment
Share on other sites

You can add a cm from a separate model with a spawnarg in the entity. If you look at some existing movable entities, especially bowls or anything concave, you should find an example. If you pick one used by a model of similar size to yours, it should work.

 

edit: Here's an example of the line you need to add to the movable entity:

 

"clipmodel" "models/darkmod/misc/clipmodels/jug_clay_cm.lwo"

 

You could also probably use DR to make your own brush clipmodel, save it as a .lwo, and then add the above line pointing to the model you just saved.

Link to comment
Share on other sites

Is this about creating collisions models for dynamic objects in DR? If so what Springheel said is what I would recommend also. If is not for dynamic objects then is just a matter of creating a brush hull around your object and assign the collision material to it.

 

Btw if you are creating the models in blender you can export the collision model directly from blender, just create a collision mesh (with less than 16 polys, this is important) around your object, assign it the collision material and export your model, there's no need to put the collision model in a different layer, it can belong to the visible mesh layer, the engine will detect automatically the collision geometry by the material.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 3 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...