<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body dir="ltr" fpstyle="1" ocsi="0">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Gerald,</p>
<p><br>
</p>
<p>thanks for your reply.</p>
<p><br>
</p>
<p>Everything is fine now!!</p>
<p><br>
</p>
<p>Best regards,</p>
<p>Carsten<br>
</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p><span style="font-size:12px; font-weight:normal; text-transform:none"><font color="black"></font></span></p>
<font color="black">
<div>---<br class="">
<font color="black"></font><font color="black">
<div style="margin:0"><font style="font-family:Times New Roman,serif,serif,"EmojiFont"" size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font style="font-family:Tahoma,sans-serif,serif,"EmojiFont"" size="2" face="Tahoma,sans-serif" color="#5A5A5A"><span style="font-size:10pt" lang="en-US">
<div><font style="font-family:Times New Roman,serif,serif,"EmojiFont"" size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font style="font-family:Tahoma,sans-serif,serif,"EmojiFont"" size="2" face="Tahoma,sans-serif" color="#5A5A5A"><span style="font-size:10pt" lang="en-US"></span></font></span></font><br>
<font style="font-family:Times New Roman,serif,serif,"EmojiFont"" size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font style="font-family:Tahoma,sans-serif,serif,"EmojiFont"" size="2" face="Tahoma,sans-serif" color="#5A5A5A"><span style="font-size:10pt" lang="en-US"></span></font></span></font></div>
</span></font></span></font></div>
</font><span style="font-size:9pt">Carsten Oldenburg, M.Sc.</span></div>
<div style="margin:0">
<div style="text-indent:0; white-space:normal"><span style="font-size:9pt"></span><span style="font-size:9pt"></span>
<div><span style="font-size:9pt"><br>
</span></div>
<div><span style="font-size:9pt"><font color="black"><span style="font-size:9pt"><font color="black">
<div style="text-indent:0; white-space:normal"><span style="font-size:9pt"></span><a href="mailto:carsten.oldenburg@th-owl.de" class="OWAAutoLink" id="LPNoLP"><span style="font-size:9pt">carsten.oldenburg@th-owl.de</span></a></div>
</font></span></font></span></div>
</div>
<div style="text-indent:0; white-space:normal"><span style="font-size:9pt"><br>
</span></div>
<div style="text-indent:0; white-space:normal"><span style="font-size:9pt"><font color="black"><font color="black">
<div style="margin:0"><font style="font-family:Times New Roman,serif,serif,"EmojiFont"" size="3" face="Times New Roman,serif"><span style="font-size:12pt"><font style="font-family:Tahoma,sans-serif,serif,"EmojiFont"" size="2" face="Tahoma,sans-serif" color="#DC131D"><span style="font-size:10pt" lang="en-US">Technische
Hochschule Ostwestfalen-Lippe</span></font><font style="font-family:Tahoma,sans-serif,serif,"EmojiFont"" size="2" face="Tahoma,sans-serif"><span style="font-size:10pt" lang="en-US"> </span></font><font style="font-family:Tahoma,sans-serif,serif,"EmojiFont"" size="2" face="Tahoma,sans-serif" color="#5A5A5A"><span style="font-size:10pt" lang="en-US">|
University of Applied Sciences & Arts</span></font></span></font></div>
</font></font>Detmolder Schule für Architektur, Innenarchitektur und Stadtplanung</span>
<div><span style="font-size:9pt"><font color="black"></font><br>
</span></div>
<div><span style="font-size:9pt">LivingLab Essigfabrik</span></div>
<div><span style="font-size:9pt"></span><span style="font-size:9pt">Siegburger Straße 110, 50679 Köln</span></div>
<div><a href="mailto:livinglab-essigfabrik@th-owl.de" class="OWAAutoLink" id="LPNoLP"><span style="font-size:9pt">livinglab-essigfabrik@th-owl.de</span></a></div>
<div><span style="font-size:9pt"><a href="https://livinglab-essigfabrik.eu" class="OWAAutoLink" id="LPNoLP">https://livinglab-essigfabrik.eu</a></span><br>
</div>
<span style="font-size:9pt"></span></div>
<span style="font-size:9pt"></span>
<div style="text-indent:0; white-space:normal"><br>
<span style="font-size:9pt"></span></div>
<span style="font-size:9pt"></span>
<div style="text-indent:0; white-space:normal"><span style="font-size:9pt"></span></div>
<font color="black">
<div style="font-style:normal; font-weight:normal; color:rgb(0,0,0)"><span style="font-size:9pt">Forschungsschwerpunkt ’nextPlace’</span><br class="">
<span style="font-size:9pt">Emilienstraße 45, 32756 Detmold</span></div>
</font>
<div style="text-indent:0; white-space:normal"><span style="font-size:9pt">+49(0)5231-769 6032</span></div>
<span style="font-size:9pt"></span><span style="font-size:9pt"></span>
<div style="text-indent:0; white-space:normal"><a href="http://www.nextplacelab.de" target="_blank" rel="noopener noreferrer" id="LPNoLP"><span style="font-size:9pt">http://www.nextplacelab.de</span></a></div>
<span style="font-size:9pt"></span></div>
</font>
<p></p>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Gerald Choqueux <Gerald.Choqueux@ign.fr><br>
<b>Gesendet:</b> Montag, 22. Juni 2020 11:32:13<br>
<b>An:</b> Carsten Oldenburg; itowns-user@lists.osgeo.org<br>
<b>Betreff:</b> RE:Shadows in iTowns</font>
<div> </div>
</div>
<div>
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hello</div>
<div><br>
</div>
<div>you need to enable renderer shadow map</div>
<div><font face="Courier New"><br>
</font></div>
<div><font face="Courier New">view.mainLoop.gfxEngine.renderer.shadowMap.enabled = true;<br>
view.mainLoop.gfxEngine.renderer.shadowMap.type = itowns.THREE.PCFShadowMap;</font><br>
</div>
<div><br>
</div>
<div>and move the light over the objects</div>
<div><font face="Courier New"><br>
</font></div>
<div><font face="Courier New">var cP = view.controls.getLookAtCoordinate();<br>
cP.altitude += 100;<br>
sun.position.copy(cP.as(view.referenceCrs));</font></div>
<div><br>
</div>
<div>Beware the itowns ground doesn't handle shadows yet.</div>
<div><br>
</div>
<div>best regards <br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF257235" style="direction: ltr;"><font size="2" face="Tahoma" color="#000000"><b>De :</b> ITowns-user [itowns-user-bounces@lists.osgeo.org] de la part de Carsten Oldenburg [carsten.oldenburg@th-owl.de]<br>
<b>Envoyé :</b> vendredi 19 juin 2020 08:51<br>
<b>À :</b> itowns-user@lists.osgeo.org<br>
<b>Objet :</b> [iTowns-user] Shadows in iTowns<br>
</font><br>
</div>
<div></div>
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Dear all,</p>
<p><br>
</p>
<font color="black">
<div style="margin:0">is it possible to enable casting shadows in iTowns especially using 3DTiles?</div>
<div style="margin:0"><br>
</div>
<div style="margin:0">Here is a minimal example with three.js 3D objects in iTowns.</div>
<div style="margin:0">I've set the castShadow and receiveShadow properties to true and added a new DirectionalLight casting shadows.</div>
<div style="margin:0"><br>
</div>
<div style="margin:0">Might be possible that I've forgotten something!?!<br>
</div>
<div style="margin:0"><br>
</div>
<div style="margin:0"><br>
</div>
<div style="margin:0">
<div><html><br>
<head><br>
<title>Shadow</title><br>
<br>
<meta charset="UTF-8"><br>
<link rel="stylesheet" type="text/css" href="examples/css/example.css"><br>
<link rel="stylesheet" type="text/css" href="examples/css/LoadingScreen.css"><br>
<br>
<meta name="viewport" content="width=device-width, initial-scale=1.0"><br>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.6/dat.gui.min.js"></script><br>
</head><br>
<body><br>
<div id="viewerDiv"></div><br>
<script src="examples/js/GUI/GuiTools.js"></script><br>
<script src="dist/itowns.js"></script><br>
<script src="examples/js/GUI/LoadingScreen.js"></script><br>
<script src="dist/debug.js"></script><br>
<script src="dist/three.min.js"></script><br>
<br>
<script type="text/javascript"><br>
// Define initial camera position<br>
var positionOnGlobe = { longitude: 6.956944, latitude: 50.938056, altitude: 5000 };<br>
var placement = {<br>
coord: new itowns.Coordinates('EPSG:4326', 6.978090, 50.922810), range: 1000, // Deutzer Hafen<br>
//tilt: 45,<br>
tilt: 10,<br>
}<br>
<br>
var viewerDiv = document.getElementById('viewerDiv');<br>
<br>
var scene = new THREE.Scene();<br>
scene.castShadow = true;<br>
scene.receiveShadow = true;<br>
<br>
var globeOptions = {<br>
scene3D : scene,<br>
}<br>
var view = new itowns.GlobeView(viewerDiv, placement, globeOptions);<br>
<br>
// delete original sun<br>
view.tileLayer.object3d.remove (view.tileLayer.object3d.children[0]);<br>
<br>
// Add new sun casting shadows<br>
var sun = new THREE.DirectionalLight( 0xffffff, 1, 100 );<br>
sun.position.set(9.3194, 0.30187, 4.0399);<br>
sun.castShadow = true;<br>
sun.updateMatrixWorld(true);<br>
view.tileLayer.object3d.add(sun);<br>
<br>
// position of the mesh<br>
var cameraTargetPosition = view.controls.getLookAtCoordinate();<br>
var meshCoord = cameraTargetPosition;<br>
meshCoord.altitude += 30;<br>
<br>
//Create a sphere that cast shadows (but does not receive them)<br>
var sphereGeometry = new THREE.SphereBufferGeometry( 5, 32, 32 );<br>
var sphereMaterial = new THREE.MeshStandardMaterial( { color: 0xff0000 } );<br>
var sphere = new THREE.Mesh( sphereGeometry, sphereMaterial );<br>
sphere.castShadow = true; //default is false<br>
sphere.receiveShadow = true; //default<br>
sphere.position.copy(meshCoord.as(view.referenceCrs));<br>
view.tileLayer.object3d.add( sphere );<br>
<br>
var meshCoord2 = cameraTargetPosition;<br>
meshCoord2.altitude -= 10;<br>
<br>
meshCoord2.latitude += 0.01;<br>
<br>
//Create a plane that receives shadows (but does not cast them)<br>
var planeGeometry = new THREE.PlaneBufferGeometry( 80, 80, 32, 32 );<br>
var planeMaterial = new THREE.MeshStandardMaterial( { color: 0x00ff00 } )<br>
var plane = new THREE.Mesh( planeGeometry, planeMaterial );<br>
plane.castShadow = true; //default is false<br>
plane.receiveShadow = true;<br>
plane.rotateY(0.3*Math.PI);<br>
plane.position.copy(meshCoord2.as(view.referenceCrs));<br>
view.tileLayer.object3d.add( plane );<br>
<br>
setupLoadingScreen(viewerDiv, view);<br>
<br>
var menuGlobe = new GuiTools('menuDiv', view, 300);<br>
<br>
// Add a debug UI<br>
var d = new debug.Debug(view, menuGlobe.gui);<br>
debug.createTileDebugUI(menuGlobe.gui, view, view.tileLayer, d);<br>
<br>
</script><br>
</body><br>
</html></div>
<br>
</div>
<div style="margin:0">Thanks in advance and all the best.</div>
<div style="margin:0">Carsten<br>
<span style="font-size:9pt"></span></div>
</font>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<font color="black"></font>
<p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>