Questions tagged [materials]

A definition of physical and/or visual characteristics of a surface, often for use with rendering software or a game engine.

Filter by
Sorted by
Tagged with
33 votes
4 answers
23k views

Difference between Material and Shader

In games, materials often only influence the visual appearance of objects. The visual appearance is effected by shaders. So regarding to terminology is there a difference between materials and shaders?...
danijar's user avatar
  • 5,731
11 votes
1 answer
4k views

In a graph-based material system, how can I support a variety of input and output types?

I'm trying to wrap my head around how material systems like this, this are implemented. These powerful and user-friendly, graph-like systems seem to be relatively common as a method of allowing ...
MrKatSwordfish's user avatar
9 votes
5 answers
45k views

Tiling of a material, independent of its size

I am using Textures and Materials to tile my sprites, for instance when building a wall in my game. The problem with this is that everytime I resize the plane or size of my game object, I have to ...
Enrique Moreno Tent's user avatar
8 votes
1 answer
5k views

Where can I get a list or data base of light reflectance values for different materials?

I'm implementing lighting for a WebGL app but I'm not an artist so I don't know how to generate or where to obtain a list of materials with its values (diffuse, specular, ambient and shininess). I've ...
mikidelux's user avatar
  • 304
6 votes
2 answers
178 views

Shading Languages vs Materials in 3D editors

There are many 3d packages which are able to construct materials. Autodesk Maya, 3ds max, Houdini, etc. There are languages which are able to construct materials as well, like GLSL and Cg. How does ...
user2136963's user avatar
6 votes
2 answers
2k views

Detecting Light Intensity Around Characters

Later Edit Since there seemed to be a bit of confusion: I am asking this for purely didactic reasons, I'm not searching for the most efficient solution. Reformulated question: I'm working under Unity,...
user avatar
6 votes
2 answers
2k views

How to render glass with XNA or DirectX 9

Any good pointers on how to get the refractive look of glass? I'm looking to create a think piece of glass type of look, sort of the type that you'd have on bathroom shower doors.
Rhubarb's user avatar
  • 233
6 votes
2 answers
8k views

Unity - Water Cube (to 2D game)

I wonder if you can create a cube of water within the unity! I'm starting to use the Unity, and took a sought as to whether there was already something like this ... but have not found any tutorial ...
Igor's user avatar
  • 219
5 votes
1 answer
2k views

Can instantiated objects have different material/texture?

While I have some experience with simple 2D games, I am new to more process-demanding 3D games. One basic question that has been concerning me recently and for which I am having difficulties to find a ...
Bennton's user avatar
  • 365
5 votes
3 answers
3k views

How to create a material with variable color

I'm new to Unity and trying to create a Carrom game. Since all the White and Black pieces, Queen basically have the same material and physical properties and texture except for their color, I'm trying ...
dotNET's user avatar
  • 155
5 votes
4 answers
17k views

Why do I get a blank material in Unreal Engine 4?

When I'm adding a material to a box in UE4, the material loses its textures. I want to add this material To this After I'm trying to drag & drop the material into the scene above (like in UDK) ...
balintpekker's user avatar
5 votes
1 answer
2k views

Material, Pass, Technique and shaders

I'm trying to make a clean and advanced Material class for the rendering of my game, here is my architecture: ...
Papi75's user avatar
  • 103
5 votes
2 answers
4k views

(Unity) Is there a way to automatically create a material for each texture and assign the texture to it?

I have imported hundreds of textures in my Unity project, and I'd like to create a material for each of them. This would obviously take a lot of time, so how would I go about doing this automatically? ...
HTML_Earth's user avatar
5 votes
1 answer
1k views

Importing materials from blender to UE4

So my problem is that I have a nice green glass material in blender which I imported to UE4 (4.8.1) but in the editor the material was just a simple green colour. I have no idea what I should do to ...
nanoo9999's user avatar
5 votes
0 answers
425 views

Sprite outline based on light position in UE4

I have simple sprite (for example black box) and I like to add to it outline (red line on example image) but based on light direction. I know UE4 use deffered renderer, so I cant access to lights, but ...
Martin's user avatar
  • 151
4 votes
1 answer
2k views

Rendering different materials in a voxel terrain

Each voxel datapoint in my terrain model is made up of two properties: density and material type. Each is stored as an unsigned integer value (but the density is interpreted as a decimal value ...
jmegaffin's user avatar
  • 4,923
4 votes
6 answers
21k views

Why are all materials pink in my Unity URP project?

Version: Unity 2020.2.0f1 I started my project with Universal Render Pipeline template but I don't know why all materials are pink. I even tried to upgrading but nothing happened. This error was ...
Hyper's user avatar
  • 41
4 votes
1 answer
940 views

Unwanted highlight on far side of objects near the edges of the screen when using orthographic camera

I was creating a simple unity game with a sphere as a ball. The problem is that the ball face towards the camera origin renders material correctly but the one away from camera does not. The ball has ...
Ikun's user avatar
  • 163
4 votes
1 answer
10k views

Adding materials to a Line Renderer through code?

I have a material that I am using to add a glowing effect to my line renderer. I can add this as a 2nd material to the line to give it a glowing effect. I want to be able to add/remove this material ...
Douglas Gaskell's user avatar
4 votes
1 answer
3k views

Material System

I'm designing Material/Shader System (target API DX10+ and may be OpenGL3+, now only DX10). I know, there was a lot of topics about this, but i can't find what i need. I don't want to do some kind of ...
Towelie's user avatar
  • 91
3 votes
3 answers
9k views

How to Convert Sprite into Texture

I Have image with a sprite and i want to change this image sprite to Texture so that I can assign it to the material And i don't want to keep multiple copies for each image as a sprite and texture. ...
Swati's user avatar
  • 1,147
3 votes
2 answers
1k views

Using different shaders based on desktop or mobile?

Most of my assets use the Unity standard shader. It looks and runs fine on Desktop, but on mobile the performance isn't good. I assume the solution is to switch to one of the mobile friendly vertex-...
Andrio's user avatar
  • 221
3 votes
1 answer
124 views

Make a plane to display material from both sides

I know there is a setting in Cry Engine, which allows you to be able to read materials of the plane from both sides, so I am wondering if there is such a setting in Unity5. Thanks in advance
A.D.'s user avatar
  • 175
3 votes
2 answers
38k views

How do I change the material of an object with Script in Unity?

I was making a game with Unity and I want to change an object's material using UnityScript when the player collects 5 collectables that I made. The collectables get stored in an int variable called ...
ElPolloLoco999's user avatar
3 votes
1 answer
541 views

Is there a material format for OpenCTM files?

I consider using OpenCTM files for my game. Since the format only claims to store raw mesh data, my question is if there is a associated file format for material data and paths to texture maps. For ...
danijar's user avatar
  • 5,731
3 votes
1 answer
2k views

How can I make Iridescence material In unity?

One of the characters of the Dota2 that Is called Nyx Assassin has an interesting material effect If you look at the body and feet you can see this effect.It looks like poily/polluted water.I like to ...
Seyed Morteza Kamali's user avatar
3 votes
1 answer
493 views

UE4 How to Avoid Boundary Seams with Multiple Refractive Meshes

We use multiple box meshes to create our game world in Unreal Engine 4, but we also use those boxes with translucent/sss materials with refraction. The problem is there are seams between those boxes ...
sirjofri's user avatar
  • 131
3 votes
1 answer
821 views

Show Unity Line Renderer as 3d cable or wire

I am dynamically making a line renderer which is pull by the character to show that a character is pulling a wire. The line renderer working fine but unfortunately its display is not according to my ...
Muhammad Faizan Khan's user avatar
3 votes
1 answer
803 views

Applying different materials to an object

I'm currently implementing an Object Loader for the Wavefront File Format (*.obj). When exporting a model (with associated materials) from blender, a material for a ...
ConfusedProgrammer's user avatar
3 votes
1 answer
423 views

Dynamically applied texture to GameObject using GUI button [closed]

In a scene I have multiple different GameObjects (almost 30 kinds) with parent child relationships. At run time (by using a GUI button) I want to change the texture of each clicked GameObject. As the ...
Muhammad Faizan Khan's user avatar
2 votes
1 answer
2k views

Unity: How do I only show parts of objects that overlap [2D]

I'm working on a 2D Unity project where the player can only see objects in their field of view. I have successfully created a mesh that overlaps anything that would be in the player's field of view, ...
blinkafrootable's user avatar
2 votes
1 answer
3k views

How to find a material through a raycast in Unity 5?

I have an empty object with a script on it and I want to be able to move the empty over other objects and then have it print out the name of the material for the triangle that it's hovering above. (...
mr-matt's user avatar
  • 2,759
2 votes
2 answers
110 views

How do materials and shaders work in graphics programming?

I stumbled upon a few videos about shaders and materials from The Cherno and my understanding is that materials are this sort of input that a shader takes to calculate an output instead of hard coding ...
Konjointed's user avatar
2 votes
1 answer
4k views

Change color, or material of specific line segments on Line Renderer

We're making a game that plays with a LineRenderer, and we want to give it a different visual feedback relative to the side of the screen that it's on. We want to change the feedback of the specific ...
LifGwaethrakindo's user avatar
2 votes
1 answer
5k views

How can I update my materials to work with LWRP?

I'm using Unity 2019.1.6f1. When I open a new scene with the LWRP template project, I see errors from all materials in the scene. For example, the Jigsaw appears in my scene but in console window I ...
user43474's user avatar
  • 537
2 votes
3 answers
8k views

Can't change materials of model from FBX

I was used 5.x before, and that version when I loaded FBX, Unity generated each material automatically, so I can change them like assigning textures or change shader. And now I switched to 2017.3, ...
modernator's user avatar
  • 1,213
2 votes
1 answer
778 views

How do I apply a texture over a material in OpenGL ES?

How can I apply a texture over a material? I've set up an object with the following material: ...
DAN's user avatar
  • 337
2 votes
1 answer
3k views

Applying texture maps from Blender to Unity material properties

When I bring my Blender file into Unity, I will attach the texture maps from my Blender material (left) to the Unity material (right) as follows: diffuse/color map --> albedo normal --> ...
andio's user avatar
  • 165
2 votes
1 answer
217 views

How to add material to a blueprint created?

My project has a cube and a capsule. Below you can see an inserted cube of the modes tab. Beside a capsule inserted from a blueprint created by me: I can drag the material I created and use it in ...
Boneco Sinforoso's user avatar
2 votes
1 answer
3k views

How to get color or value from material with shader?

I have a sphere with a shader with colors for specific heights and I want to get the value at the cursor(height) or color of the point the cursor is on when clicked. Is there a good way to get this ...
Earthmonkey0's user avatar
2 votes
1 answer
2k views

OBJ file, face materials and drawing them with OpenGL

I'm implementing a model class which loads OBJ and MTL files, and ran into an issue or question with face materials. Consider the following example: It's a cube with 5 sides Gray and 1 side Green. <...
Ray's user avatar
  • 621
2 votes
2 answers
621 views

Materials and Mesh association

I'm trying to implement a Material system in a small engine for training and I've got questions about materials. Currently I've got that: Material: A Material with array of Technique Technique: ...
user41765's user avatar
2 votes
1 answer
789 views

Distortion of color space in UDK (material editor)

Question Using UDK's material editor, I wish to use a texture as a two-dimensional array of values for mathematical computations (basically, the color components of each pixel in the texture alter ...
Suzanne Soy's user avatar
2 votes
1 answer
2k views

How do I create a manual object with colors for each vertex?

How do I create a shaded manual object with colours for each vertex? Eg if ogreObj is the Ogre::ManualObject : ...
UberLambda's user avatar
2 votes
0 answers
95 views

Materials become greyscale when building Windows executable from Linux machine

I have a whole build pipeline on a digitalocean Linux machine that does my builds for my game. I recently upgraded the entire project from some 2020 build to Unity 2021.3.8f1. The problem is, now, the ...
Thoumis Tiechy's user avatar
2 votes
0 answers
579 views

Unity - Emission Material on Top of UI

I've already uploaded this question in the Unity forums but only got a response but not an answer or solution. Here's a link to the original post: https://forum.unity.com/threads/emission-material-on-...
Dark Kool's user avatar
2 votes
1 answer
2k views

How do I add materials to a glTF model in Godot Engine?

I'm using glTF Embedded files because I was told they are the best files to use with Godot, so I got a pack of a bunch of really lovely trees and other things to use in my game. But when I import it, ...
Phoenix's user avatar
  • 19
2 votes
0 answers
704 views

Unity normal maps look wrong (URP, iOS)

We're building an AR-enabled app with Vuforia and Unity 2019.3, using the Universal Render Pipeline. Trouble is, on iOS our models that have normal maps in their materials look totally bad, as you ...
frankhermes's user avatar
2 votes
1 answer
408 views

Blender to Unreal Material workflow....?

I'm new to game development and the Unreal Engine and I have a general question. I model my objects in Blender and import them into Unreal Engine. My question is, is it better to create and apply ...
Droidian's user avatar
2 votes
0 answers
972 views

Creating Saving and Loading Materials in Runtime

I'm trying to create a material during runtime like this: In my Assets I have a Render Texture and one Material I created an Script where I attach the Render Texture to Material I save in my project ...
RoyalCoder's user avatar

1
2 3 4 5