Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - anne_domini

#1
Support / Re: two layers sahder?
October 23, 2015, 06:54:38 PM
Yep, texture layours will help, need to think about it...
#2
Support / Re: two layers sahder?
October 22, 2015, 06:25:29 PM
This is for our application, "Knowledge base for World of Tanks"(a bit of ads: https://play.google.com/store/apps/details?id=com.enigmapro.wot.knowlege&hl=en), we have activity "Armor piercer" which shows probability to penetrate armor of tank with selected shell.
Tank has different armor values in different places (these values are stored in the texture of object). Armor of tank can be of two types main and spaced.
For for user it is ok when he looks on main armor (if main penetrated - damage is dealt).
Several words on shader -  its work is pretty simple - it apply lightning based on angle and armor values.

Next goes the pain - spaced armor. Spaced armor covers main armor with thin armor (here i will not dive deep into game penetration mechanics).
In example: we have penetration value of 200mm. And we are looking on tank, it has main armor 250mm covered with 100mm spaced armor.
--->     |100mm     | 250mm

So totally we need to penetrate 100 + 250 = 350mm; our current penetration is 200mm
We are looking on tank and first we see spaced armor which is 100mm and shader shows that we can damage tank here. because shader doesnt know anything about armor layers which are deeper.
You can watch video https://youtu.be/ATzzXN0hTaU?t=461 (video in on russian lang, but dont worry it wont matter)

Maybe there is some way add renderhook, hide spaced armors, render probability values into texture. unhide spaced armor, render in second pass...
#3
Support / Re: two layers sahder?
October 21, 2015, 11:57:39 PM
Em, seems so
#4
Support / Re: two layers sahder?
October 21, 2015, 02:21:22 PM
Thanks, and if i need to like this:
1. modify color with shader of most farest object.
2. have this color as input in 2nd object shader.
If there a way to do so?
#5
Support / two layers sahder?
October 21, 2015, 01:55:19 AM
I have several objects, obejcts overlay each other ( <eye>---> |  | ), each object has shader.
Is there a way to modify color of nearest object to eye like a function of color of second object?
#6
Support / Re: Large open world
October 15, 2015, 12:05:28 AM
#7
Support / Re: Large open world
October 13, 2015, 11:33:12 PM
Yep, simple jar with usage like this:

java - jar converter.jar path/to/input/model.obj path/to/output/serialized.file

Input - obj file, output - serialized model
#8
Support / Re: Large open world
October 13, 2015, 10:57:23 AM
PPS Dont you need for wiki jar file, which converts OBJ to serialized?
#9
Support / Re: Large open world
October 12, 2015, 11:34:18 PM
Tried to swtich project to serialized format, works fine :)
Loading times for 300Kb OBJ - 0.25 sec
Same object in serialized format ~ 0.02 sec
(Same timings on PC and Android device)
PS maybe this will be useful to some1
#10
Support / Re: Large open world
October 07, 2015, 02:15:08 PM
Yep, it will be my next step after implementing general algorythms of chunk managments.
Btw, can you give some basic info about jpct serialized model format, like loading time(compared to obj) and does it use compression?
Thank you in advance.
#11
Support / Re: Large open world
October 07, 2015, 02:41:54 AM
It is not a game, it is sorta "viewer".
I wish i could load all of things at once and render them, but it is not an option (most heavy space loading time ~4mins on xt1254 (Snapdragon 805 4@2.65ghz) and it consumes about 160Mb of ram)
Now implementing chunking... will see how it is going to work.
#12
Support / Large open world
October 05, 2015, 03:20:02 PM
Does jpct ae have some built-in features to handle large open worlds?
Or i need to do all by myself? I mean things like splliting world into chunks, dynamically load/unload unneeded models etc?
#13
Managed to get it work. But without texture projecting.
1. Calc polygon intersection point with my ray.
2. recalc 3d coords into UV
3. Determining "up direction"
These calculations are done with python, as preprocessing, and stored in the db (u, v and roation)
Next just simple shader like

pseudo code
if(currentTextureCoods in decalBounds){
gl_FragColor = sample2D(recalcTexCoordsToDecalCoords(currentTextureCoods), textureUnit2)
}
else {
gl_FragColor = sample2D(currentTextureCoods, textureUnit1)
}
#14
Thx.
Still investigating and trying to implement.
#15
Well, i've managed to project my texture to plane, like in example (actual.png).
As i understand example, we render to texture needed objects from point of light and blend this shadow texture with our "receiver object"

Now i'm stuck how to get projection like in "needed.png" where i need to project given image to another object to given point.
I was speaking of "rayStart" - now i'm understand it's the position where "image source" located (like a light source in shadow example)
"rayEnd" - position of center of our resulting projection, "rayUp" - defines rotation.

To be more clear, i want to get the result like on this image https://worldoftanks.ru/dcont/fb/image/wot_object_268_1024x600_noc_ru.jpg
I have a model of tank, and the red star is projected like a decal to the texture. And position of this decal is defined by 3 vectors mentioned above.