Author Topic: Loading Shaders and objects from BSP (beta)  (Read 1656 times)

0 Members and 1 Guest are viewing this topic.

Offline jepalza

  • Friends
  • Gentleman (Lady)
  • *
  • Posts: 42
  • Reputation 5
  • 3D Crazy
Re: Loading Shaders and objects from BSP (beta)
« Reply #15 on: November 06, 2015, 06:16:13 PM »
Ok, understand you, but: all of this is made on worldsim3d engine (future)? or this work is for make on my own code? :-X

Offline Nikolas - WS3D Developer

  • Programmer
  • Global Moderator
  • Viscount
  • *
  • Posts: 719
  • Reputation 49
Re: Loading Shaders and objects from BSP (beta)
« Reply #16 on: November 06, 2015, 06:27:51 PM »
I will try to make in addition to automatic loading Shader "manually". This allows you to work with Shader nodes selectively. In version 0.9.6 will be submitted to the test version (and earlier).
Под лежачий камень мы всегда успеем...

Offline Nikolas - WS3D Developer

  • Programmer
  • Global Moderator
  • Viscount
  • *
  • Posts: 719
  • Reputation 49
Re: Loading Shaders and objects from BSP (beta)
« Reply #17 on: November 09, 2015, 06:49:49 PM »
At the moment still could do a manual download of quake3 shaders as follows. However, the problem of collisions is not solved. (!NEW FUNCTIONS!)
Code: [Select]
Dim k As Integer
For k=0 To  wGetQ3ShaderCount(BSPmesh)-1
Dim As UInteger shaderIndex=wGetQ3ShaderIndex(BSPMesh,k)
Dim As UInteger Ptr shader=wGetQ3Shader(BSPMesh,shaderIndex)
Dim As String shaderName=GetNoPathName(*wGetQ3ShaderName(shader))
Print "Q3Shader_Name: "+shaderName
Dim As wMeshBuffer buf=wGetQ3ShaderMeshBuffer(BSPMesh,k)
Dim As wNode node=wCreateQ3ShaderNode(buf,shader)
Next
BSPNode = wAddQ3LevelToScene(BSPMesh,0,"",0,0
This (last) parameter: 0- not to load the shaders, 1- load shaders

I was able to create a method of combining meshbuffers, but I can't I combine the effect Shader on ALL new meshbuffer :(
===================
This method can be used if you want to load shaders, NOT ALL, but selectively.
« Last Edit: November 09, 2015, 07:02:21 PM by nikolas »
Под лежачий камень мы всегда успеем...

Offline Nikolas - WS3D Developer

  • Programmer
  • Global Moderator
  • Viscount
  • *
  • Posts: 719
  • Reputation 49
Re: Loading Shaders and objects from BSP (beta)
« Reply #18 on: November 09, 2015, 07:04:54 PM »
Made a lot of new features for working with meshbuffers, there are no results yet.
Code: [Select]
Declare Function wCreateEmptyMeshBuffer()As wMeshBuffer

Declare Function wCreateEmptyMeshBufferLightMap()As wMeshBuffer

Declare Sub wRemoveMeshBuffer(ByVal buffer As wMeshBuffer)

Declare sub wMeshBufferLightMapSetMaterial(ByVal buffer As wMeshBuffer,ByVal  mat As wMaterial)

Declare sub wAddMeshBufferToMesh(_
ByVal mesh As wMesh,_
byval buffer As wMeshBuffer,_
byval isDropOriginal As Integer=1)

Declare Function wMeshBufferMerge(_
byval dest As wMeshBuffer,_
byval source As wMeshBuffer,_
byval isDropSource As integer=0)As wMeshBuffer

Declare function wMeshBufferCopy(_
byval source As wMeshBuffer,_
byval isDropSource As integer=0)As wMeshBuffer

Declare Function wMeshBufferLightMapMerge(_
Byval dest As wMeshBuffer,_
byval source As wMeshBuffer,_
byval isDropSource As integer=0)As wMeshBuffer

Declare function wMeshBufferLightMapCopy(_
byval source As wMeshBuffer,_
byval isDropSource As integer=0)As wMeshBuffer

Declare function wMeshCopy2(_   'for static meshes!!!
byval source As wMesh,_
byval isDropSource As integer=1)As wMesh
I don't understand how to combine the work of several q3 shaders in one....
« Last Edit: November 09, 2015, 07:07:14 PM by nikolas »
Под лежачий камень мы всегда успеем...

Offline jepalza

  • Friends
  • Gentleman (Lady)
  • *
  • Posts: 42
  • Reputation 5
  • 3D Crazy
Re: Loading Shaders and objects from BSP (beta)
« Reply #19 on: November 09, 2015, 11:58:59 PM »
and searching on web for shaders manuals, don't help you?
Maybe this:
https://graphics.stanford.edu/courses/cs448-00-spring/q3ashader_manual.pdf

Or looking Quake 3 arena code:
https://github.com/id-Software/Quake-III-Arena

I don't help you in any about engine, because the code is only yours.

This weekend goes to stude it in order to get any idea. (if can)