• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0

Need help with model cutting and model deforms for darkplaces engine

2 posts in this topic

I was wondering if a developer could help add a feature to the opensource darkplaces engine. Model cutting and model deforms.

I would like to add an axe to a mod I'm working on. I've allready added 4 other ancient weapons including caltrops and a torch that burns, gives light, and extinguishes in water, also other bludgeon weapons and ancient ranged weapons.

I cannot add an axe or a sword however because it would not be any different than the bludgeon weapons without some darkplaces engine modifications: the axe needs to cut and cleave that which it is brought against, for this there need to be routines in the darkplaces engine that cut things via a plane and then either loop-fill the hole or just mirror the new model on the inside with a blood texture (easier) (depending on species).

The subroutine would need to accept a few parameters: coords of the cut plane (ofcourse), texture to use for blood, weather to loop-and-fill with new polygons the hole or to just copy-reverse the new model(s) and make an interior hull (easier).

This could all be placed in a modeldeforms.c for darkplaces.

Other deforms that would be nice could be: shatter (model is reduced to collections of it's triangles), shrink/expand, collapse (think disolve in acid, model is collapsed/shrunk towards the bones), cave-in (radius is given and point, any part of the model that is in this radius is collapsed away, thus looking like a cave-in).

Here's a zip of just the engine: http://ompldr.org/vZ2R0dA/darkplacesforxonotic.zip

Share this post

Link to post
Share on other sites
But here is how to download the whole game with all the source (the darkplaces directory has the engine):
This is what other developers for darkplaces suggested:
<Sniper|AFK> By model cutting, what are you referring to?
<Space_Man> laser scalpels
<Space_Man> ?
<Sniper|AFK> Seemingly that shouldn't be terribly difficult to implement
<Space_Man> human or animal models? there is an important ethical difference
<Sniper|AFK> For the physics system being used, you'd create a new actor or entity to handle the newly created pile of guts or whatever.
<Space_Man> no sane person wants to experiment on human models
<Space_Man> but a cute dog model...
<Sniper|AFK> Let's say you chopped off a leg.
<Sniper|AFK> You'd need to load up the model's verticies, create a clipping plane for the slice, and designate which polygons were affected
<Sniper|AFK> Two new models would need to be created,
<Sniper|AFK> The "hole" in the leg would need to be filled with an appropriate "blood and guts" textured mesh
<Sniper|AFK> You'd probably designate a particle system for the center of the newly created hole, at which point blood gushes out.
* LordHavoc has quit ("Client exiting")
<Sniper|AFK> The physics system would take care of the collision of either mesh.
* LordHavoc (~havoc@50-193-192-106-static.hfc.comcastbusiness.net) has joined #darkplaces
* Caleb gives channel operator status to LordHavoc
<Sniper|AFK> Something to that effect.
<Sniper|AFK> Obviously there'd be more to it, but overall, I'd probably code it in those steps.
<Sniper|AFK> As for the actual slicing and filling of the model, I'm sure there are papers around for that.
<Spoike1> no, none.
<blendarer> none?
<blendarer> I just want.... model cutting and deforms
<blendarer> and I.. don't know how to do this
<Spoike1> oh, is that all?
<blendarer> suppsidly it's easy
<blendarer> that's all
<Spoike1> aye, it is really easy...
<Spoike1> doing it in realtime in a persistant manner on the other hand...
<Spoike1> especially if you want the severed limb to fall on the ground instead of instantly vanishing in an immersion breaking way
<blendarer> be given an entity and fall on ground like a gib
<blendarer> (doesn't need to be properly min/maxed or anything)
<Spoike1> if you have a mesh and a plane to cut along, you can test the distance from the point, and figure out the fraction and midpoint
<Spoike1> problem is that in an animating mesh, that mid point moves.
<Spoike1> and the plane bends too.
<Spoike1> and the animations kinda expect there to still be an arm or whatever to counter balance the animation's momentum, etc
<blendarer> could still keep the bone there?
<blendarer> (but no verts )
<blendarer> I made a thread here http://forums.xonotic.org/showthread.php?tid=3666 about that
<blendarer> but whatever's simple is fine too, something is better than nothing
<Spoike1> easiest way is to likely build the mesh, figure out the interpolant values, and then generate a completely new mesh from the original mesh. then import animations from the origional model into your new mesh.
<blendarer> if animation can't be done this could just be a death effect which wouldn't be called unless the blow's dmg reduced theirs to less than 0
<blendarer> Spoike1, in the engine?
<Spoike1> using vertex weights to figure out the new midpoint of the lines on the cuts
<blendarer> may I post these things to that thread (so others can read the ideas?)
<Spoike1> do whatever you want, so long as I don't have to stop being lazy.
<blendarer> are there any turtorials on darkplaces I can read to learn how do work with it and maybe do this
The game and engine are GPL licensed, so virtually anything can be done with it.

Share this post

Link to post
Share on other sites

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0