Page 14 of 18
Re: World of Tanks Map format.
Posted: Fri Feb 05, 2016 11:02 pm
by Mr.Mouse
Coffee wrote:Its broke..
Sorry..
You could try playing with the light levels..
It looks like everything is whited out.
Okay, so it is Terra being broke? I'll just wait for a new release then.

Re: World of Tanks Map format.
Posted: Fri Feb 05, 2016 11:15 pm
by SkaceKachna
Well, as I said, I'm using webgl wrapper for javascript, so I never directly work with GL...
I took a look into it and the main difference is, that instead calling:
_gl.drawArrays( _gl.TRIANGLES, start, count );
you call:
_gl.drawArrays( _gl.POINTS, start, count );
Now instead of rendering normal models, GL will render each vertex as point. So you only need one of those 4 vertices in the geometry to get correct position, you use the rest to get correct UV coordinates.
I attached parts of shader, it isn't complete, but that's all I could get from the wrapper ... I don't understand shaders much
Re: World of Tanks Map format.
Posted: Sat Feb 06, 2016 12:06 am
by Coffee
Thanks for the info..
I was about to start writing a glsl program using the geo shader but wanted to wait for your replay.
So..
I could send one vertices which is the center of the quad and 4 uv coords to the geo shader and let it create the quad.
Re: World of Tanks Map format.
Posted: Sat Feb 06, 2016 4:13 am
by Coffee
shit.. I can't get this working
I don't under stand how to pass the UVs to a single point.
I need 4 uvs passed
What Im doing now is using gl_Multitexcoord but it does't seem to bind and UVs to a point.
I tried turning on point_sprite... that don't work.
Re: World of Tanks Map format.
Posted: Sat Feb 06, 2016 9:31 am
by SkaceKachna
I'm sorry, we must be living in oposite timezones ... I just woke up.
I forgot to mention ... I never use the entire texture with combination of UV coordinates. I use the UV coordinates to create separate texture (cut it out), which I then assign to rendering. It isn't ideal, but it works.
Re: World of Tanks Map format.
Posted: Sat Feb 06, 2016 10:06 am
by SkaceKachna
By the way, I updated wot-python-lib, it can now read the space.bin files and newest primitives:
https://github.com/SkaceKamen/wot-python-lib
Re: World of Tanks Map format.
Posted: Sat Feb 06, 2016 4:01 pm
by Coffee
Yes.. Different Time zones

I live in not so beautiful Erie, Pa.. on the tail end of Lake Erie.
The problem I'm having is it isn't using the shader at all.
I have been screwing with this for 2 days just trying to sort out why this is.
It all 3 parts vertex, geo and fragment compile with no errors and I get a valid ID for the shader program but it just does NOT make a differences if it use it or not. I send points and the damn thing does nothing but draw a POINT!
I cant effect the color or anything in the shader!!!!
By the way, I updated wot-python-lib, it can now read the space.bin files and newest primitives:
Cool.. Did you update the wiki's as well?
Re: World of Tanks Map format.
Posted: Sun Feb 07, 2016 10:18 pm
by Coffee
Ok...
You can check out this version.
I changed the Tree leaves and fixed a bunch of bugs.
I also added decals..
The lighting is not 100% perfect on the decals or trees yet.
You will need to set the path at startup.
You will need to mess with the light settings to get the best look.
It saves each light setting for each map.
Version 22
http://209.159.152.184:8080/terra/
EDIT:
There is a bug with the primary texture map getting screwed up.
I have not found what is causing this and after 5 hours I gave up.
I'll go back later and sort it out.
Re: World of Tanks Map format.
Posted: Sun Feb 07, 2016 10:32 pm
by Coffee
It looks pretty good now.
Not perfect and it never will be. I don't understand how to get the layers mixed perfectly.

Re: World of Tanks Map format.
Posted: Sun Feb 07, 2016 10:53 pm
by Coffee
All that crap... almost 3 full days trying to get other peoples code working to align a quad with the view plane..
LMAO.. this is soooo simple and works with out a shit load of translations.
I send each corner of the quad to the shader in UV coordinate and its center as the vertex.
Than I just do this in the vertex shader.. SO SIMPLE!
Code: Select all
texCoord.xy = gl_MultiTexCoord0.st;
vec4 p = gl_ModelViewMatrix * gl_Vertex;
p.xyz += gl_MultiTexCoord1.xyz;
p = inverse(gl_ModelViewMatrix) * p;
gl_Position = gl_ModelViewProjectionMatrix * p;
Re: World of Tanks Map format.
Posted: Mon Feb 08, 2016 2:55 pm
by Coffee
no comments

Is Terra working?
Re: World of Tanks Map format.
Posted: Mon Feb 08, 2016 3:13 pm
by SkaceKachna
Sorry, been busy with some other stuff.
The screenshots look good, but I'm unable to launch the Terra locally.
1. My antivirus (Avast) is insiting that it's virus
2. Once I managed to overthrow him, I tried to set the path. Once I do File > Set path, the application closes, without any error or anything, just shuts down. I looked to .settings file and path wasn't set, so I manually changed it there. Then map list shows, when I select any map this shows:
https://i.imgur.com/uziG8EH.png
Re: World of Tanks Map format.
Posted: Mon Feb 08, 2016 4:58 pm
by Coffee
SkaceKachna wrote:Sorry, been busy with some other stuff.
The screenshots look good, but I'm unable to launch the Terra locally.
1. My antivirus (Avast) is insiting that it's virus
2. Once I managed to overthrow him, I tried to set the path. Once I do File > Set path, the application closes, without any error or anything, just shuts down. I looked to .settings file and path wasn't set, so I manually changed it there. Then map list shows, when I select any map this shows:
https://i.imgur.com/uziG8EH.png
Virus could be coming from the fact that Terra has a built in server for people to log in to to watch some on setup a layout. It interesting.
Terra shuts down once the path is set.. It can't continue with out first initializing every thing it needs from the games data.
I can probably fix this by moving all this to a sub and calling it after the path is set.
If the settings file is not being updated there is something very strange going on.
The path should point to the games root folder.. Something like this "C:\games\World of Tanks\"
I'm pretty sure you have the path right or Terra would not find the "\res\scripts\destructibles.xml" file. If it can't find this file it triggers the 'path not set' alarm.
BTW.. this file list every material type that is destructible. I use it to cancel loading models parts that are crushed.
This has always worked in previous versions of World of Tanks but this last version seems to have broken this. Terra is loading parts of builds that are crushed now. I'm still looking for why this is.
While I was typing this, I decide to look at the destructibles.xml file.. It looks like it's format has changed. I'm not 100% sure.. I have not dealt with this file in years.
I'll look in to all this...
Also.. There is something strange about the trees.. I'm missing something about a scale factor or something.
Pine trees seem to have a taper in the game that my tree creator doesn't duplicate.
Re: World of Tanks Map format.
Posted: Mon Feb 08, 2016 7:11 pm
by Coffee
I was wrong.
"\res\scripts\destructibles.xml" file actually contains the names of the materials that are NOT in a destructed state.
Told ya it has be a long time lol
Re: World of Tanks Map format.
Posted: Mon Feb 08, 2016 9:12 pm
by Mr.Mouse
terra.png
What am I doing wrong, I downloaded the latest version, but the models still won't show. I can tweak the lighting to get the right colours more or less, though.