Sign in to follow this  
Guest Cazador

Textures in Gmax objects disappears in Fs2002

Recommended Posts

Dear all:I have created a building using gmax but when i convert it to bgl the object textures disappears at long distances, for example 1 Km.To solve that i created a big ground polygon flipped and the problem was fixed, but when i convert the object to a Library bgl with Fsregen and then i created a macro to call the object, i assigned 30M x 30M for Widht and Lenght in my .scm macro, but when i see the library object on FS2002 the textures dissapear at 1 Km.I think that the macro size of 30M x 30M eliminates the size of the ground polygon.Is there a way to fix it?I'm thinkint to return to FSDS because is a bug that the gmax objects lost their textures a 1Km or less.Thanks.Alfredo Mendiola LoyolaLima Peru

Share this post


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

hmmmm...somethings not right, my gmax buildings hold texture up to 50,000m, might be a fsregen issue, what prog are you using to place the macro?some have an adjustment for this. i dont use fsregen, i place all buildings,etc...,in one gmax file then use fssc to place runways,etc..., maybe you have to edit scasm to solve this which i know very little about.good luck,odog

Share this post


Link to post
Share on other sites

Dear Odog:Even using bgl generated by MakeMdl with the gmax exporter i get building without textures at 3 km or three, i have to create a big ground polygon to avoid that problem, but i think that isn't a oo solution for a program like Gmax.Do you use the exporter or the BGLC to place your gmax object in FS2002?Thanks.Alfredo Mendiola LoyolaLima Peru

Share this post


Link to post
Share on other sites

i have 3 makemdls that i switch betweenthe original that came w/ the gamethe one in the makemdl sdkand middlemanthey all seem to be different, now im using the original set the distance to 50,000m on export and see if that helps, the default is 10,000m

Share this post


Link to post
Share on other sites

Do you have mip maps in your texture? If not FS2002 may be trying to read those, but if it can't find them, you get no texture... Add some mipmaps with imagetool...Cheers, Christian

Share this post


Link to post
Share on other sites

Hi Alfredo,I just did a little test and after a while I got it working.As my bigger objects (airport terminals etc) don't have this problem it really has to do with the small size of the object.So I added a plane at ground level. I first tried to give it a fully transparant texture (because I don't want to see the polygon), but that didn't work. Then I made it opaque again, but I flipped it so it is faced down and now it works fine. My small house is textured from much greater range.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

You really shouldn't have to add ground polygons to control this, that sounds like a very dirty fix to me! The new floating-point BGL commands can pass a texture size parameter to the display engine that controls the use of the mip-maps. If the textures are disappearing at a distance, it is either because you are using plain bitmaps without mip-maps, as Christian suggests, or most likely because this texture size parameter is being set incorrectly (and presumably gets corrected/overridden when you add your ground polygon to the model?). It's interesting that the problem only seems to occur with smaller models ...The offending parameter is set with the TEXTURE_SIZE macro if you want to hack the BGLC code (or the TextureSize() command in SCASM).Further feedback from hacking/testing may be very interesting in revealing details of exactly how we should be using the new commands ...Kind RegardsGerrish

Share this post


Link to post
Share on other sites

Thanks Gerrish, I think you were right with your comments and it made me search the issue a bit further.I compared the source from the object with and without the extra plane and there was no real difference (apart from the extra code for the plane of course). So this made me come to the conclusion that it was something in the scenery engine (depending on the size).Then I noticed the following. GMax uses this code for the textures:[tt]TEXTURE_DEF TEXTURE_AIRCRAFT , <255,255,255,255>, 0.570462, "OW_HUIS1DP.BMP" ; 0[/tt]When I went through the SDK I noticed that this code is for aircraft textures (OK, could have guessed that from the name too :)). But I also found there that TEXTURE_BUILDING is for scenery textures. So after changing the code into:[tt]TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 0.570462, "OW_HUIS1DP.BMP" ; 0[/tt]It worked fine. It just seems the MakeMDL is a bit more fine tuned for aircraft and the building and aircraft texture are handled different. After this small change the texture is visible from greater range.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

I'm new to gmax and being a SCASM designer the learning curve is a difficult one. One problem that has been mentioned on this forum is that of disappearing textures from the house featured in the very worthwhile gmax tutorial issued by Microsoft. My crude workaround to the house problem was to add to the house a second object, a box of size .001m wide by .001m high by 500m long. The 500m length apparently triggers code that allows the house texture to remain while the very tiny width and height dimensions render this object essentially invisible.I welcome your newly learned information about the definition for building textures, but I'm not yet into the details of how to do what you mentioned. Could you expand on how to use this info.Regards, Jim Jones

Share this post


Link to post
Share on other sites

If you are a SCASM designer (like I am) then you will find it easy to work with the BGLC source code :).When you export from GMax you must make sure that you check the keep files option. Then two source files will be saved. If your object is exported as test.bgl, these files are test.asm and test_0.asm.The test.asm file contains the placement of the object mainly (so the equivalent of the SCASM Area, PerspectiveCall, RefPoints, RotatedCall commands). If you check the crash detection option this is also contained in this file.The file test_0.asm is called from the file test.asm and contains the actual code of the object (texture lists, material lists, point lists, triangle lists).The changes I described in the message above are in the texture list, so can be found in the test_0.asm file. Most of the structure of the commands is equivalant to SCASM and when you take the SDK to compare the commands, you will find it easy to understand.Finally when you have changed what you want, you can recompile the files to a BGL file by using BGLC. I think the latest version is included in the BGL_Compiler_SDK.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Please excuse my bluntness Arno but when so say;>When you export from GMax you must make sure that you check >the keep files option. Where should I apply this check? Somewhere in GMax, MakeBGL? I did look for a 'keep file box' in each of those but only found the Keep Error Log in MakeBGL. I'm pretty shure this is not the one you have in mind.Thanks a lot for this precision and even more for all the support you do bring to all.Btw, I did try Jim Jones's solution. It does work!! Brought the texture visibility from 2 to 10 KM but it seems you can't have it any further though. DO make sure you dont fly below 500M in this area though :)Hugo

Share this post


Link to post
Share on other sites

Thanks Arno for your very accurate description of the process for producing the .asm files and how to compile them.Your method was a complete success, and the "house" tutorial now works with textures showing at a distance.It would seem that the author of the makemdl program did not code it properly, especially since the program requests if the model is to be for an aircraft or scenery. Hopefully that someone will see your message here and correct makemdl.Hugo, if you are reading this, select the options tab in makemdl and check the "keep files" box. In my workaround set the height and width to .001 m and the length to 500m. I guess perhaps you had set the height to 500m instead and were warning us not to fly over the house lest you crash into the thin box. :)Regards, Jim Jones

Share this post


Link to post
Share on other sites

Arno, yes it's really stupid that gmax uses AIRCRAFT instead of BUILDING. I wonder if that's necessary for reflections and lightmaps. I'm just diggin into all of this. I found that textures and materials actually get blended (at least the specular colour). I'm planning more research on that).Hugo, you need the latest makemdl (from the makemdl SDK), the FS2002 pro version doesn't have that option!Cheers, Christian

Share this post


Link to post
Share on other sites

Jim you are right. I realy misred your post and actualy made the thin box 500 m high!! Not only am I blunt but also quite shortsight ;-). I have installed the newer version of Makemdl and do find the keep files box there.However I do find your thin box solution quite elegant too!! Hugo

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