Hi Michael,Originally Posted by Michael Clease
do you need this for 3D models or for 2D sprites? Later one is allready developed (in a variation) and will be available with the next TGBL update.
Cheers
Michael
I want to use different parts of my texture but at the moment I am stuck with using the whole texture or create multiple displayslists with the appropriate co-ords.
I can't see how you could add some options but maybe a new keyword instead
How about
TBGL_LoadTexturelist TextureFile, TextureIndexStart,TextureCount,SubX,SubY, TextureFiltering [, AnisotropicLevel [, TransparentColor ]
same functions as TBGL_LoadTexture but
TextureIndexStart = Starting Texture
TextureCount = number of textures
SubX = Size of tile X Axis
SubY = Size of tile Y Axis
what do you think ?
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Hi Michael,Originally Posted by Michael Clease
do you need this for 3D models or for 2D sprites? Later one is allready developed (in a variation) and will be available with the next TGBL update.
Cheers
Michael
Hi Michael,
Michael said it
If you need it for something else, would you like this command to create multiple independent textures from one bigger?
In which order - row/column?
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
What I am suggesting can be used for both 3D and 2D and its not for sprites.
yes, column,row (x,y)would you like this command to create multiple independent textures from one bigger?
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Thank you Mike,
it should be relatively easy to do, thanks for the suggestion.
I have one idea - what about doing it like:
Why this way? Imagine you have texture, with 16x32 "subtextures".TBGL_LoadTexturesFromTiles fileName, startIndex, numberOfColumns, numberOfRows, TextureFiltering [, AnisotropicLevel [, TransparentColor ]
When you change the resolution of bitmap ( but still having 16x32 subtextures ), using your original proposal you would have to recalculate tile sizes in pixels again.
My syntax is not resolution dependant, all dirty calculations will be done inside command and coder does not have to care.
Let me know,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
That looks good. thanks.
Was I right about Displaylist entities and changing co-ords is not possible?
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Hi Mike,
yes you were 100% correct.
This problem is very interesting generally, as all solutions have quite strong both pros and cons:
Multiple objects textured by image from bigger texture
+ easy to implement
+ one texture binded for multiple "graphics"
- might have performance hit in recalculating the coordinates
- filtering artifacts can occur ( I call it pixel bleeding but I guess that is not proper term )
- does not allow repeating
To do it now via immediate mode ( BeginPoly/EndPoly ) is overkill for lot of objects, using M15 commands could be ok.
Multiple objects textured by multiple textures
+ easy to implement
+ no filtering problems
+ texture can be repeated
- binding different texture for different object can mean performance hit on graphic hardware side
Doable using any approach.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Developed,
will be present in next release.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
hi all, dear michael (2x), petr ...
and I like this good idea, very useful![]()
thank you! for...
I hope we can handle with new texture functions easier in 2d and 3d world... would be nice for working with tbgl/ui module and for example human bodies, rooms, objects, landscapes, tiles, water and more daily fantasy inputsMultiple objects textured by image from bigger and multiple texture
bye, Lionheart
you can't always get what you want, but if you try sometimes you might find, you get what you need
Developed, will present in next release
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB