Interior Mapping - Shader Graph Basics - Episode 34
HTML-код
- Опубликовано: 11 сен 2024
- In this shader tutorial, I show how to create Interior Mapping - a way to make simple shapes appear to have interior details. This technique is popular for games because it gives the illusion that buildings that are made of simple flat polygons have complex interiors. This week, I show the core of the shader and next week, we'll expand it.
Here's last week's video that shows how to create Cube Maps:
• Creating Cubemaps - Sh...
Here's the playlist for the whole series:
• Shader Graph Basics
Learn more!
• Creating an Interior M...
• Spider-Man PS4 Interio...
• FAKE BUILDING INTERIOR...
Shader Book Recommendations
www.bencloward...
------------------------------
Theme Music
Peace in the Circuitry - Glitch Hop
teknoaxe.com/Li...
Background Music
Speo - The Little Things
• The Little Things
#UnrealEngine #shadergraph #Unity
I understand this whole video (and probably the next few) is only going to cover tangent-spaced interior mapping. Before you move on to another topic, please do not ignore object-spaced (or world-space) interior mapping which I want to learn as well. I really need interiors for sloped and curved buildings, as I commented a few days ago, the drawback to tangent-space interior mapping is unrealistically tilted rooms on sloped facades or distorted rooms on curved facades, which I do not want. I hope you understand my plight and I trust that you will soon cover object-spaced interior mapping.
For some reason, I cannot attach a link to show you what I am talking about.
I do not want to repeat again, thank you.
I have a technique for object space interior mapping working. I can share that in a later video.
@@BenCloward Thank you so much for replying. I am looking forward to it. 👍
This is black magic to me. amazing!
This was a great explanation. At the start of the day I didn't really have much of an idea of how to achieve this effect but after setting this up and playing around I can already see how to add more parallaxing layers etc. Excellent job!
That's a very smart way of getting that fake interior! Didn't know about this solution :)
I was planning a video on the same topic for the future too, as an excuse to explain better raycasting and other things. Keep it up, you're doing a great job!
Thanks! That means a lot coming from you!
Freaking cool man, thanks for doing it on both engines :D
God bless you, Ben Cloward.
Gil Damoiseaux made a version of interior mapping where he uses a 2D mask to project a shadow inside the room.
Later he added options for different room sizes and even point lights inside the rooms.
Have you guys looked into the Matrix interior mapping? Quite impressive how they are faking 3D in the interior. Any thoughts on breaking that down?
Great channel and recommend it all the time....
I need help...
I followed your tutorial in Unity, but I'm getting a weird warping effect, It looks perfect in parallel camera view, but not working correctly in perspective camera view, and I also spotted a warping effect in your video at 12:24 where you moved the preview window, the top side of the cube where the texture is green, it seems to be wrong.
( sorry for my bad English )
Thank you!
thanks, really grate tutorial
Hi, Can you show us how to improve interior mapping with adding second layer ? (Curtains, Decorations etc) PS you are awesome!!
Thanks for the suggestion!
This was so helpful!! Thanks so much
Love it! Thanks Ben, I'm looking forward to more on this subject :)
amazing
I would be also interessted in how to spread a single cube map over several instances. A building is built of several instances and rooms do have more than one window and is spreading over several instances. How to accomplish this? Maybe custom data and manipulating the UVs?
hey Ben, just wanted to say, huge thanks for sharing knowledge with such a precision. if you could create same shader via nodeToy or threejs that would be super awesome, cheers,
Amazing tutorial, very well explained
thank you so much with your share. it so useful. but i dont understand why you divide camera vecto by 1and after that
why you multiple this result with UV Coordinate operation for which purpose , please explain help me. thank you ^^
what about paralax interiors mapping from "matrix ue5 demo"? there are implemented 3d objects inside the maps, for example tables and chairs
I'd love to know more about this too. Hopefully they'll being the project to the launcher when UE5 fully releases so we can pull it all apart!
I guess we'll have to wait until they release the project files :P
The Matrix demo appears to use this technique, combined with creative parallax occlusion mapping. You can see typical artifacts of POM on certain objects such as layer slices, and also dithering between multiple sample frequencies which causes the blurriness artifact but makes the layers less obvious.
@@TechArtAlex it's the POM I want to know about, I've no idea how you'd get it to work with a cubemap! I'd heard it was a form of volumetric raymarching which suggests they're using some kind of volume texture rather than a simple heightmap. Maybe a cubemap with a corresponding volume texture?
I didn't see the matrix demo, but, around a year ago I think, in the studio where I work, I made a fake interior where you can actually place meshes inside the fake room :)
I'll make a video about that sooner or later (a very long and complex one xD)
Great effect! I don't understand how the projection really works though
Hi Ben, and thanks for an amazing tutorial, as always! :)
I had a question though about the view vector transformation part: if I understand properly, the point is to do a raycast from the camera onto the surface, so as to get the intersection with the three possibles sides of the room to render, and then check which one is closer to render the right one. So I've seen the technique you show used in various places on the net (either in code or in graphs), but I can't understand how computing this reciprocal vector, then taking the absolute value etc gives us the raycast result... could you please shine some light on this part?
Thanks in advance, and again thanks for all your great videos on shaders :D
Cheers!
Great video Ben! I've been learning a lot from you
Could you explain the benefits of using this technique over using actual geometry to build the interiors?
I always thought this technique was more kind of a "shortcut" to make the life of artists easier, better than spent a lot of time populating the buildings interiors with a bunch of textured boxes, but does it has any performance benefit too?
Yes, this technique provides a significant performance benefit over building cube interiors for all of your windows. First, you don't have to use a transparent material on your windows - so the windows can be the same opaque material as the rest of the building. Transparent materials are more expensive that opaque materials, and not needing them saves you a draw call. Plus the interior cubes would be an additional draw call and at least 10 triangles per window. That can really add up on a sky scraper with hundreds of windows.
@@BenCloward Does Nanite help with this issue on the Drawcall? Or the transparency still remains heavy?
Is is possible to apply this interior mapping to shapes other than cubes? Like If I was to represent the interior of a sphere? Or a portion of a sphere? I'm trying to show a fair depiction of an Iris being refracted behind a cornea with the Iris itself appearing under the surface and also concave, rather than sitting on the surface. I borrowed an example from the Refractive Ice tutorial where you can reflect the view direction and push the texture under the surface, but I can't really make it look properly concave. Wondering if this approach would better help me instead? Great content as always Ben, thanks!
Thanks for the video. I noticed in cyberpunk 2077, the interiors of buildings have light that go off and on. Would they be using a cube map for these interiors? If not, how do you think they achieved these interiors?
hi! very like your videos. i'm newer to shader program, by follow your videos i can achieve the same result in unity but i still didn't understand the math behind, is there any related reference can explains this formula?
Don't know if you know but Unreal has a material function for this, including what you mentioned for next video
Yes, I'm aware. As I explained in the series on triplanar projection, I like to show people what's going on inside those material functions. There are several reasons for that. It's much better to understand something yourself rather than just reply on the work someone else has done. Sometimes the built-in functions don't do exactly what you want, so it's helpful to understand them so you can make modifications. And sometimes they do things in less effective ways (as was the case with triplanar normal projection). My plan is to expand on what's done in the built-in function so you'll be able to make improvements to it if you want.
@@BenCloward ah I see thank you for that then. Think you can do spline thicken mat function unreal has at some point? I have tried disecting it a few times before but still don't get the math.
Ben, great tutorial. Can you share the shader graph file? I followed your explination node by node identically, but my output results look completely different and I've scrubbed the shader graph portion over a dozen times, nothing is different but the end appearance is completely wrong in comparison. It would be helpful if all your nodes weren't collapsed so I could see what it should look like at those steps.
Can you talk about the Transformation Matrix node in Unity? Many thanks
Impressive! I have to say though, can you not just use a cube with flipped normals?
You can, but using that method would be a lot more work and would probably be more expensive to draw.
Why no Amplify shader?
Probably cause it's not free
Amplify is very similar to what I'm already showing. You should be able to apply the principles I'm sharing in that tool as well. My point isn't to show how to use a specific tool. It's to show the math - which can then be done in any tool. That's why I'm doing it in both Unreal and Unity.
@@BenCloward yep got it.. I was just curious..
Although this tutorial is amazing, I've just found out Unreal Engine 5 already has this feature in the form of the "Interior Cubemap" node.
Yes, you are correct! I have done several tutorials that go over techniques that are already encapsulated in an Unreal node already. The advantage of knowing how the internals of the built-in node work are that you can improve on it and fix issues with it instead of just relying on the built-in version. You can customize it to your own needs.
just look the shadow of spyderman on the glass 😂
I guess there is inbuilt fake interior mapping node inside recent UE 4 and 5 versions. we dont need too many nodes and operations to achieve that.
There is, but there were some things about it that don't work very well - like the randomization feature - so I decided to make my own and explain how it works do everyone will understand it better. I hope that's more helpful than just plopping down the pre-built node.
hi ben tnx for this amazing videos im realy new to this stuff and your videos is a big help for me but i have a question about how to creat this kind of effect
m.ruclips.net/video/pmdRLyjxZ-A/видео.html&feature=emb_logo
can you guide me to analyze this effect for weapon scop shader how should i know the analyze effect and recreate everything i see ,im really intrested and want to be pro at shader creation
tnx again god bless you