Jump to content
Sign in to follow this  
Guest GerrishGray

FSDS2 and non-square textures

Recommended Posts

Guest

Hi,Apparently it is possible to use non-square textures with FSDS2-objects (I guess GMAX as well?), but I have never tried it, just have it in the back of my head that it should work. I must have read it somewhere or something like that. Well, now to the question: if that is possible, then are there any cons with it, or is it just as good as it sounds, that one can get rid of all those unneeded pixels that leave when you have placed your texture in a square bmp file?

Share this post


Link to post
Share on other sites
Guest

I don't think it is possible.Someone correct me if I'm wrong but DirectX AFAIK supports only square textures.At the very least using different formats would slow down the loading and handling of the textures in memory as the blocks of memory (and this I DO know without looking it up in the SDK docs) used by DirectX are all geared towards square areas in multitudes of 32 bits squared (or 8 bytes squared).

Share this post


Link to post
Share on other sites

You can use non square textures, as long as the width and height are powers of 2 (so 2, 4, 8, 16, 32, 64, 128, 256, do you get the idea now :D). This has nothing to do with FSDS2 or GMax, I already did it in SCASM before.But I don't know how much this slows down the system. What Jeroen says sounds logical. I assume the power of 2 "rule" makes it less worse, but I don't know how much.Arno


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

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno.The textures you refer to as non-square are still rectangular, correct? I don't think there is a non-rectangular format for textures, is there? I mean, we don't have circular or triangular texture formats.Dick

Share this post


Link to post
Share on other sites

Yeah, of course I would say :), can't see my paint program make a circular bitmap for me :).They still have to be rectangular and the size are restricted to being a power of 2 (so you can't use any size).Arno


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

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest

Yup, I still meant rectangular. =o)I guess it's best to keep to the old standards then.

Share this post


Link to post
Share on other sites
Guest GerrishGray

Hi guysThere is no problem at all with rectangular (non-square) textures that I am aware of, as long as they have power of 2 measurements. The alleged slowing of frame rates sounds like a red herring to me, unless someone has a solid reference to it. Unless there is confirmation of some other problem, my belief is that non-square textures can actually improve frame rates when used correctly because of shorter load times and reduced use of memory resources.One detail I am not sure of, though, is how the 'texture-size' parameter needed by the (floating point) texture definition to control the use of mips is applied in the case of rectangular textures. My assumption is that one bases it on the longer side, but that's just guesswork.CheersGerrish

Share this post


Link to post
Share on other sites
Guest luissa

>One detail I am not sure of, though, is how the >'texture-size' parameter needed by the (floating point) >texture definition to control the use of mips is applied in >the case of rectangular textures. My assumption is that one >bases it on the longer side, but that's just guesswork. Dear Gerrish,Do you know how the 'texture-size' parameter controls MIPs? Can you elaborate?Kind Regards,Luis

Share this post


Link to post
Share on other sites
Guest GerrishGray

Hi LuisThe Floating Point SDK states"texture_size Size in meters of texture, used for mip selection"I think we can assume that there is a mechanism similar to IFHSIZE that returns the number of pixels on screen that represent the texture size at the location of the object and that is used to determine which mip should be used for the 'blit' (screen painting) operation.This is only of concern if one is programming manually in BGLC or SCASM code - the design tools (gMax, FSDS2, NovaSim once the full version is released) all do it for you. I'm only guessing as regards FSDS2 - I don't have a copy yet, but it's reasonable to assume that Louis will have programmed it that way.CheersGerrish

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...