I have been having some problems trying to identify individual faces of a model I created within UU3D, to update the sides of a cube programmitically within B3D.
I suspected that my file maybe was not being saved/exported properly from UU3D. I used the following code to analyse my .b3d file, the only child entities returned were:
ROOT_UU3D
The file in question has had individual groups assigned to each side on the model within B3D, i.e. under the Groups expander I have Box, front, back, side1, side2, top and bottom.
[LAST...EDIT] solved now.... big thankyou to Ross for his help - see post #9 scroll down a bit to see the cuboids with various (albeit unimaginative) images applied via code.

[EDIT] - resolved this......:Why can't I see these as child entities using the code below and I only see ROOT_UU3D ?
[EDIT] seem to have resolved it by saving as B3D extension with multiple textures option selected. I now am getting the child entities.
How can I apply an image to one of the child entities identified upon loading - thanks.
, trying to use the following somehow:
This may depend on your model - and how you designed each face and named them.
You can 'face=FindChild(entity,"face name")' - then texture each face.
I suspected that my file maybe was not being saved/exported properly from UU3D. I used the following code to analyse my .b3d file, the only child entities returned were:
ROOT_UU3D
The file in question has had individual groups assigned to each side on the model within B3D, i.e. under the Groups expander I have Box, front, back, side1, side2, top and bottom.
[LAST...EDIT] solved now.... big thankyou to Ross for his help - see post #9 scroll down a bit to see the cuboids with various (albeit unimaginative) images applied via code.

[EDIT] - resolved this......:Why can't I see these as child entities using the code below and I only see ROOT_UU3D ?
[EDIT] seem to have resolved it by saving as B3D extension with multiple textures option selected. I now am getting the child entities.
How can I apply an image to one of the child entities identified upon loading - thanks.
, trying to use the following somehow:
This may depend on your model - and how you designed each face and named them.
You can 'face=FindChild(entity,"face name")' - then texture each face.
;--- attempt To paint different sides of a box with different images ---- ;--- v4 attempt to apply images to sides of a model ;--- end versions Graphics3D 640,480,0,2 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,2,-5 ;filepath$=("C:/first_b3d_boxv2.b3d") filepath$=("H:TORTOISEtop_level_tort_check_ootskiUltimateUnwrapProjectstry_b3d.b3d") Global mesh_with_children = LoadAnimMesh( filepath$ ) OutputChildNames( mesh_with_children ) WaitKey Print "Press any key" ;End ;--- Function OutputChildNames( entity ) Local i, count Print EntityName( entity ) count = CountChildren( entity ) For i = 1 To count OutputChildNames( GetChild( entity, i ) ) Next End Function light=CreateLight() ;RotateEntity light,90,0,0 RotateEntity light,90,45,45 ; My Load mesh ------------- old_box_3d=LoadAnimMesh("C:/first_b3d_boxv2.b3d") Global box_3d=LoadAnimMesh("H:TORTOISEtop_level_tort_check_ootskiUltimateUnwrapProjectstry_b3d.b3d") ; Load the Exported Texture: textture =LoadTexture("H:TORTOISEtop_level_tort_check_ootskiUltimateUnwrapProjectsbox_export_uv_map_try1_bmp.bmp") brush_top = CreateBrush() brush_side = CreateBrush() brush_front = CreateBrush() brush_bottom = CreateBrush() ; ;source textures for applying to the top/side and bottom of the box tex_top=LoadTexture( "c:top_box_200_x_80.png") tex_side=LoadTexture("c:side_80_x_300.png" ) tex_bottom=LoadTexture("c:bot_box_200_x_80.png" ) tex_front=LoadTexture( "c:200_by_300.png" ) ;brush=CreateBrush() BrushTexture brush_top,tex_top,0,0 BrushTexture brush_side,tex_side,0,0 BrushTexture brush_front,tex_front,0,0 BrushTexture brush_bottom,tex_bottom,0,1 top_box=FindChild(mesh_with_children,"top") bottom_box=FindChild(mesh_with_children,"bottom") WaitKey brush_all = CreateBrush() BrushTexture brush_all,textture,0,0 ;PaintSurface GetSurface( mesh_with_children, 1 ) , brush_all ; ERROR: Surface out of range ;PaintSurface GetSurface( box_3d, top_box ) ,brush_top ; ERROR: Surface index out of range PaintSurface GetSurface( old_box_3d, 1 ) ,brush_all ; this works, due to not being exported as multiple layers, ; hence ability to apply brush_all to the only Surface ;now modify the mesh_with_children top image ;BrushTexture brush_top,top_box,0,0 ; ERROR texture does not exist despite brush_top ; and top_box being assigned vars.. ;now modify the mesh_with_children bottom image ;BrushTexture brush_bottom,bottom_box,0,0 ; ERROR texture does not exist despite brush_bottom ; and bottom_box being assigned vars.. PositionEntity box_3d,0,0,MeshDepth(box_3d)*2 PositionEntity mesh_with_children,0,0,MeshDepth(mesh_with_children)*2 While Not KeyDown( 1 ) If KeyDown( 205 )=True Then TurnEntity camera,0,-1,0 If KeyDown( 203 )=True Then TurnEntity camera,0,1,0 If KeyDown( 208 )=True Then MoveEntity camera,0,0,-0.05 If KeyDown( 200 )=True Then MoveEntity camera,0,0,0.05 ;move camera up and down If KeyDown( 30 )=True Then MoveEntity camera,0,1,0 ;a If KeyDown( 44 )=True Then MoveEntity camera,0,-1,0 ;z ; Change rotation values depending on the key pressed ;If KeyDown( 208 )=True Then pitch#=pitch#-1 ;If KeyDown( 200 )=True Then pitch#=pitch#+1 If KeyDown( 49 )=True Then yaw#=yaw#-1 If KeyDown( 50 )=True Then yaw#=yaw#+1 ;If KeyDown( 45 )=True Then roll#=roll#-1 ;If KeyDown( 44 )=True Then roll#=roll#+1 ; Rotate cone using rotation values RotateEntity box_3d,pitch#,yaw#,roll# RotateEntity mesh_with_children,pitch#,yaw#,roll# RenderWorld Text 0,0,"Use cursor keys to move about" Text 0,20,"Use a/z for camera up/down" Text 0,40,"Use m/n for rotate the box" Flip Wend End