Questions tagged [shading]

Shading refers to depicting depth perception in 3D models or illustrations by varying levels of darkness.

Shading refers to depicting depth perception in 3D models or illustrations by varying levels of darkness. (source: Wikipedia).

119 questions
0
votes
1 answer

Shading the union of areas greater than 2 lines

Could you please help me shade the area highlighted as red below. Everything I have tried or read on this topic using "fill_between" will fill the area between the lines. However, this actually needs to shade the area greater than Y=X UNION'd with…
Fraf
  • 13
  • 2
0
votes
1 answer

How to calculate the normal vector of a vertex of a triangle given in a 3D plane

I don't have much knowledge in vectors so I want to know how to calculate the normal vector of point in a trainge.As an example,in triangle ABC, IF A ≡ (0,3,0), B ≡ (0,0,0) and C ≡ (4,0,0) how can I find the normal vector to ABC at point B? Can…
NishPre
  • 47
  • 6
0
votes
1 answer

Shading the area under a line with polygon() in R

I am trying to fill the area under a line using polygon(), but the area is filled above instead. I have been looking around for past similar questions but they either use solutions like predict, or dnorm, which do not seem to fit my case. This is my…
JustAGuy
  • 5
  • 1
0
votes
1 answer

Intersection detection with stencil buffer

In order to implement deferred lightning, I render light sources as a sphere with a radius of light. I rendered only actual positions of light to screen. The result is below. so I thought maybe if I can render the intersection of this spheres then…
aramok
  • 35
  • 1
  • 1
  • 6
0
votes
1 answer

Showing solid colors in 3D waterfall graph in Octave instead of just wires

I am trying to make waterfall graphs in the newest version of Octave that has a solid color under each trace (this might not be the best way to describe what I am trying to do, sorry if my vocabulary is not quite correct here). Basically I want the…
0
votes
1 answer

Godot android export looks way different than in the IDE

I am making a game for android using Godot. I have a scene that is completly dark(no light sources and a dark worldenvironment), in the IDE and on windows export it's pitch black darkness(as it is supposed to be) but on android every model is lit up…
0
votes
0 answers

Blender render FLIP Particles from fluid simulation

I want to shade and render the particles which are visible after baking the FLIP part of a fluid simulation. Does anyone know how to achieve this? Thanks in advance :) This is a screenshot of my current viewport:
Khamp3r
  • 25
  • 5
0
votes
1 answer

Smooth Shading in SceneKit

I'm currently working on an iPadOS app that uses SceneKit to render some 3D models, nothing too fancy but I hit a big of a snag when it comes to shading these models... Basically what I do is just set up a SceneKit scene (using pretty much all the…
Haiku Oezu
  • 897
  • 1
  • 8
  • 19
0
votes
1 answer

How do I get Maven to ignore local project for local repository version

I have a multi-module maven project where we shade Google's Guava to relocate the packages into our package tree so that we don't have to worry about version conflicts. I understand that this is a fairly common practice. Building the jar works fine…
0
votes
1 answer

How can i solve light reversed problem in ray tracing?

I'm making an image using python. But the Lambertian shading does not work. At first the image saved like this. enter image description here But when I reversed the normal vector of sphere, the image saved like this.enter image description here This…
niley
  • 1
  • 1
0
votes
1 answer

"Specular" color with phong shading and raytracing overflows

I implemented phong shading on my raytracer. Unfortunatelly I am receiving a segmentation fault when running it. The likely cause is related to the "specular_color" Vec3f variable (with is an object made of three floats). When I print its values, I…
user2752471
  • 444
  • 1
  • 6
  • 14
0
votes
1 answer

Shading with squared falloff always makes everything black

I have recently tried to change the current way I calculate diffuse lighting in my RayTracer. It used to be calculated like this: float lambert = (light_ray_dir * normal) * coef; red += lambert * current.color.red * mat.kd.red; green += lambert *…
user2752471
  • 444
  • 1
  • 6
  • 14
0
votes
0 answers

How to more realistically simulate light on a sphere?

I am attempting to simulate a sphere, and shade it realistically given an origin vector for the light, and the sphere being centered around the origin. Moreover, the light's vector is the normal vector on a larger invisible sphere at a chosen point.…
0
votes
0 answers

THREE.js - Cloned and rotated LOD objects - wrong shading

I have a txt. file exported from 3ds Max with name of objects, position, rotation and scale. Secondly I have a javascript initial list of this objects with paths on extern obj. and mtl. files. From initial list I create a LOD objects that are…
0
votes
1 answer

Float precision problem in metal shading language

I pass a float param with value 0.00291545 to fragment shader. But fragment function got n/a. swift code fragment shader In Xcode debugger's "Bound Resources" view, it shows that the value is 0.003 Bound Resources In Xcode shader debugger view, I…
blabla
  • 21
  • 5