Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8655451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:01:48+00:00 2026-06-12T15:01:48+00:00

Lets assume your eye is in the surface point P1 on an object A

  • 0

Lets assume your eye is in the surface point P1 on an object A and there is a target object B and there is a point-light source behind object B.

Question: am i right if i look to the light source and say "i am in a shadow" if i cannot see the light because of object B ?. Then i flag that point of object A as "one of the shadow points of B on A" .

enter image description here

If this is true, then can we build a "shadow geometry"(black-colored) object on the surface of A then change it constantly because of motion of light,B,A, etc… in realtime ? Lets say a sphere(A) has 1000 vertices and other sphere (B)has 1000 vertices too, so does this mean 1 milion comparations? (is shadowing, O(N^2) (time) complexity?). I am not sure about the complexity becuse the changing the P1(eye) also changes the seen point of B (between P1 and light source point). What about the second-order shadows and higher (such as lights being reflecting between two objects many times) ?

I am using java-3D now but it doesnt have shadow capabilities so i think of moving to other java-compatible libraries.

Thanks.

Edit: i need to disable the "camera" when moving the camera to build that shadow. How can i do this? Does this decrease the performance badly?

New idea: java3D has built-in collision detection. I will create lines(invisible) from light to target polygon-vertex then check for a collision from another object. If collision occurs, add that vertex corrd. to the shadow list but this would work only for point-lights 🙁 .

Anyone who supplys with a real shade library for java3d, will be much helpful.

Very small sample Geomlib shadow/raytracing in java3D would be the best
Ray-tracing example maybe?

I know this is a little hard but could have been tried by at least a hundred people.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:01:49+00:00Added an answer on June 12, 2026 at 3:01 pm

    Your approach can be summarised like this:

    foreach (point p to be shaded) {
        foreach (light) {
            if (light is visible from p)
                // p is lit by that light
            else
                // p is in shadow
        }
    }
    

    The funny fact is that’s how real-time shadows are done today on the GPU.

    However it’s not trivial for this to work efficiently. Rendering the scene is a streamlined process, triangle-by-triangle. It would be very cumbersome if for every single point (pixel, fragment) in every single triangle you’d need to consider all other triangles in other to check for ray intersection.

    So how to do that efficiently? Answer: Reverse the process.

    There’s a lot fewer lights than pixels on the scene, usually. Let’s take advantage of this fact and do some preprocessing:

    // preprocess
    foreach (light) {
        // find all pixels p on the scene reachable from the light
    }
    // then render the whole scene...
    foreach (point p to be shaded) {
        foreach (light) {
            // simply look up into what was calculated before...
            if (p is visible by the light)
                // p is lit
            else
                // p is in shadow
        }
     }
    

    That seems a lot faster… But two problems remain:

    1. how to find all pixels visible by the light?
    2. how to make them accessible quickly for lookup during rendering?

    There’s the tricky part:

    • In order to find all points visible by a light, place a camera there and render the whole scene! Depth test will reject the invisible points.
    • To make this result accessible later, save it as a texture and use that texture for lookup during the actual rendering stage.

    This technique is called Shadow Mapping, and the texture with pixels visible from a light is called a Shadow Map. For a more detailed explanation, see for example the Wikipedia article.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets assume I've got an authorization token from user, that I will use later
Lets assume I have several <span class='remove-type'> elements on a page. In jQuery document.ready
Lets assume that we have PyV8: import PyV8 ctxt = PyV8.JSContext() and a python
Lets assume I have 2 XML variables in SQL Server 2008 with the following
Lets assume a scenario that i have a remote, a developer1 and a developer2.
Lets assume a simple Spring MVC Controller that receives the ID of a domain
Lets assume: Network has_many Channels Network has_many Nicknames Channel has_many Messages Channel belongs_to Network
Lets assume I have the following 3 entities: Customer,Order,Product which interact in the View
Lets assume following classes definition: public class A { public final static String SOME_VALUE;
Lets assume we have a class car. How would You name parameters of function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.