Author Topic: Fail on two examples in 0.9.8  (Read 326 times)

0 Members and 1 Guest are viewing this topic.

Offline jepalza

  • Friends
  • Gentleman (Lady)
  • *
  • Posts: 42
  • Reputation 5
  • 3D Crazy
Fail on two examples in 0.9.8
« on: May 31, 2016, 07:27:58 AM »
Hello:

in version 0.9.8 , example "05_BSPMap_screen", says
wAddZipFile( "E:\WS3D\Maps\ru.ws.q3df.org/kairos-catacombs.pk3", wIGNORE_CASE, wIGNORE_PATHS )
but it's must be
wAddZipFile( "../media/bspmaps/map-20kdm2.pk3", wIGNORE_CASE, wIGNORE_PATHS )

and example "118_BSP_Map_with_Parallax_Mapping" doesn't run in my PC, it's hungs up

Offline Nikolas - WS3D Developer

  • Programmer
  • Global Moderator
  • Viscount
  • *
  • Posts: 642
  • Reputation 45
Re: Fail on two examples in 0.9.8
« Reply #1 on: May 31, 2016, 08:19:21 AM »
Hi, Jepalza.
File 05_BSPMap_screen.bas you need to remove. You need to Run 05_BSPMap.bas.

Example 118 will check and try to fix.
Под лежачий камень мы всегда успеем...

Offline Alec - WS3D Developer

  • Producer
  • Administrator
  • Viscount
  • *
  • Posts: 796
  • Reputation 30
  • Game making is my hobby for life!
Re: Fail on two examples in 0.9.8
« Reply #2 on: May 31, 2016, 09:07:01 AM »
Sorry, this is my fault. There shouldn't be this bas file (05_BSPMap_screen.bas) in release archive file.  :(
WorldSim3D = 3D + FreeBasic. Программируй в удовольствие, а не "в тягость"! Make your project with pleasure, not with strain!

Offline jepalza

  • Friends
  • Gentleman (Lady)
  • *
  • Posts: 42
  • Reputation 5
  • 3D Crazy
Re: Fail on two examples in 0.9.8
« Reply #3 on: May 31, 2016, 09:51:07 AM »
ok.

Example 118 , did try to locate fail in my pc, this afternoon.

Offline jepalza

  • Friends
  • Gentleman (Lady)
  • *
  • Posts: 42
  • Reputation 5
  • 3D Crazy
Re: Fail on two examples in 0.9.8
« Reply #4 on: May 31, 2016, 07:35:09 PM »
Ok, tha fail is command inn line  "wTextureSetBlur(ttt,blurFactor)" (see attached code)

It's VERY SLOW (at least, in my PC, one I7 3.5ghz with Nvidia GTX970), it's needs about three minutes to start example.
Loop from 0 to iCount-1 it's very, very slow, with "wTextureSetBlur" running, but, without it, is medium fast, but result is worst.

Code: [Select]
For j=0 To iCount-1
buf=wGetMeshBuffer(mesh,0,j)
mat=wGetMeshBufferMaterial(buf)
For k=1 To MAX_TEX_COUNT-1
Dim As UInteger _Width,_Height,_Pitch,_ColorFormat
Dim As wTexture ttt2=wMaterialGetTexture(mat,0)
If ttt2<>0 Then
Dim As String tName=*wGetTextureName(ttt2)
Dim As wTexture ttt=wCopyTexture(ttt2,tName)
If ttt<>0 Then
If isDebug=1 Then
Print "TextureName= "+*wGetTextureName(ttt2)
MkDir "Textures_debug"
wSaveTexture(ttt,"Textures_debug/"+*wGetTextureName(ttt2))
endif
wTextureSetGray(ttt)
wTextureSetBrightness(ttt,brightFactor)
'wTextureSetBlur(ttt,blurFactor)
wTextureSetContrast(ttt,contrastFactor)
'wTextureSetAlpha(ttt,0)
If isDebug=1 Then
MkDir "HeightMap_debug"
Dim As String HMapName=Left(*wGetTextureName(ttt2),Len(*wGetTextureName(ttt2))-4)+"_heightmap."+Right(*wGetTextureName(ttt2),3)
wSaveTexture(ttt,"HeightMap_debug/"+HMapName)
EndIf
wMakeNormalMapTexture(ttt,amplitude)

wMaterialSetTexture(mat,k,ttt)
If isDebug=1 Then
MkDir "Normals_debug"
Dim As String NormalName=Left(*wGetTextureName(ttt2),Len(*wGetTextureName(ttt2))-4)+"_normal."+Right(*wGetTextureName(ttt2),3)
wSaveTexture(ttt,"Normals_debug/"+NormalName)
EndIf
EndIf
'wTextureSetAlpha(ttt2,0)
endif
next
wMaterialSetMaterialTypeParam(mat,matParam)
wSetMaterialType(mat,matType)
print j
next
« Last Edit: May 31, 2016, 07:46:53 PM by jepalza »

Offline Nikolas - WS3D Developer

  • Programmer
  • Global Moderator
  • Viscount
  • *
  • Posts: 642
  • Reputation 45
Re: Fail on two examples in 0.9.8
« Reply #5 on: June 01, 2016, 07:03:33 PM »
In this example, a bug discovered
Под лежачий камень мы всегда успеем...