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

  • Home
  • SEARCH
  • 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 8807535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:23:28+00:00 2026-06-14T02:23:28+00:00

I am fairly new to away3d. After putting together a basic scene with shaded

  • 0

I am fairly new to away3d. After putting together a basic scene with shaded objects, I was wondering why they don’t case shadows onto each other?

In my example there is a cube above a plane with a directional light above the both. How can I make the cube cast a shadow onto the plane under it?

The example is written using away 3d 3.6

package  {

import flash.display.MovieClip;
import flash.events.*;
import away3d.containers.View3D;
import away3d.primitives.Cube;
import away3d.primitives.Plane;
import away3d.lights.DirectionalLight3D;
import away3d.materials.PhongColorMaterial;
import away3d.materials.ColorMaterial;
import flash.geom.Vector3D;


public class Test7 extends MovieClip {

    public var view:View3D;
    public var light:DirectionalLight3D;

    public var cube:Cube;
    public var plane:Plane;     

    public function Test7() {
        // constructor code
        view = new View3D();
        view.x = 200;
        view.y = 200;
        view.z = 150;

        light = new DirectionalLight3D();
        light.direction = new Vector3D(0, -1, 0);
        light.brightness = 5;
        view.scene.addLight(light);

        plane = new Plane();
        plane.material = new PhongColorMaterial(0xCCCCCC);
        plane.width = 1000;
        plane.height = 1000;
        plane.segmentsH = 
        plane.segmentsW = 10;
        plane.y = -100;
        view.scene.addChild(plane);

        cube = new Cube();
        cube.rotationX = 45;
        cube.rotationY = 45;
        cube.segmentsD = 
        cube.segmentsH = 
        cube.segmentsW = 10;
        cube.material = new PhongColorMaterial(0x330099);
        view.scene.addChild(cube);

        addChild(view);
        addEventListener(Event.ENTER_FRAME, render);            
    }

    public function render(e:Event):void {
        view.render();
    }
}

}

  • 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-14T02:23:29+00:00Added an answer on June 14, 2026 at 2:23 am

    Calculation of shadows in real-time is too heavy for CPU so it require GPU (Away 3D 4.0+)
    You should bake shadows, diffuse lighting, global illumination, ambient occlusion, etc. to texture using graphical editor. That will give you static lighting with super high quality because pre-calculation of global illumination can take plenty of time instead of 1\30 second in rea time. To make scene more dynamic You can add environment cube map to the model or primitive lighting.

    Here is demo with precomputed shadows:
    http://alternativaplatform.com/ru/demos/temple/
    And this one with env map:
    http://alternativaplatform.com/swf/demos/mobilephone/mobilephone.swf

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

Sidebar

Related Questions

Fairly new to CodeIgniter, still grasping the MVC approach. I'm just wondering what's the
Fairly new to python, forgive me if this is a basic question about learning
Am fairly new to PHP and am making a basic CRUD style management system.
Fairly new to backbone, so this is a really basic question. I have a
I'm fairly new to the STL, so I was wondering whether there are any
Being fairly new to Grails i was wondering what people use to consume a
Im fairly new at programming and was wondering if the Jigloo gui builder plugin
Im fairly new to ASP.net (making basic applications for about 2 weeks), and im
Fairly new to programming. I just can't wrap my head around how to get
fairly new iPhone developer here. Building an app to send RS232 commands to a

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.