GLScene/ko

From Free Pascal wiki
Jump to navigationJump to search

Deutsch (de) English (en) français (fr) Bahasa Indonesia (id) 日本語 (ja) 한국어 (ko) português (pt) русский (ru) 中文(中国大陆)‎ (zh_CN)

GLScene에 대하여

GLScene는에 기반한 3D 라이브러리이다. 초기에는 델파이용으로 작성 되었으나 이제 C++ Builder, Kylix, Delphi 밍 Lazarus에서 돌아간다.

주요한 특징들은 :

장면(scene) 설명

  • 메모리가 허용하는 한 많은 객체를 가지고 쉽게 확장할 수 있는 계층적인 객체구조
  • 대화형 장면 관리(많은 델파이 전문가)
  • 각 객체에 대해 회전과 이동 함수를 쉽게 사용가능
  • 사전 정의된 객체(큐브에서 주전자, 스프라이트 까지 모두 표준), 쉽게 확장할 수 있는
  • 복잡한 객체를 관리하기 위한 구조적인 객체(더비 큐브, 프록시 객체)
  • 절차적인 객체(어떤 곳에서도 사용가능한 카메라와 라이트 객체
  • 행동(behavoior) 객체는 애니메이션을위한 객체에 부착할 수 있으면 쉽게 확장가능하다.
  • 객체 각각에 특수 효과(객체 렌저링 전/후와 장면 후 효과) 부여가능하고 *확장가능
  • 파티클(particle) 시스템heightfield, 회전 솔리드, 파이프, tesselators...)
  • 완전히 통합된 2D와 1D 객체 지원(스프라이트, 스플라인을 지원하는 선)
  • HUD 객체(2D 좌표계에서 렌더링 된 스프라이트)
  • 유틸리티 객체(그리드, 스카이돔, 화살표...)
  • 직접 OpenGL에 접근 가능한 클래스 지원
  • 장면객체 계층이 있는 지원, 어떤 객체들이나 객체 구조라도 입자화 될 수 있다.
  • 3D Studio 파일 포맷을 자동으로 정밀한 노멀 벡터 계산으로 임포트 할 수 있고(*파일의 smoothing 그룹을 이용하여) 택스쳐 좌표를 임포트할 수 있다
  • 다른 포맷도 임포트 : OBJ/OBJF, SMD, MD2, STL, TIN, PLY

재질(Material)

  • 재질 객체를 사용하고 최적화하기 쉽다.
  • 공유하고 재질을 재 사용할 수 있는 material 라이브러리
  • ambient, diffuse, emission, specular 및 shininess 지원
  • 블렌딩 모드 지원 (transparency, additive...)
  • 알파채널 자동 생성
  • OpenGL 텍스쳐 포맷 지원, 압축된 것도 (DXT, S3TC 등등.)
  • generic plug-in shaders 지원
  • 고수준의 Cg 세이더 지원 클래스
  • 텍스쳐를 위한 다형 이미지 지원 (절차적인 텍스쳐 뿐만 아니라 많은 포맷 지원), 쉽게 확장 가능
  • clrCornflowerBlue 또는 clrCoolCopper 같은 150개 이상의 사전 정의된 색상 *표준 색상과 직접적인 RGBA 멩세 뿐아니라
  • 텍스쳐 좌표에 독립적으로 텍스쳐 이동과 스케일링 성질을 사용하기 쉽다.
  • 32 비트 Bitmap 지원 클래스

렌더링

  • 가능하다면 하드웨어 OpenGL 드라이버를 자동적으로 사용
  • 촛점거리와 타게팅을 사용한 잘 동작하는 카메라 모델
  • 한개 이상의 장면을 위한 다중 뷰어, 카메라 선택을 통해 쉽개 뷰를 바꿀 수 있다.
  • fog와 depth-of-view 지원
  • 파일, 비트맵에 렌더링 하거나 어떤 색상과 픽셀 해상도로 프린터에 렌더링 가능
  • 동적인 해상도 변화화 함께 풀 스크린 지원
  • 반사와 미러 효과
  • 동적 새도우 캐스팅
  • 고성능의 장면 전체에 걸친 투명 입자 시스템 지원
  • 자동 frustrum culling (계층적으로 또는 객체 마다)

애니메이션

  • 시간 진행 사건에 따른 증식(propagation)
  • 골격 애니메이션 (버텍스당 다중 골격)
  • 프레임 내삽(interpolation) 과 모프 타겟
  • 쉽게 확장가능한 Behaviours
  • 동적 물리학 : inertia, acceleration, damping 및 force application
  • 자동 실시간 장면 cadenceing

인터페이스

  • 선택된 객체를 결정하는 사용하기 쉬운 함수
  • 카메라 이동을 도와주는 도움 함수
  • 지정한 객체의 이동을 위한 도움 함수
  • 장면과 월드 좌표게, raycasting 간 전환을 위한 도움 함수

유티리티

  • 최적화 된 geometry 함수와 유틸리티 (vector, quaternion 및 matrix...)
  • 큐빅 스플라인 지원함수와 클래스
  • 메쉬 조작 및 최적화 (stripification, vertex-cache awareness, 등등.)
  • 몇번의 클릭으로 환전히 동작하는 스크린 세이버를 만들수 있는 컴포넌트
  • 정확한 프레임 스피트 지정
  • 비동기 타이머(멀티-쓰레드)
  • 조이스틱 지원
  • 비동기 키보드 접근, 키맵 지원

스크린 샷

Gl effect.jpg Gl cel.jpg Gl trinity.jpg
Gl ode.jpg

저자

저자: Mike Lischke가 처음 시작했고
지금은 Eric Grange가 유지하는 중
LCL Port: Christian Ulrich

Download

Latest (v1.0.0.2)

This should be almost identical to the original cvs repository of today in terms of functionality and bugfixes, however, there are still some parts missing. There wont be a "Lazarus-with-GLScene-Installer" with this new release, unless someone else creates it. --Crossbuilder 20:16, 18 July 2007 (CEST)

Outdated

An older release (version 0.9.1.6) can be found on the Lazarus CCR Files page together with a lazarus installer with GLScene already in the Lazarus IDE and GLScene demoes. UPDATE: This is pretty old now. If possible, use the svn checkout (see below).

SVN

you can checkout the actual source from
http://svn.freepascal.org/svn/fpcprojects/glscene/trunk/

The command would be:

svn co http://svn.freepascal.org/svn/fpcprojects/glscene/trunk glscene

This will download the trunk (main) repository to "glscene" dir to whereever you invoked the command from.

In windows you can use clients like tortoise SVN and others.

Bug reporting

Bug Reporting/Featurerequest Please select Project "Packages" and Category "glscene" for your reports. Thanks.

Change Log

  • 18.07.2007 Snapshot release version 1.0.0.2
    • adjusted some things, so it works with latest lazarus svn version
    • added object bitmaps for the SceneEditor
    • fixed another AV in SceneEditor
    • incorporated all patches and bugfixes from original glscene cvs repo like dynamic textures ..
  • 13.06.2007 Snapshot release version 1.0.0.1
    • incorporated all patches and bugfixes from original glscene cvs repo
    • improved scene editor (crashes less, but still needs some love)
      Tip: Save your project frequently ;-)
    • seperated mmsystem dependent stuff from generic sound support so e.g. FMOD is available in linux, too
    • many more ..
  • 01.12.06 Added support for ODE, gtk2 and Cg shaders in Linux (ODE is limited to normal release, unsupported are cone, ccylinder and terrains)
  • 10.08.05 Too many changes to post here see cvs history
  • 16.07.05 GLScene 0.9.X Port
  • look at GLScene Sourceforge Account for complete Changelog

Status: Beta

Installation version 1.0.0.2

Requires fpc 2.1.4 or greater and lazarus 0.9.23 rev. 11348 or greater !!

  • extracting the sources
    • ZIP:
      • in "lazarus/components/" folder execute "unzip glscene-1.0.0.2.zip"
        This will create the lazarus/components/glscene/ folder
    • SVN:
      • in "lazarus/components/" folder execute
        svn co http://svn.freepascal.org/svn/fpcprojects/glscene/trunk glscene
        This will create the lazarus/componets/glscene/ folder
      • Tortoise SVN: add the folder "glscene" manually so you have lazarus/components/glscene. Then right-click onto new folder and choose "SVN Checkout...". At field "URL of repository" add
        http://svn.freepascal.org/svn/fpcprojects/glscene/trunk
        Confirm by "OK".


  • Finish the installation:
    • copy "lazarus/components/glscene/globallinks/*.lpl" to "lazarus/packager/globallinks/"
    • start lazarus
    • select "Configure installed packages ..." from the "Components" menu
    • select "glscenelazarus" from the "Available packages" list
    • click "Install selection" button
    • click "Save and rebuild IDE" button
      • ATTENTION: There may occur an error that package "jpegforlazarus" is not found. If so do the following:
      • Components --> Open loaded package...
      • Choose "glscenelazarus" (Version 1.0.0.3) and click "Open..."
      • In the following list go down to "Required Packages" and remove dependency from "jpegfromlazarus".
      • Look for unit "jpeg" in folder /lazarus/components/glscene/Source/base and replace "LazJPEG" (in uses clause) by "LazJPG" (from package ImagesForLazarus).
      • Save and repeat last 4 steps again.
      • HINT: You should have installed package "ImagesForLazarus" (the same way as described for "glscenelazarus" package).
    • repeat the last 4 steps for the other packages you want to use.
      • Note: glsceneode and glscenecgshader need their respective libs on the system during installation!
    • Note: you can also try to select and install all packages in one go. However, I prefer to do things step by step, so I see where it fails, if it fails ;)
    • Install "glscenelazarus" - mistakes: (only needed when using glscene-1.0.0.2.zip, in svn these are already fixed)
      • To correct the unit GLLCLViewer: procedure TGLSceneViewer.CreateParams(var Params: TCreateParams); - at procedure TGLSceneViewerLCL.CreateParams(var Params: TCreateParams);
      • To correct the unit GLLCLViewer: procedure TGLSceneViewer.EraseBackground(DC: HDC); - at procedure TGLSceneViewerLCL.EraseBackground(DC: HDC);
      • To correct the unit GLLCLFullscreenViewer: Change "RegisterClasses([TGLSceneViewer, TGLFullScreenViewer]);" to "RegisterClasses([TGLFullScreenViewer]);"
  • List of packages:
    • glscenelazarus The main package.
    • glscenecgshader Cg Shader components
    • glsceneode ODE components
    • glss_fmodlaz FMOD component
    • gls_winonly Windows only, contains sound support over mmsystem, BASS support and GLScreenSaver component
  • Сompilation "demo" - mistakes:
    • If not found class - TGLSceneViewer: To correct the uses (demo): GLLCLViewer - at GLViewer

Installation version 0.9.6.1

  • Create the directory lazarus\components\GLScene
  • On this directory, unzip the files from the zip file
  • Open lazarus
  • Open the package glscenelazarus.lpk with Component/Open package file (.lpk) from lazarus\components\glscene\Lazarus
  • (Click on Compile is only necessary, if you don't want to install the component into the IDE)
  • Click on Install
  • Repeat these steps (open .lpk, click install) for the other packages you want to use. Note: these additional packages need additional libs (fmod, ode, Cg).
    • glscenecgshader.lpk : Cg shaders (only with NVidia cards?)
    • glsceneode.lpk : support for ode lib
    • glsss_fmodlaz.lpk : support for fmod lib
    • gls_winonly.lpk : this can be installed on windows only. Contains screensaver stuff as well as support for BASS lib.

Hint: sometimes an Error "GLGraphics not found" occurs. Don't worry, just do Tools->Build Lazarus again and it should be ok.

A full install of Lazarus with GLScene already in the IDE is available as binary win32 release or http://www.skinhat.com/lazarus

Just a warning for (new) Linux users: GLScene in its current state is not working "out of the box" (lots of modifications/additions needed). UPDATE: this is not true anymore. glscene for lazarus is pretty up-to-date and most things work good right out of the box for windows as well as for linux.

As of latest trunk version (see svn above) the linux version is working well. Some demos (about 20%) are still broken but the majority of glscene is now working. We're also moving towards making it work in other Unix platforms like FreeBSD.

The missing/nonworking parts on non-windows are: glKeyboard (uses winapi, but is not required mostly), glSound(which uses mm, we need to use openal or somesuch)

A fully featured windows installer is planned.

Help