Sign In

How to make a 3D Texture?

#1✎ 24DevinF06Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesIs there a easy way to skew a image (or whatever works) to make a 3D texture?
Posted 3 months ago

#2✎ 593IAmRalseiForum LeaderHiddenAchievementsFirst YearMy account is over 1 year oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming Strengthuse sim.3d (higher performance) or poly3d (has model creator) and color the tris to make a texture lol
Posted 3 months ago
Edited 3 months ago
by IAmRalsei

#3✎ 24DevinF06Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesI mean a texture face where the image is stretched over a object
And also I think that many tris (and generating them) will slow down
Posted 3 months ago
Edited 3 months ago
by DevinF06

#4✎ 166612Me21Head AdminThird YearMy account is over 3 years oldWebsiteSyntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express Yourself

Is there a easy way to skew a image (or whatever works) to make a 3D texture?

There isn't.
Posted 3 months ago

#5✎ 160DFrostExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthThere is P3D by Bugtaro that you can use, but it is a pain to use.
Posted 3 months ago

#6✎ 98seggiepantsIt sounds like you want to texture map an image onto a polygon. The way you phrased it almost sounded like you wanted voxels or mip mapping.
While the 3DS certainly has the functionality in hardware, SmileBasic does not give you any way to access it directly. You could try texture mapping with math manually, but you would not end up with something that would run at multiple frames per second. Even just plotting out the pixels would be slow. I tried plotting out a full screen of pixels with GPSET and on my "New" 3DS, I got 2.2 frames/second with significant screen tearing. If I switched to using GLOAD to load everything from an array, it didn't tear, but I still only got 2.4 frames/second. Even just drawing triangles with GTRI isn't all that fast. I only got up to about 512 random triangles before my frame rate dropped down to about 15 frames/second.
You were correct to say that emulating textures mapping with triangles would be too slow. Each textel would need to be two triangles. For an cube with an 8x8 texture on each face, that is 6 sides * 8 textels wide * 8 textels tall * 2 triangles = 768 triangles. Of course with back face removal that is really only about 384. Still one cube with three faces showing with a 8x8 texture drops you down to low frames per second.
Now for a positive note, the upcoming version of Fuze 4 Switch does seem to have 3D capability, if you look at their Youtube videos https://www.youtube.com/watch?v=p47wUum4Fhw they have a demo that appears to be using texture mapping while modifying the texture on the fly. Of course assuming it doesn't get delayed once more you still have to wait until April, have a Switch and purchase it for about $40 USD. Hopefully SmileBasic for Switch will follow suit, but I wouldn't count on it.
Posted 3 months ago

#7✎ 166612Me21Head AdminThird YearMy account is over 3 years oldWebsiteSyntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfThat's not true 3D, they're just using simple transformations.
Basically they just the source image and stretch and skew it, something that you can easily do in SB with strips of sprites.
(Each sprite would be 1 pixel wide but I made them larger in this image so it's easier to see)
Basically you just stretch the sprites, and move the strips up and down, to simulate a 3D effect.
EDIT:
[url=https://www.youtube.com/watch?v=3y6gQRDDBLg]https://www.youtube.com/watch?v=3y6gQRDDBLg[/url]
This took a few minutes to write
Posted 3 months ago
Edited 3 months ago
by 12Me21

#8✎ 98seggiepantsI've been hoodwinked! I could have sworn they said 3D games on their website, so I assumed that was what was going on.
Here it is, you can find the 3D mention at: https://www.fuze.co.uk/nintendo-switch.html
FUZE4 Nintendo Switch
Easy to learn text based programming language
​No coding experience required
​Create your own apps and fast 2D / 3D games
​Access Joycon sensors and controls directly in your programs
​Use the Dock to show your games on your TV to share with friends and family
​Programmable synthesizer & Speech engine
​Use the included game graphics & audio or create your own
​​Extra content packs will be available to download
Use a USB keyboard, the FUZE touch keyboard or the Joycons to enter your code
Learn to code​
So I think there will be 3D support. In fact the comments links to these pictures.
So, yeah, looks like the YouTube link is bad but I still think there will be some sort of 3D support.
Posted 3 months ago

#9✎ 24DevinF06Intermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthVideo GamesI like to play video games!HobbiesThere could be a way, but it would need:
- Lots of memory
- And a long time
What I'm saying is: Pre-rendering
Posted 3 months ago