Sign in to follow this  
Guest luissa

Layercall vs VTP

Recommended Posts

Could anyone provide a quick overview of the difference between scasm layercall method and VTP2 method for designing ground polys? Or a link? I guess what I am asking is why/when you should favor one or the other.scott s..

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

HiVTP2:- resolution limited to 4.8meter/pixel- very fast (textures mapped when FS starts)- automatically follow the meshLayerCall:- no limit on resolution- if you use it on a too large region it could impact frame rates- normally you place a flatten before you draw the ground polygonRegards, LuisPS: VTP2 will show gaps on LOD13 borders!

Share this post


Link to post
Share on other sites

Thanks Luis,I take it that Layercall is using the same layer level as VTPs do?Meanwhile, I have been playing with TexPoly as a way to install higher quality textures. This one is using the "AddMountain" call, which the SCASM manual says is a version of PerspectiveCall. A quick experiment on a 1024x1024 bmp shows it to work OK. The thing I don't understand looking at the SCASM, is that TexPoly splits the texture up into 512x512 blocks, and assigns Vector Points to match, but when it calls the ShadedTexPoly, it only calls out values like 0,255. It seems like it should be 0,511 but it works as is.http://forums.avsim.net/user_files/115806.jpgscott s..

Share this post


Link to post
Share on other sites

Hi,AddMountain is, as far as I know, the same as PerspectiveCall2(). It means that the drawing order of the calling part is sorted after the LayerCall()sbefore the PerspectiveCall()sIn other words:- Firstly FS paints the ground polygons sorted by the layernumber in the LayerCall(); then the objects called by AddMountain() sorted by the distance to the viewer; then the objects called PerspectiveCall() sorted by distance to the viewer.This was of major importance in FS98 (or 2000?) before the Z-buffer technique came to the sim. Presently I think it has only importance when you have transparent polygons as the Z-buffer solves the visibility problems.The above layer number has no relation to the VTP layer number. In fact I can not control the order by which FS draws VTP polygons and "normal textured polygons".0,511 - the maximum addressed pixel is 255 even if the texture is 512 or 1024. If you address a higher number than 255, you will get a repetition. The technique is used in several situations. If you address pixel 260, you get pixel 4, if you address 261 you get 5, if you address 511 you get the picture repeated twice.Regards, Luisps: SBuilder generates this code using "floating number code" which is, people say, faster then TexPoly()s

Share this post


Link to post
Share on other sites

Luis already said most :), but I would like to add a thing.I think it is better to use the LayerCall command, instead of a PerspectiveCall command, as with the LayerCall command FS will make proper ground polygons of your textures. This means correct display of shadows, etc. For photos placed on the ground that is easy I think.I do also agree with Luis that the floating point commands are a better choice. And if you look at them you will see that the texture mapping is done with a value between 0.0 and 1.0 (where 1.0 means the entire texture). A higher value gives repetition again.

Share this post


Link to post
Share on other sites

Thanks all,I was looking at the new SBuilder 2.05 photo tiles options:PhotoCall=LayerCall( :lcall 4 )PhotoCall=LayerCall( :lcall 0 )PhotoCall=PerspectiveCall( :lcall )I take it the idea is to control the draw order of the photo tile. I assume LayerCall ( :lcal 4) is the default solution based on FS2000 SDK examples.scott s..

Share this post


Link to post
Share on other sites

Hello SCott,Let me elaborate a bit on this with an hypothetical situation. In some region you place a flatten so that you can add a ground photograph (a textured polygon) and a runway. Let us say that you place a flatten at an altitude = 100 meters. Before you place the polygon and the runway, you have the default texture (a land class texture) at 100 meter of altitude. Call this default texture: A. Then you would like to add another textured polygon with a photograph. I call it B. Then the runway polygon which I call C. You would like FS to draw A, then B then C. I could not get it that way! :( There is no problem in getting A then B. For B you can use LayerCall( :label 4 ) without problems. The problem is with the runway, C, if you use the FS2004 (XLM) format. C will be covered by B whatever call you use above. As far as I know there are 2 possibilities to solve this:- to use the FS2000 runway command. If I remeber this command is equivalent to a LayerCall( :runway 24 ) which means that if you want to paint something over the runway you will call the horizontal polygons that paint the runway as LayerCall( :markings 28 ). If you make a call like this LayerCall( :airport_grass 16 ) then the called polygons will be covered by the runway (24 > 16). The problem is that you cannot use AFACD to draw the runway, taxiways or approns. Still you can use it to define the AI paths.- you make a transparent hole in the photo polygon for the runway to appear. Here you can use AFACD for the complete airport.If you use PerspectiveCall() for the photo polygon it will fliker with the default land class texture. At this stage you can enter the Zbias. Zbias = 5 for, example, will instruct FS to assume that (for the sorting of the drawing order) that the photo polygon is 5 meters higher than it really is. So FS will draw the polygon at 100 meters as "if it was at 105". That is it will draw the ground photo polygon after the land class polygon. But I found that this fails at certain viewing distances and I prefer the LayerCall() 0 or 4 (it is as if the land class polygon used a negative value).You can also use the altitude. For example you could set the runway to be at 100.01 (1 cm higher than the terrain). But that does not work as everything goes to 100.01 because the runway has a kind of built-in flatten. Sorry if I was not clear or if there are errors in what I wrote,Luis

Share this post


Link to post
Share on other sites

No, I think I am following what you are saying. I looked at some payware and they seem to be doing as you are suggesting: using older runway command to draw over the layercall level 4 photoscene with the runway detail.I take it that if you use resample method, then XML ground polys (runway taxiway aprons) do draw. As you know, separately I am playing with sbuilder to figure out the approach in there to getting high res photo tiles working. I am trying to keep the sbuilder program questions in the ptsim forum, and stick to theory here.scott s..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this