Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: New streetlight for massive city illumination (release)  (Read 7014 times)

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
New streetlight for massive city illumination (release)
« on: September 27, 2020, 03:11:22 am »

Its my pleasure to finally release my new streetlight.
No more need to switch the lights on ! Once placed in the editor it will immediately be on. During daytime its luminosity is reduced so that it will appear as if switched off.

I want to gratefully acknowledge here the great help recieved from the devs in getting it working, using the new "gameob" objdef  and in particular KW71 for a great idea of how to efficiently handle
ground illumination without actually using active lighting.


In addition to the streetlight I release here a demonstrative scenery of beautiful seaside tourist resort "tortoli" in sardinia island (italy).
The scenery contains nearly a thousand carefully handplaced streetlights and several miles of railroad tracks for use with my train mod once it will be optimised.
Another feature of this scenery is that the city roads are all fully driveable, since I have corrected all the positions of the houses
to avoid that they block roads as unfortunately happens with most cities in outerra.
Exploring a city by car/truck instead of ufo mode is a whole new experience
especially at night with all the buildings and roads illuminated by streetlights !


Note: for getting the lights to work correctly with vehicles, the vehicles need a small code addition. Here for a start is the streetlight-enabled Tatra 815-7 fly77 truck model .. I will "streetlight-enable" any vehicle on request.
https://drive.google.com/drive/folders/1VOwWKXlKgbTnjmOQ4jKd959GGufqrQ8h?usp=sharing



download the streetlight from here:
https://drive.google.com/drive/folders/1MSwgOlyWKgrJuiH7aCejd9f7HB3PV7KX?usp=sharing


download the tortoli-illuminated scenery from here
https://drive.google.com/drive/folders/1-_sergf9nyBAdfVyqCa1TU21dX5IOnLT?usp=sharing


note: to enhance the experience of exploring the location install also my tortoli-soundscape mod
that will add local sounds varying with location and time of day such as seagulls, harbour and city sounds, beach party and airport sounds etc..


download the tortoli soundscape from here
https://www.dropbox.com/s/be9i558borq305i/soundscape.otx?dl=0

Note: to get the tortoli sounds activated you need to choose "soundscape" from vehicles menu and drop the boombox wherever you like.

demonstrative video
(Note pump up the volume as I unfortunately set the volume a bit too low )




Installation:
make a backup copy of your outerra cache and user-packages folders
normally located in
outerra installation drive:\Users\...username...\Outerra\cache

Then click on self-installing   streetlight.otx ,T817-streetlight-enabled.otx, soundscape.otx  files


after downloading "tortoli-illuminated" cache folder unzip it and copy it to the location of your user cache folder ...(normally drive:\Users\...username...\Outerra\cache)..It will overwrite just a region about 10 km wide around tortoli/italy


Use: In the scenery editor (F7 key) search for "streetlight" under assets.
grab the light and place it wherever you want.

Note that the bounding box of the streetlight is very big, don't worry that is normal and
it won't obstruct anything since the bounding box has no collision.
Usually for placing many lights you will copy paste /duplicate it in the editor and then drag the copied streetlight.
Sometimes (apparently because of an outerra bug) it can happen that you can't grab the copied light to drag it.
To solve this issue proess R to rotate the light slightly and now you can grab and drag it.


for the scenery's local sounds: get "soundscape" from vehicles menu and spawn the boombox wherever you like.






« Last Edit: September 27, 2020, 08:06:08 am by fly77 »
Logged

aWac9

  • Hero Member
  • *****
  • Posts: 2538
  • newbie
Re: New streetlight for massive city illumination (release)
« Reply #1 on: September 27, 2020, 04:42:08 am »

Congratulations Fly, spectacular .. a huge contribution to the outerra community .. thank you so much for your time. It's a great job.
Congratulations.
It is an intelligent solution, the sun never goes out either .. very well thought out .. very happy, to also think that the lights of airports in the future can be solved in the same way ..
thanks Fly.
:):)
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: New streetlight for massive city illumination (release)
« Reply #2 on: September 27, 2020, 05:27:48 am »

Thanks aWac9.  This version is for "manual placement". In the future I hope to make also a version for "automatic placement" so that bigger cities can be illuminated.
Also the fact is that the present version to work best needs some lines of code to be added to vehicles.
This is needed so that "active lights" become visible when the camera is near enough (<300m). In principle it should be also added to planes and boats but for planes/boats its less important as they usually "fly/navigate" far away enough from streetlights. The code "clamps" the in game camera (igc) used by the streetlights to the vehicle.
Unfortuntaely for characters this is not possible, so bypass the issue you need to exit (press shift+ENTER) and re-enter(press ENTER) if you feel you "walked into the dark". (this will reset the icg position to the current character position and so activate again the active lights around you).
I hope in the future to find a way to avoid this complication.
Anyway the lines of code to be added to vehicles are the following.


Code: [Select]
var  $igc;

function init_vehicle()
{
  $igc = this.$query_interface("ot::js::igc.get");
  this.geom = this.get_geomob(0);
...
}

function update_frame(dt, engine, brake, steering, parking)
{
  if (this.get_camera_mode() != 256){             // if camera associated to some vehicle
    $igc.set_pos( this.geom.get_pos(), this.geom.get_rot());   
  } 
....
}


« Last Edit: September 27, 2020, 10:21:32 am by fly77 »
Logged

aWac9

  • Hero Member
  • *****
  • Posts: 2538
  • newbie
Re: New streetlight for massive city illumination (release)
« Reply #3 on: September 27, 2020, 01:48:49 pm »


impressive snapshot, you are going to become an artist as well as a programmer. :)

When I add the new scenario ,, is superimposed on the previous ,, fly ,, how many space or km is replaced of the Tortoli scenario?
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: New streetlight for massive city illumination (release)
« Reply #4 on: September 27, 2020, 02:23:14 pm »

Its only affecting an area of around 10 km. If you have already installed my old tortoli scenery that scenery will be deleted but its not a problem as the new one is much better. Unfortuntaley outerra does not permit to "merge local sceneries"
« Last Edit: September 28, 2020, 06:16:43 am by fly77 »
Logged

aWac9

  • Hero Member
  • *****
  • Posts: 2538
  • newbie
Re: New streetlight for massive city illumination (release)
« Reply #5 on: September 29, 2020, 05:25:20 pm »

I already found the cache data. jejeje... :)




Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: New streetlight for massive city illumination (release)
« Reply #6 on: September 29, 2020, 05:36:29 pm »

hehe ! let outerra's guys and girls enjoy together the show :D 
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: New streetlight for massive city illumination (release)
« Reply #7 on: November 16, 2020, 04:39:12 am »

Important update:  Added white version of the the "massive streetlight" to the previous yellow light version.

please redownload from above.

Installation:
just click on self-installing streetlight.otx


the file will overwite the previous yellow one and add a white one. No need to keep the old version.







« Last Edit: November 16, 2020, 04:48:08 am by fly77 »
Logged

aWac9

  • Hero Member
  • *****
  • Posts: 2538
  • newbie
Re: New streetlight for massive city illumination (release)
« Reply #8 on: November 16, 2020, 07:31:01 am »

thanks again for this new contribution.
a question Fly77..this light that arises automatically when it is night, it is implemented in the lights of the airports ???
thanks
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: New streetlight for massive city illumination (release)
« Reply #9 on: November 16, 2020, 09:51:53 am »

a question Fly77..this light that arises automatically when it is night, it is implemented in the lights of the airports ???
thanks

Not yet, but I plan to do it...and also for floodlights and perhaps rotating beacons ...(when I have nothing else to do)
« Last Edit: November 16, 2020, 10:02:28 am by fly77 »
Logged

aWac9

  • Hero Member
  • *****
  • Posts: 2538
  • newbie
Re: New streetlight for massive city illumination (release)
« Reply #10 on: November 16, 2020, 10:01:28 am »

Ok..thank you .. feel free
:)
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: New streetlight for massive city illumination (release)
« Reply #11 on: November 16, 2020, 10:03:02 am »

I know: airport lights are very important  ;)
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: New streetlight for massive city illumination (release)
« Reply #12 on: April 16, 2023, 07:02:57 am »

Today 16-4-2023 I fixed the streetlight so that it works universally, independnet of the car,  or train or whatever you drive or wether you are in ufo mode or not . Please redownload from above !
Logged