-
Posts
48 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Ghost
-
-
Hi. How can I make the material change only on one object? If I change the material through the code, then for some reason it changes on all the same models in the scene.
-
Can someone explain how to use the Rick's saveload.lua script? The video that was attached to the script is not available. I would like to figure out how to save and load progress.
Thanks.
-
Hmm. Fixed it. It turned out the problem was in the line Script.textColor = Vec4(255,255,255,255)
Changed to Script.textColor = Vec4(1,1,1,1)- 1
-
-
10 hours ago, havenphillip said:
You can try changing the bottom of the shader like this. This works in the material editor for me.
#if BFN_ENABLED==1
//Best-fit normals
fragData1 = texture(texture15,normalize(vec3(normal.x,-normal.y,normal.z)));
fragData1.a = fragData0.a;
#else
//Low-res normals
fragData1 = vec4(normalize(normal)*0.5+0.5,fragData0.a);
#endif
int materialflags=1;
if (ex_selectionstate>0.0) materialflags += 2;
fragData1.a = materialflags/255.0;float specular = color_specular.r * 0.299 + color_specular.g * 0.587 + color_specular.b * 0.114;
fragData2 = vec4(0.0,0.0,0.0,specular);
vec3 dissolve_col = vec3(0,1,0);
if (NoiseV<InvAlpha+0.03) fragData2 = vec4(dissolve_col,specular);}
Partially helped, thanks. Alternatively, I can include this material directly after the character's death.
- 2
-
On 2/22/2023 at 8:03 PM, Alienhead said:
Is that an animated mesh ?
Yes.
-
On 2/23/2023 at 12:44 AM, havenphillip said:
Is it red in the Material Editor? If so it could be your normals alpha channel.
Edit: I just saw the picture it looks like it is. The first thing I would do is check your fragData1 lines in the Fragment shader. They should look like:
//Normals Output
fragData1 = vec4(normalize(normal)*0.5+0.5,fragData0.a);
fragData1.a = 1/255.0;If I change the specular map to completely black, the red color disappears, but the character stops responding to the lighting.
-
On 2/23/2023 at 12:44 AM, havenphillip said:
Is it red in the Material Editor? If so it could be your normals alpha channel.
Edit: I just saw the picture it looks like it is. The first thing I would do is check your fragData1 lines in the Fragment shader. They should look like:
//Normals Output
fragData1 = vec4(normalize(normal)*0.5+0.5,fragData0.a);
fragData1.a = 1/255.0;It didn't help.
-
-
-
22 minutes ago, Josh said:
There's also the issue that if the files you are loading are packaged in an encrypted zip file, the engine won't be able to read the files. File reading is not supported because it would break the protection. You would need to keep those files in the game's folder, not in a zip file.
What should I do if I just want to read the files and not change them?
-
11 minutes ago, Josh said:
No, the Lua sandboxing makes it so Lua cannot read or write files.
Hmm, it's strange, but then why does the script of notes in the style of Amnesia work without problems?
-
4 minutes ago, Josh said:
You must disable Lua sandboxing, from C++, in order to use the Lua IO commands.
Maybe there is some kind of analog, how to do the same thing, but without Lua IO?
-
1 minute ago, Josh said:
Вы должны отключить Lua sandboxing из C ++, чтобы использовать команды ввода-вывода Lua.
It's disabled
-
local file1 = io.open(self.text_en, "r") for line in file1:lines() do table.insert (self.monolog_en, line); end file1:close()
During the test, everything works as it should, but after compilation, the map simply does not open and the game closes without any errors. Why is this happening, does anyone know?
-
Hi, what about similar shaders? Is it possible to adapt this?
-
1 hour ago, Josh said:
Found it here:
Yeah. I completely worked hard and forgot to write here about the release of the game.
- 1
-
I forgot to switch the language to English ☹️
- 1
-
-
CONCEALMENT
You receive a strange letter from your brother. He asks that you urgently come to an abandoned village where something strange is happening. Your goal is to find your brother and find out what caused the strange events.
Features:
- Open for research location - Go wherever you want, explore the territory to your heart's content.
- Interactive items - You can pick up and examine items.
- Non-linear plot - Change the plot with your actions.
- 11
-
Created a simple script to examinate items.
- 5
-
4 minutes ago, havenphillip said:
It's working for me. Did you add the vertex information in the vertex part of the shader?
My bad. Thank you!
- 1
-
Can you help me? Whats wrong this that shader? It's just a black screen:
//Fragment #version 400 //https://www.shadertoy.com/view/ldjGzV out vec4 fragData0; uniform float currenttime; float time = currenttime/1000; uniform vec2 buffersize; uniform sampler2D texture1; uniform bool isbackbuffer; float range = 0.05; float noiseQuality = 250.0; float noiseIntensity = 0.0088; float offsetIntensity = 0.02; float colorOffsetIntensity = 1.3; float rand(vec2 coord) { return fract(sin(dot(coord.xy ,vec2(12.9898,78.233))) * 43758.5453); } float verticalBar(float pos, float uvY, float offset) { float edge0 = (pos - range); float edge1 = (pos + range); float x = smoothstep(edge0, pos, uvY) * offset; x -= smoothstep(pos, edge1, uvY) * offset; return x; } void main(void) { vec2 uv = gl_FragCoord.xy / buffersize.xy; if (isbackbuffer) uv.y = 1.0 - uv.y; for (float i = 0.0; i < 0.71; i += 0.1313) { float d = mod(time * i, 1.7); float o = sin(1.0 - tan(time * 0.24 * i)); o *= offsetIntensity; uv.x += verticalBar(d, uv.y, o); } float uvY = uv.y; uvY *= noiseQuality; uvY = float(int(uvY)) * (1.0 / noiseQuality); float noise = rand(vec2(time * 0.00001, uvY)); uv.x += noise * noiseIntensity; vec2 offsetR = vec2(0.006 * sin(time), 0.0) * colorOffsetIntensity; vec2 offsetG = vec2(0.0073 * (cos(time * 0.97)), 0.0) * colorOffsetIntensity; float r = texture(texture1, uv + offsetR).r; float g = texture(texture1, uv + offsetG).g; float b = texture(texture1, uv).b; fragData0 = vec4(r, g, b, 1.0); }
-
Hello. I am not good at programming, so I wanted to ask how can I make items examination like in this video? I just want to pick up the item, rotate and put it in place.
Render an object on camera
in Programming
Posted
Is it possible to somehow render an object on a specific camera?