if you want to texture a face differenly as an example the ground with different texture: example
1-unzip the desert.zip
2-change the name of
MRAMOR6X6.jpg from textures folder to
desert07_DN.jpg and resize it like the original 512X512
3- copy it to the unziped desert.zip
4-make an empty zip file, and drag all the 6 jpg files to that empty zip file.
now when you run a code using
SkyBox("desert07.jpg")
it will search for the desert.zip file and will display what it have together with your change, surely it has an algorithm for that.
try this rotating cube you have previously posted with the skybox after applying the described procedure above.
you will see the down picture different, change all the other pictures if you want, but preferably the pictures must reflect a true appearance a true continous topography.
Code: Select all
IncludeFile "Screen3DRequester.pb"
Enumeration
#MyMesh
#MyMatl
#MyEnt
#MyNode
#MyCamera
#MyLight
EndEnumeration
#CameraSpeed = 2
NewList sgListPts.s()
sgDelim.s = Chr(44)
igFaceCnt.i = 0
Define iKeyX.i, iKeyY.i, iMouseX.i, iMouseY.i
If InitEngine3D()
InitSprite()
InitKeyboard()
InitMouse()
Add3DArchive("Data\Scripts", #PB_3DArchive_FileSystem)
Add3DArchive("Data\Textures", #PB_3DArchive_FileSystem)
Add3DArchive("Data/Packs/skybox.zip", #PB_3DArchive_Zip)
Add3DArchive("Data/Packs/desert.zip", #PB_3DArchive_Zip)
Parse3DScripts()
If Screen3DRequester()
AmbientColor(RGB(255,255,255))
GetScriptMaterial(#MyMatl, "Template/TransparentTexture")
MaterialCullingMode(#MyMatl, #PB_Material_NoCulling)
CreateMesh(#MyMesh, #PB_Mesh_TriangleList, #PB_Mesh_Static)
FirstElement(sgListPts())
i = 0
SkyBox("desert07.jpg")
CreateCube(#MyEnt,60)
CreateEntity(#MyEnt,MeshID(#MyEnt), #PB_Material_None,0,0,0)
;Camera
CreateCamera(#MyCamera, 0, 0, 100, 100)
MoveCamera(#MyCamera,0,200,350, #PB_Absolute)
CameraLookAt(#MyCamera, EntityX(#MyEnt), EntityY(#MyEnt), EntityZ(#MyEnt))
CameraFixedYawAxis(#MyCamera, #True, 0, 1, 0)
CameraBackColor(#MyCamera, RGB(35, 35, 35))
;node
node = CreateNode(#PB_Any, 0,0,0)
AttachNodeObject(node, CameraID(#MyCamera))
;Light
CreateLight(#MyLight, RGB(255, 255, 255), 20, 150, 120)
AmbientColor(RGB(255, 255, 255))
Repeat
Screen3DEvents()
If ExamineKeyboard()
If KeyboardPushed(#PB_Key_Left)
iKeyX = -#CameraSpeed
ElseIf KeyboardPushed(#PB_Key_Right)
iKeyX = #CameraSpeed
Else
iKeyX = 0
EndIf
If KeyboardPushed(#PB_Key_Up)
iKeyY = -#CameraSpeed
ElseIf KeyboardPushed(#PB_Key_Down)
iKeyY = #CameraSpeed
Else
iKeyY = 0
EndIf
EndIf
If ExamineMouse()
iMouseX = -(MouseDeltaX()/10)
iMouseY = -(MouseDeltaY()/10)
EndIf
RotateNode(node, 0, -0.4, 0, #PB_Relative)
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
EndIf
EndIf
End