UnderwareDesign
February 23, 2018, 06:11:10 PM *
News: PlayBASIC V1.65B _Retail Upgrade_ Now Available (23rd, June, 2017)
   Home    
Pages: [1]
 
Author Topic: 3D Textured Cube _ V2  (Read 121 times)
Member

« on: January 30, 2018, 12:40:43 AM »


hello

   i was looking at the example projects in the PlayBasic Learning Edition "Demo" folder, and had a look at the 3D Textured Cube project.
i started playing around with the settings and worked out a way to get even straighter 2D textures across 3D objects.
i made the texture bend to my will, like the dark side, and had fun doing it.

i made a downloadable demo including the textures(in case you haven't downloaded the demo pack yet). i modified a texture too, and also included this.

i made different settings you can adjust while the project is running, and these are listed at the bottom left of the screen.
i learned a lot from this project, so decided to share this. i hope you enjoy it too.

  stevmjon

3D_Textured_Cube v2.zip (45.81 KB - downloaded 2 times.)

3D Textured Cube_screenshot.png (303.6 KB, 1040x807 - viewed 11 times.)
Logged

re-starting my platform game from scratch...determined to release a demo!
...if i can stop playing 'Skyrim' that is. oh look, another game expansion. must download now.
Member
Development Team


WWW
« Reply #1 on: January 30, 2018, 10:37:27 PM »

 That's cool Steve,  was going to make a quick video about it last night, but things didn't go that way.. 

  I'm not sure why I didn't just subdivide the faces into an even grid,  which is how a lot morphing shapes done in old demo's.   Ideally I think having a system that pre-compute how the face is cut up before runtime, would be the way to go.   

Logged

Member

« Reply #2 on: February 06, 2018, 12:34:33 AM »

hey all

i decided to make some pics of a breakdown of the texture sub-divide, for people who don't want to reverse engineer the code.
you will notice that all the extra points that are calculated come from the original corner points of the polygon.

  hope you learn from this, or get new idea's.

  stevmjon

p.s. i am glad you like this kev, i have been thinking about this for a while now, and the original demo you made gave me idea's.



3D Textured Cube_setup 1.png (106.71 KB, 1040x807 - viewed 7 times.)

3D Textured Cube_setup 2.png (113.06 KB, 1040x807 - viewed 6 times.)

3D Textured Cube_setup 3.png (115.6 KB, 1040x807 - viewed 8 times.)
Logged

re-starting my platform game from scratch...determined to release a demo!
...if i can stop playing 'Skyrim' that is. oh look, another game expansion. must download now.
Member
Development Team


WWW
« Reply #3 on: February 08, 2018, 10:28:11 AM »

 Steve,  
      
      I think as along as the area of the sub-divided  face is about even then it should work well enough.  Ideally you'd build a few different versions of the each mesh so that when the object is near the camera, it's being presented with the higher polygon verion which would drop away as the view moves away  (LOD - Levels of detail).  Which is pretty standard to this day..  

      Moreover, when the object is far way it should use a mip mapped texture (a scaled / blurred version ) of the texture for the different different depths.    Smaller textures are quicker to render and reduce the pixel noise of objects far away.    You can turn on Bi-linear filtering is one of the terrain demos uses to hide the lake of perspective..   

  See the   PS3D - Simple 3D For PlayBasic V1.64 thread for some old examples



   



Logged

Member
Development Team


WWW
« Reply #4 on: February 13, 2018, 12:45:23 AM »

PlayBASIC LIVE: Steves Textured Cube Update and 3D Terrain (2018-02-13)

 Today we'll take a Steve's update to the texture mapped cube demo, the update looks at various methods for sub dividing the cube faces to make the texture mapping more perspectively appealing visually. After that, I look at the classic Terrain and particle demo's which can also be found in the PlayBASIC
learning edition project packs.

#texturemapping #3d #basic #perspective
 Music: http://www.bensound.com
 Home: http://PlayBASIC.com


Logged

Pages: [1]
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2009, Simple Machines LLC | Privacy Policy Valid XHTML 1.0! Valid CSS!