at first the project in witch a plane prepared and textured by Sculptris, then converted by OgreAssimpConverter (download it from Ogre tools/3D Programming section) to *.mesh then used by a purebasic program
here is the project and the purebasic code to display the result
http://www.mediafire.com/?zz5gj90cz5vqqao

may be Lexicon means like this in his post here http://www.purebasic.fr/english/viewtop ... 36&t=55816
Code: Select all
Enumeration
#MESH = 100
#MAT
#plane
#LIGHT
#CAMERA
#mainwin
#ball
EndEnumeration
Global Quit.b = #False
ExamineDesktops()
OpenWindow(#mainwin, 0, 0, DesktopWidth(0), DesktopHeight(0), "multi textures", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
;Initialize environment
InitEngine3D()
InitSprite()
InitKeyboard()
OpenWindowedScreen(WindowID(#mainwin), 0, 0, DesktopWidth(0), DesktopHeight(0)-50, 0, 0, 0)
WorldShadows(#PB_Shadow_Modulative)
EnableWorldPhysics(#True)
EnableWorldCollisions(#True)
SetFrameRate(60)
Add3DArchive(".", #PB_3DArchive_FileSystem)
Add3DArchive(#PB_Compiler_Home + "Examples/3D/Data/Textures", #PB_3DArchive_FileSystem)
Parse3DScripts()
LoadMesh(#plane, "plane_obj.mesh")
CreateEntity (#plane, MeshID(#plane), #PB_Material_None )
ScaleEntity(#plane,4,1,4)
EntityPhysicBody(#plane, #PB_Entity_StaticBody )
;SkyDome("clouds.jpg", 80)
; create white texture
CreateTexture(7,16,16)
StartDrawing(TextureOutput(7))
Box(0, 0, 16, 16,RGB(0,255,0))
StopDrawing()
CreateMaterial(7, TextureID(7))
DisableMaterialLighting(7, #True)
CreateCube(#ball,0.5)
CreateEntity(#ball, MeshID(#ball), MaterialID(7),-2 ,5, 2)
;ScaleEntity(#ball,0.5,0.5,0.5)
;CreateLight(0,RGB(255,255,255),-100,40,30)
CreateLight(0,RGB(255,255,255),0,40,10)
AmbientColor(RGB(100,100,100))
EntityPhysicBody(#ball, #PB_Entity_BoxBody ,1,0,0.2)
CreateCamera(#CAMERA, 0, 0, 400, 400)
MoveCamera(#CAMERA, 0, 4, 12)
CameraLookAt(#CAMERA, 0, 2, 0)
RotateCamera(#CAMERA, -15, 0, 0)
;WorldGravity(-2) ; less than normal gravity -9.8
rot.l=1
;Main loop
Repeat
ExamineKeyboard()
Event = WindowEvent()
If KeyboardPushed(#PB_Key_Up)
xxx.f+1
RotateEntity(#plane, xxx,0,0)
ElseIf KeyboardPushed(#PB_Key_Down)
xxx.f-1
RotateEntity(#plane, xxx,0,0)
EndIf
x.f + rot
RenderWorld()
FlipBuffers()
Until KeyboardReleased(#PB_Key_Escape) Or Event = #PB_Event_CloseWindow
http://pixologic.com/sculptris/
run Sculptris, click on new Plane, new scene. a default plane will created, click on symmetry button (to disable it)

now you can rotate the plane by right mouse button
when you orient the plane just click on it to make hills and every click will make it bigger.

now click on Paint button at the top right then ok,
click on show advanced tools (look below)

enable texture button and disable brush (look above)
now click on the texture button and then click on New
now open the texture file , and it will be added to the list
click again on new and open another texture, and so on

now click on save set, after finish click cancel to return to main progtam
now you can paint the texture which appears on the texture button, you can choose another textures
when you finish click on save texmap (the button are there if you previously clicked on show advanced tools), also save normal, and save bumps
now click on export to obj. and we finish the task

============================
now you have something like plane.obj + texmap.png.
create a file called plane.mtl and write in it the following
Code: Select all
newmtl defaultMat
map_Kd texmap.pngCode: Select all
mtllib plane.mtl
usemtl defaultMatfrom the command prompt write OgreAssimpConverter plane.obj
now there is a new plane_obj.mesh and plane_obj.material . change the characteristic of plane_obj.material as you want such as adding
cull_hardware none
cull_software none
to see the plane bottom
this procedure of manipulating the obj files i have found myself, but it is there in the web here http://blog.sculpteo.com/2010/08/06/tut ... ee-points/
http://www.drpetter.se/project_sculpt.html
http://www.photosculpt.net/dump/2010/11 ... -zbru.html

