to use a points wich have the dimension of 20 ( I think it is 20 X 20 not sure)
save the following material script to Examples\3D\Data\Scripts :
Points20.material :
Code: Select all
material def_Points_20
{
receive_shadows off
technique
{
pass
{
point_size 20
lighting off
diffuse vertexcolour
}
}
}
Code: Select all
Enumeration
#MESH
#LIGHT
#CAMERA_ONE
#BUTTON
#mainwin
EndEnumeration
Quit.b = #False
ExamineDesktops()
If OpenWindow(#mainwin, 0, 0, DesktopWidth(0), DesktopHeight(0), " Big Points", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
;Initialize environment
InitEngine3D()
InitSprite()
OpenWindowedScreen(WindowID(#mainwin), 0, 0, DesktopWidth(0), DesktopHeight(0)-70, 0, 0, 0)
WorldShadows(#PB_Shadow_Additive)
InitKeyboard()
SetFrameRate(60)
Add3DArchive("Data/Textures", #PB_3DArchive_FileSystem)
Add3DArchive("Data/Scripts", #PB_3DArchive_FileSystem)
Parse3DScripts()
CreateLight(0,RGB(255,255,255),-100,40,30)
AmbientColor(RGB(100,100,100))
CreateCamera(#CAMERA_ONE, 0, 0, 400, 400)
MoveCamera(#CAMERA_ONE, 0, 4, 9)
CameraLookAt(#CAMERA_ONE, 0, 2, 0)
RotateCamera(#CAMERA_ONE, -15, 0, 0)
EndIf
CreateMesh(1, #PB_Mesh_PointList, #PB_Mesh_Dynamic )
;CreateMesh(1, #PB_Mesh_PointList, #False)
GetScriptMaterial(0, "def_Points_20")
SetMeshMaterial(1, MaterialID(0))
DisableMaterialLighting(0, #True)
Global Stars = CreateNode(#PB_Any)
AttachNodeObject(Stars, MeshID(1))
MeshVertexPosition(-0.175999999,0.0016000271,0.1156001091)
MeshVertexColor(RGB(0,255,0))
MeshVertexPosition(-0.4800000191,0.0239999294,-0.4963999987)
MeshVertexColor(RGB(255,255,0))
MeshVertexPosition(0.0624001026,-0.5196000338,-0.1699999571)
MeshVertexColor(RGB(255,0,0))
MeshVertexPosition(-0.1563999653,0.4960000515,-0.9924000502)
MeshVertexColor(RGB(0,255,0))
FinishMesh(#False)
NormalizeMesh(1)
;Main loop
Repeat
Event = WindowEvent()
y + 1
RotateNode(Stars, x, y, z)
RenderWorld()
FlipBuffers()
ExamineKeyboard()
Until Quit = #True Or Event = #PB_Event_CloseWindow

there is also possible to texture the big point (point sprite) by adding point_sprites on to the material script file and assigning a texture to it
the material script in this case can be like this:
Code: Select all
material PointsSprites
{
technique
{
pass
{
cull_hardware none
cull_software none
scene_blend alpha_blend
lighting off
diffuse 1 1 1 1
ambient 1 1 1 1
specular 1 1 1 1
emissive 1 1 1 1
point_sprites on
point_size 20
//point_size_min 2.0
//point_size_max 256.0
depth_write off
depth_check on
depth_func less_equal
//point_size_attenuation on 1.0 0.0 3.5
texture_unit
{
filtering anisotropic
max_anisotropy 16
texture flare.png
}
}
}
}
http://www.purebasic.fr/english/viewtop ... 36&t=53605
i have refered there also to your example about point sprites in MP3D. i have to study it.