Help How to make a phone wire - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Help How to make a phone wire (/thread-2706.html) |
How to make a phone wire - aliakbarm - 18-01-2021 I have no idea how to make a phone wire. I found a SpringRod scene and I hope I can make use of it but I really have no idea to make what I wanted. To be clear I want to make wire like this I want to increase the length and physics behavior just like a phone wire. I would be crazy to place the points to make spiral shape for a very long wire. Any help will be appreciated. Thanks! RE: How to make a phone wire - josemendez - 18-01-2021 Making the entire spiral shape using a rod sounds like overkill. Instead, just use a straight rope/rod and use a texture or a shader to draw the spiral. Here's a good tutorial on it, it's for Unreal but the principles are exactly the same in any engine: https://medium.com/xrlo-extended-reality-lowdown/how-to-create-a-coiled-cable-shader-in-ue4-8bb47777d8ab Obi would play the role of Unreal's builtin cable component. It's pretty straightforward unless you're not comfortable with shaders. Let me know if you need help with it. RE: How to make a phone wire - josemendez - 18-01-2021 Here you go. Find attached a Unity port of the above tutorial. Just use the CoiledWire shader in your rope (it's a surface shader, so will work in the built-in pipeline only), and add the CoiledWireController to it. Here's a video of the result: cheers! RE: How to make a phone wire - aliakbarm - 18-01-2021 (18-01-2021, 09:01 AM)josemendez Wrote: Making the entire spiral shape using a rod sounds like overkill.That looks cool! I will try your suggestion and come back here if i encountered any problems. Thanks! (18-01-2021, 10:09 AM)josemendez Wrote: Here you go. Find attached a Unity port of the above tutorial.Wow did you just make it? That's really cool! Thank you so much!! RE: How to make a phone wire - josemendez - 18-01-2021 No worries! Took about 20 minutes, so I figured out why not make it and save you the pain . Note you can change the amount of spirals in the wire by changing the "Spirals" slider in the material itself. This could also be added to the CoiledWireController component for convenience (to have both spiral count and thickness in the same place), I leave it as an exercise for you. let me know if you have any questions. cheers! RE: How to make a phone wire - yusufbesim - 26-01-2021 (18-01-2021, 10:20 AM)josemendez Wrote: No worries! Took about 20 minutes, so I figured out why not make it and save you the pain . Hello, is there URP version of this shader? Thank you RE: How to make a phone wire - josemendez - 27-01-2021 (26-01-2021, 09:25 PM)yusufbesim Wrote: Hello, is there URP version of this shader? Hi! Unfortunately not . URP is not compatible with surface shaders, and does not have anything equivalent to them afaik. If you have some experience with shaders it should be possible to translate this to a Shader Graph shader easily though. Here's a link to the tutorial I followed when writing the surface shader: https://medium.com/xrlo-extended-reality-lowdown/how-to-create-a-coiled-cable-shader-in-ue4-8bb47777d8ab You can also take a look at the surface shader source code for reference. cheers! RE: How to make a phone wire - G_Gawi - 05-02-2022 I've had my eye on this thread for a while, I'm currently making my first game in unity URP which features a telephone wire as well. It's only recently that I've started learning about shaders and challenged myself to recreate this shader both in shadergraph and coded manually. I've attached the hand made files for anyone who might want them. (dont forget to rename the .cs file to a .hlsl file) I haven't quite managed to recreate the "curving" effect described in the original blog post (so I didn't include it), but I might try again sometime in the future. (also trying to make them in shadergraph breaks shadows since shadergraph doesn't support multiple passes so I wouldn't recommend anyone else try) |