Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

drilling a hole in real time


Im already searching for days. I would like to make a real hole in a mesh in real time. The player should be apple to use a drilling machine and make a "real hole" into the material. If the player drill 10cm the material should loose 10cm.

If there is a solution, i would appreciate it.

Product Version: UE 4.18
more ▼

asked Mar 20 '18 at 05:04 PM in Blueprint Scripting

avatar image

1 1 1

avatar image Ruffhaus Games Mar 20 '18 at 10:34 PM

This is quite a difficult thing to do in a real time application if you want it to be completely accurate.

The first thing that came to my mind is the procedural mesh component, it's not something I have a lot of experience with but maybe just check out a few tutorials on it.

I know slicing along a plane is fairly straight forward, but to make negative shapes is quite a bit of math as you need to work out the vertices and normals.

avatar image ShayanMoradkhani Apr 17 '19 at 10:03 PM

hi, have you been able to simulate drilling the hole so far? I am trying to do the same thing. i have used decals to put an image of a hole, but didn't work. i have also tried destructive mesh, but that doesn't work either. procedural mesh only creates mesh and doesn't show material removal either. any suggestions? Shayan

avatar image IndieGameCove Apr 17 '19 at 11:15 PM

you could look into using voxels.

another option is using a depth mask here's a tutorial that I made on that. https://youtu.be/pws2ntTC0NM

then use world offset to control the depth of the hole.

the depth mask option doesn't effect collision so you need to get creative. so something like a trigger volume to turn off the collision with the floor when an actor is over the hole then have a moving platform under the hole.

also translucent materials are more expensive the opaque so i wouldn't try to apply it to an entire landscape. make a hill static mesh and blend that into the landscape then drill on top of it.

avatar image IndieGameCove Apr 17 '19 at 11:30 PM

a third way might be to use a render target to offset the mesh.

https://www.youtube.com/watch?v=1Z-V1Buk6z8 https://www.youtube.com/watch?v=67z5u8ZcEcw

avatar image ShayanMoradkhani Apr 19 '19 at 01:25 PM

thanks a lot for your suggestions.I tried to used render target to offset the mesh in the negative z, but there is a problem with that: I want to show material removal in run-time like this video: "https://www.youtube.com/watch?v=QL0dQ1sq9Ww" and so far I haven't been able to do that. I dont want to have landscapes, as I only have to simple geometries that one of them is a machining tool, and the other one is the part to be machined.

avatar image ShayanMoradkhani Apr 19 '19 at 02:03 PM

and if i can only fake material removal, it might be even better

avatar image IndieGameCove Apr 20 '19 at 08:08 AM

I don't understand what part of the render target method you're saying isn't working.

avatar image ShayanMoradkhani Apr 20 '19 at 08:19 AM

the link i sent as an example shows material removal in x,y,z direction. the render target seems to be only in z direction. and, in that tutorial, render target method was applied on a plane, and not on an object like a cube. or at least i dont know how to do that. render target method also pushes vertices in a direction, which is more of a deformation. I am given a static mesh component like a box, and i want to be able to show the machining process as well as final result like the attached figure.alt text

capture.jpg (19.8 kB)
avatar image ShayanMoradkhani Apr 20 '19 at 08:25 AM

it doesnt have to be that precise, but i want to show something is happening, maybe faking it with colors. i dont need percision for conical holes or sharp edges or any specific geometry. just a rough process

avatar image IndieGameCove Apr 20 '19 at 04:16 PM

you have to multiple the offset by the vertex normals rather than subtracting z https://youtu.be/enx6ShyKUL8?t=305

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question