instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 17, 2018, 08:22:17 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: DirectionalLight vs. PointLight behavio[u]r  (Read 2270 times)
drbitboy
Newbie
*
Posts: 4


View Profile
« on: October 16, 2013, 03:01:22 am »

Background
=========

I have attached three files:  two main WRL files (Carcich_flyby*.wrl) that are nearly identical, and should be functionally identical, and a third file (flyby_externproto.wrl) that contains an EXTERNPROTO used by the other two.  These files are also available here:

  https://github.com/drbitboy/PlanetaryVRMLs/tree/master/HartleyFlyby

The EXTERNPROTO contains geometry and Interpolators for the Deep Impact flyby of comet 103P/Hartley 2.  The main WRLs contain the elements and behavior of the scene, in two main Transforms (scopes):

1) Transform { a ViewPoint (camera) fixed with respect to two drawn fields of view in the center, a rectangle with a TouchSensor on the right, and a Billboard with text on the left };

2) DEF TARGETS Transform { a Sphere with a time representing the comet with cylinders indicating the X, Y and Z axes plus the directions to the Sun and to Earth, and a DirectionalLight or PointLight }.

The EXTERNPROTO interpolates based on its input, which is either

A) the .fraction_changed output of a TimeSensor, which is started by clicking on anything in DEF TARGETS Transform e.g. the Sphere, or

B) the .slideOut output of the Script, which is a conversion of an input to the Script fed by the output of a TouchSensor i.e. .hitPoint_changed representing the cursor position vertically over the gold rectangle on the right.  Note that placing the cursor over that gold rectangle will also stop the TimeSensor if the timer .isActive.

The scene with DirectionalLight was my original version; I switched to PointLight to deal with anomilies with the InstantReality viewer, described below.  The Cortona viewer displays both scenes correctly.


The Problem
=========

My query is why InstantReality displays Carcich_flyby_instantreality.wrl correctly, and handles the mouse behavior correctly, but fails to do so for Carcich_flyby.wrl.  The former uses a PointLight node, and the latter uses a DirectionalLight node.  Both lighting nodes are inside a Transform node and should follow that Transform's rotation.  The anomalies are:

i) there is no response to the cursor being over the gold rectangle and TouchSensor on the right, i.e. it neither stops the timer nor shows any indication that output .slideOut is effective;

ii) clicking anywhere on the window starts the TimeSensor, when it should only be items clicked in the DEF TARGETS Transform that start the TimeSensor;

iii) the Sphere and other objects in the DEF TARGETS Transform do not display correctly but are mostly hidden except for a brief moment during the animation when the spacecraft (Viewpoint) is nearest the comet (Sphere).

iv) The DirectionalLight comes from the top, while the EXTERNPROTO and associated ROUTEs should be lighting the comet from the bottom.

It is as if the DirectionalLight covers the entire scene and intercepts all mouse/cursor events, preventing the cursor position from registering on the gold rectangle TouchSensor.

Thanks.

Brian Carcich
Logged
drbitboy
Newbie
*
Posts: 4


View Profile
« Reply #1 on: October 17, 2013, 06:10:42 am »

Spent all day, built openvrml but couldn't get it configured right.

FreeWRL works correctly on both files.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines