Outerra forum
Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: Elecman on August 15, 2018, 09:28:09 pm
-
I wrote this super fast light shader which is able to render millions of (fake) lights very efficiently:
https://www.youtube.com/watch?v=ANCrgK-O0HY&feature=youtu.be
However, I am not sure if it is possible to add this to Outerra as it is not just a shader but also a special mesh which stores additional data (light direction, intensity, color, etc) in the mesh UV, tangent, and color channels.
You can get the Unity version for free here to have a look:
https://assetstore.unity.com/packages/vfx/shaders/spritelights-46409
If @cameni wants to integrate this system, you are free to do so.
-
Oh wow! Impressive work :D
-
Nice!!!!
-
Looks very good! Thanks!
-
Very Impressive|||||
-
I tried to place 100 spotlights in outerra and it kills my framerates ! I hope there is or will be another way to do it in outerra.
var light_z = 7.1; // corresponds to lantern height
var white ;
var white_range = 1000;
function init_chassis(){
white = Create2DArray(10,10);
var i,j;
for ( i=0;i<10;i++){
for (j=0; j<10;j++){
white[i][j] = this.add_point_light({ x: 2.45 + j*50, y: i*50, z: light_z }, { color: { x: 0.6, y: 0.6, z: 1 }, size: 0.25, angle: 48, edge: 0.01, intensity: 0, range: white_range, fadeout: 0.0 });
}
}
return {mass:100000, com:{ x:0, y:0, z:-1000}};
}
function init_vehicle() {
this.geom = this.get_geomob(0);
this.set_fps_camera_pos({x:0,y:0,z:3});
var i,j;
for ( i=0;i<10;i++){
for (j=0; j<10;j++){
this.light(white[i][j], 1);
}
}
}
function Create2DArray(rows,columns) {
var x = new Array(rows);
for (var i = 0; i < rows; i++) {
x[i] = new Array(columns);
}
return x;
}
function update_frame(dt, engine, brake, steering){
}
(https://uc1a0ff48374e419e249ca3ffa00.previews.dropboxusercontent.com/p/thumb/AARWhWenCp4ggdULUqU8FxQ1vao9gwQZEdIPMJOrH1DblpdgmrWipdEC6ovmbPnhtEFmZq0ZgkvNv-mPOruQ3g7TScLE3Y4ONXtsbPbSUs81gvA5IeDqmLc8TYU9CWk_Ok_RA9wQgqDu36pSoz0qJoiUt-b--HtRk3N5RHW4HKGSbQ1DzH26ZdcbWUwu66_I7cKm8NN2JcfdEPG72J6Zw83oQsk8SaJTEHzmriB1oxRBvw/p.jpeg?size=2048x1536&size_mode=3)