Giter Club home page Giter Club logo

woden's Introduction

WODEN Engine - World Dynamic Engine

A 3D graphics engine for Pharo

Requirements

3D Graphics Card

Woden communicates with the 3D graphics via the abstract-gpu abstraction layer.

Windows and Linux

Woden on Windows requires a modern graphics card with support for Vulkan.

OS X

Woden on OS X requires a Mac with support for the Metal API.

Loading Woden

Woden can be loaded in a 64 bits Pharo 9 image by running the following script in a playground:

Metacello new
   baseline: 'WodenEngine';
   repository: 'github://woden-engine/woden';
   load

Woden samples

For checking the Woden samples, you should check the class side of WDASceneExamples for some examples, or you can just run the following script for blue window:

model := WDAModel new.
model openWith: (WDASolidColorViewSample new color: Color blue)

Bug reporting

For bug reporting, use the GitHub issue tracker at the Woden repository https://github.com/woden-engine/woden

woden's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

woden's Issues

Removing object from scene doesn't remove renderables

Removing object from scene doesn't remove renderables.

Here's a sample scene with a single box added.

model := WDASampleSceneModel new.
scene := model newScene.
camera := model camera.
scene backgroundColor: Color blue muchLighter asWMVector4F.
camera translateByZ: 3.0.

cubeBuilder := WDCGenericMeshBuilder for: scene engine.
cubeBuilder addCubeWithWidth: 1.0 height: 1.0 depth: 1.0.

cube := WDSGSpatialObject new.
cube color: Color yellow.
cube renderable: cubeBuilder mesh.
scene add: cube.

view := WDAFPSSceneView new.
model openWith: view.

Once the scene is opened, try to remove cube. It will succeed, but it is still visible in the view. After a bit of debugging it seems the renderingRenderables is not cleaned.

self assert: [ scene normalLayer children includes: cube ].
self assert: [ scene normalLayer renderingRenderables size = 1 ].
scene remove: cube.
self assert: [ (scene normalLayer children includes: cube) not ].
self assert: [ scene normalLayer renderingRenderables size = 0 ].

I fixed it for myself by adding the cleanup:

WDSGNode>>removedFromScene: oldScene
	oldScene removeNodeWithPendingState: self.
	oldScene normalLayer removeRenderingRenderables: self renderingRenderables.
	scene := nil.
	children do: [ :child | child removedFromScene: oldScene ].

but I don't know if this is the proper place -- e.g. this wouldn't work if the element was in scene's backgroundLayer.

Maybe I am not creating/adding the cube correctly? The scene states "Rendered object count: 2", even though there is only one object.

VRDisplay feature is not supported on device ?

Hello,

When launching any example scene like the pool one using allowingVR, we still get the OSWindow view while we want it to be opened in the headset.

When looking a bit into the code, we can see that the FFI call isFeatureSupportedOnDevice returns false when passed AGPU_FEATURE_VRDISPLAY as a parameter. From there, we cannot see the AGPU library code to know how it decides if VR is supported or not since it's compiled.

We don't know why it thinks VR isn't supported but the headset is plugged in, and SteamVR is working since it's running in the background. We're using a laptop VR ready with an NVidia GeForce GTX 1070 GPU and we're running Debian 9.8.0.

If you need any further information, just ask. Thank you

Running any sample results in an exception

I'm running on a Linux Mint 20; 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I get he following exception;
image

This looks really promising ti would be nice to get it running. I there anything in particular I can do?

Cannot properly install on Mac

Using fresh 9.0 Stable or 10.0 Development images on Mac (Big Sur and Monterey on a 2017 MBP which supports Metal) I am unable to run the example program WDASolidColorViewSample listed in the main repo readme.

Clues:

  1. I did nothing special: New clean image, open a transcript, run the metacello command from the main repo readme in a playground.
  2. During install an error popup shows up in the bottom left but I am unable to click it fast enough to see what it was and the transcript doesnt show any errors.
  3. There are hundreds of what appear to be warnings in the transcript that say _____ is Undeclared
  4. When I run the WDASolidColorViewSample program listed in the main repo readme a blank black square graphics window appears and I get the following debugger: "Instance of WDAOSWindowViewWindow did not understand #renderTarget" and the new graphics window cannot be closed
  5. If I run the WDASolidColorViewSample program again it does not bring up a new window or a new debugger
  6. WDASceneExamples example01Cube. also opens a blank black square graphics window, but no error this time.
  7. Using 10.0 Development image I got the following error during installation that I didnt get using 9.0 "Warning: This package depends on the following classes: GLMBrickRenderer GLMBrick GLMStringBrick GLMInteractableBrickRenderer You must resolve these dependencies before you will be able to load these definitions: GLMBrick>>#buildChildrenSceneGraphNodeWith: GLMBrick>>#buildSceneGraphNodeWith: GLMBrick>>#onBuildSceneGraphNodeWith: GLMBrickRenderer>>#buildBackgroundColorSceneGraphNodeFor:in:with: GLMBrickRenderer>>#buildBackgroundColorSceneGraphNodeFor:with: GLMBrickRenderer>>#buildBorderSceneGraphNodeFor:with: GLMBrickRenderer>>#buildSceneGraphNodeFor:with: GLMBrickRenderer>>#buildShadowSceneGraphNodeFor:with: GLMInteractableBrickRenderer>>#buildColorSceneGraphNodeFor:with: GLMInteractableBrickRenderer>>#buildImageSceneGraphNodeFor:with: GLMInteractableBrickRenderer>>#buildSceneGraphNodeFor:with: GLMStringBrick>>#onBuildSceneGraphNodeWith: "self

Building on Windows not requiring Powershell

If one wants to build on Windows, there could be options:

  1. Use WSL when on Windows 10
  2. Use something like Babun to have a better cygwin and there is the pact package manager (an apt-get like thing). This can help in building lots of things.

I will try out the build under WSL.

Failed to open the AGPU device

In a clean Pharo 9 Image on Windows 10 I installed woden:
Metacello new baseline: 'WodenEngine'; repository: 'github://woden-engine/woden/tonel'; load
and than tried the given example:
|model| model := WDAModel new. model openWith: (WDASolidColorViewSample new color: Color blue)
I get the following error:
image

Cannot install on Pharo 9.0 virgin image

image
I opened Pharo 9.0 - 64bit image.
Executed
Metacello new
baseline: 'WodenEngine';
repository: 'github://woden-engine/woden';
load
I got the following error:
NotFound: revspec 'master' not found

Demo example issue

Hi, I tried to execute the demo from your presentation:

v := RWView new.

1 to: 20000 do: [ :i | v add: RWCube element ].

v camera translateByZ: 3.0.
RWCubeLayout on: v elements.

v addInteraction: RWMouseKeyControl .
v open .

It did work and created a window, but was non-interactive one. I also could not close it. After restarting the image and trying again - it crashes with this:

> sh woden.sh woden.image
pthread_setschedparam failed: Operation not permitted
This VM uses a separate heartbeat thread to update its internal clock
and handle events.  For best operation, this thread should run at a
higher priority, however the VM was unable to change the priority.  The
effect is that heavily loaded systems may experience some latency
issues.  If this occurs, please create the appropriate configuration
file in /etc/security/limits.d/ as shown below:

cat <<END | sudo tee /etc/security/limits.d/pharo.conf
*      hard    rtprio  2
*      soft    rtprio  2
END

and report to the pharo mailing list whether this improves behaviour.

You will need to log out and log back in for the limits to take effect.
For more information please see
https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/r3732#linux
OpenGL version 4.5 (Core Profile) Mesa 18.0.5
OpenGL vendor Intel Open Source Technology Center
GLSL version 4.50

Segmentation fault Fri Feb  1 08:50:40 2019


/home/maxim/apps/woden/pharo-vm/lib/pharo/5.0-201901051900/pharo
Pharo VM version: 5.0-201901051900  Sat Jan  5 19:12:50 UTC 2019 gcc 4.8 [Production Spur 64-bit VM]
Built from: CoInterpreter VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11 Jan  5 2019
With: StackToRegisterMappingCogit VMMaker.oscog-eem.2504 uuid: a00b0fad-c04c-47a6-8a11-5dbff110ac11 Jan  5 2019
Revision: VM: 201901051900 https://github.com/OpenSmalltalk/opensmalltalk-vm.git Date: Sat Jan 5 20:00:11 2019 CommitHash: 7a3c6b64 Plugins: 201901051900 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
Build host: Linux travis-job-f22c8934-2412-48ed-8180-7a42b62c7389 4.4.0-101-generic #124~14.04.1-Ubuntu SMP Fri Nov 10 19:05:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
plugin path: /home/maxim/apps/woden/pharo-vm/lib/pharo/5.0-201901051900 [default: /home/maxim/apps/woden/pharo-vm/lib/pharo/5.0-201901051900/]


C stack backtrace & registers:
	rax 0x01faadd0 rbx 0x7ffe357a5ea0 rcx 0x01f08010 rdx 0x01fa2c40
	rdi 0x01fa81c0 rsi 0x01fa81c0 rbp 0x7ffe357a5f08 rsp 0x7ffe357a5e80
	r8  0x7ffe357a5f2c r9  0x00000080 r10 0x00000000 r11 0x00000206
	r12 0x7ffe357a5ed0 r13 0x00000000 r14 0x7f67370a6f90 r15 0x7f6729784b80
	rip 0x7f6728f4b546
*/home/maxim/apps/woden/AgpuIcd/libAgpuOpenGL.so(+0x37546)[0x7f6728f4b546]
/home/maxim/apps/woden/pharo-vm/lib/pharo/5.0-201901051900/pharo[0x41b0d3]
/home/maxim/apps/woden/pharo-vm/lib/pharo/5.0-201901051900/pharo[0x41cb2e]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f67370aa890]
/home/maxim/apps/woden/AgpuIcd/libAgpuOpenGL.so(+0x37546)[0x7f6728f4b546]
/home/maxim/apps/woden/pharo-vm/lib/pharo/5.0-201901051900/pharo[0x4cb016]
/home/maxim/apps/woden/pharo-vm/lib/pharo/5.0-201901051900/pharo[0x45a747]
/home/maxim/apps/woden/pharo-vm/lib/pharo/5.0-201901051900/pharo(ceSendsupertonumArgs+0x265)[0x45c595]
[0x2000100]
[0x0]


Smalltalk stack dump:
    0x7ffe357cfe18 M AGPUCBindings>createVertexBinding_device:layout: 0x8cb82b8: a(n) AGPUCBindings
    0x7ffe357cfe78 M FFICalloutAPI>function:module: 0x275fb40: a(n) FFICalloutAPI
    0x7ffe357cfeb8 M AGPUCBindings(Object)>ffiCall: 0x8cb82b8: a(n) AGPUCBindings
    0x7ffe357cff00 I AGPUCBindings>createVertexBinding_device:layout: 0x8cb82b8: a(n) AGPUCBindings
    0x7ffe357cff58 I AGPUDevice>createVertexBinding: 0x2728e58: a(n) AGPUDevice
    0x7ffe357cffa0 I WDCVertexBinding>buildHandle 0x26f53c0: a(n) WDCVertexBinding
    0x7ffe357cffe0 I WDCVertexBinding(WDCResourceWithSessionHandle)>checkSession 0x26f53c0: a(n) WDCVertexBinding
    0x7ffe357d0028 I WDCEngine>createVertexBindingForLayout: 0x8cb8398: a(n) WDCEngine
    0x7ffe357d0078 I WDCGenericMeshBuilder>createVertexBinding 0x26e10d0: a(n) WDCGenericMeshBuilder
    0x7ffe357d00d0 I WDCGenericMeshBuilder>createMeshWithSubmeshes: 0x26e10d0: a(n) WDCGenericMeshBuilder
    0x7ffe357d0118 I WDCGenericMeshBuilder>mesh 0x26e10d0: a(n) WDCGenericMeshBuilder
    0x7ffe357d0170 I RWCube>createBaseShapeNodeForView: 0x26e00a8: a(n) RWCube
    0x7ffe357d01b0 M [] in RWCube(RWSimpleShape)>buildRenderableFor:view: 0x26e00a8: a(n) RWCube
    0x7ffe357d01f0 M [] in RWView>baseShapeNodeFor:ifAbsentPut: 0x26de900: a(n) RWView
    0x7ffe357c1cc0 M [] in Dictionary>at:ifAbsentPut: 0x26deba8: a(n) Dictionary
    0x7ffe357c1cf8 M Dictionary>at:ifAbsent: 0x26deba8: a(n) Dictionary
    0x7ffe357c1d38 M Dictionary>at:ifAbsentPut: 0x26deba8: a(n) Dictionary
    0x7ffe357c1d90 I RWView>baseShapeNodeFor:ifAbsentPut: 0x26de900: a(n) RWView
    0x7ffe357c1df0 I RWCube(RWSimpleShape)>buildRenderableFor:view: 0x26e00a8: a(n) RWCube
    0x7ffe357c1e40 I RWElement>addedIn: 0x26e01b8: a(n) RWElement
    0x7ffe357c1e88 I RWView>add: 0x26de900: a(n) RWView
    0x7ffe357c1ec8 M UndefinedObject>DoIt 0x29e78e0: a(n) UndefinedObject
    0x7ffe357c1f10 I OpalCompiler>evaluate 0x2686658: a(n) OpalCompiler
    0x7ffe357c1f68 I RubSmalltalkEditor>evaluate:andDo: 0x228d578: a(n) RubSmalltalkEditor
    0x7ffe357c1fb8 I RubSmalltalkEditor>highlightEvaluateAndDo: 0x228d578: a(n) RubSmalltalkEditor
    0x7ffe357c1ff8 M [] in GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>actOnHighlightAndEvaluate: 0x22e9f58: a(n) GLMMorphicPharoScriptRenderer
    0x7ffe357c2038 I RubEditingArea(RubAbstractTextArea)>handleEdit: 0x225e1d0: a(n) RubEditingArea
    0x7ffe357c2078 M [] in GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>actOnHighlightAndEvaluate: 0x22e9f58: a(n) GLMMorphicPharoScriptRenderer
    0x7ffe357c20b8 M WorldState>runStepMethodsIn: 0x3112cb8: a(n) WorldState
    0x7ffe357c20f0 M WorldMorph>runStepMethods 0x310ff38: a(n) WorldMorph
    0x7ffe357c2120 M WorldState>doOneCycleNowFor: 0x3112cb8: a(n) WorldState
    0x7ffe357c2158 M WorldState>doOneCycleFor: 0x3112cb8: a(n) WorldState
    0x7ffe357c2190 M WorldMorph>doOneCycle 0x310ff38: a(n) WorldMorph
    0x7ffe357c21c0 M WorldMorph class>doOneCycle 0x30b77a0: a(n) WorldMorph class
    0x7ffe357c21f0 M [] in MorphicUIManager>spawnNewProcess 0x8ca54e8: a(n) MorphicUIManager
         0xad39a68 s [] in BlockClosure>newProcess

Most recent primitives
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
at:
_slvm_primitiveFloatAt:put:
basicNew
class
new:
signal
basicNew
signal
basicNew:
numCopiedValues
stackp:
numCopiedValues
basicNew
priority:
primitiveResume
primUTCMicrosecondsClock
microsecondClockValue
primUTCMicrosecondsClock
class
primUTCMicrosecondsClock
wait
value
signal
value
targetFrameRate
primUTCMicrosecondsClock
basicNew
wait
signal
signal
nowTick
at:put:
at:
at:put:
signal
nowTick
nowTick
primSignal:atUTCMicroseconds:
wait
wait
basicNew
basicNew
perform:
basicNew
size
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
**StackOverflow**
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
class
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
basicIdentityHash
stringHash:initialHash:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
**StackOverflow**
stringHash:initialHash:
compare:with:collated:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
compare:with:collated:
basicNew
peek
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
compare:with:collated:
compare:with:collated:
basicNew
stringHash:initialHash:
**StackOverflow**
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
compare:with:collated:
perform:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
basicNew
replaceFrom:to:with:startingAt:
stringHash:initialHash:
stringHash:initialHash:
stringHash:initialHash:
compare:with:collated:
stringHash:initialHash:
compare:with:collated:
basicNew
basicNew
shallowCopy
stringHash:initialHash:
basicNew
class
basicNew
basicNew
**StackOverflow**
stringHash:initialHash:
parameterAt:
stringHash:initialHash:
setIsReadOnlyObject:
stringHash:initialHash:
stringHash:initialHash:
findSubstring:in:startingAt:matchTable:
indexOfAscii:inString:startingAt:
indexOfAscii:inString:startingAt:
stringHash:initialHash:
stringHash:initialHash:
**StackOverflow**
basicNew
class
stringHash:initialHash:
compare:with:collated:
perform:
newMethod:header:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
at:put:
objectAt:put:
objectAt:put:
objectAt:put:
objectAt:put:
objectAt:put:
objectAt:put:
basicIdentityHash
objectAt:put:
stringHash:initialHash:
stringHash:initialHash:
objectAt:put:
basicNew:
instVarAt:
instVarAt:put:
instVarAt:
instVarAt:put:
objectAt:put:
basicNew:
instVarAt:
instVarAt:put:
instVarAt:
instVarAt:put:
objectAt:put:
flushCache
size
basicIdentityHash
basicIdentityHash
at:
at:
at:
basicIdentityHash
tempAt:
tempAt:
withArgs:executeMethod:
basicIdentityHash

stack page bytes 8192 available headroom 5576 minimum unused headroom 6000

	(Segmentation fault)
/home/maxim/apps/woden/pharo-ui: line 11: 15375 Aborted                 (core dumped) "$DIR"/"pharo-vm/pharo" "$@"

New error loading woden in mac

Mac OS - 10.13.4

You will need python and wget in your system with brew

After loading

  1. Open pharo-gui
  2. select woden.image
  3. run the next script
model := WDAModel new.
model openWith: (WDASolidColorViewSample new color: Color blue)
  1. An errror appears ExternalModule Not found

Error: Got an error from AGPU.

Hello,

The installation of woden2 seems successful, but when I start a demo (WTFSSampleApplicationCube new openInOSWindow), I have got an error from AGPU :

WTPipelineStateCache >> buildShaderSignature:
signatureBuilder addBindingBankElement: bindingType bindingPointCount: bankElement bindingPoints.
AGPUShaderSignatureBuilder >> addBindingBankElement: bindingPointCount:
resultValue_ := AGPUCBindings uniqueInstance
addBindingBankElement_shader_signature_builder: (self validHandle) type: type

resultValue_ return me -2 as error code.

Computer with Ubuntu 16.10 64 bits, and Radeon R7 360.

Thanks !

What *is* woden2 - World Dynamic Engine 2?

The README.md document doesn't address one word toward answering what woden2 actually is.
Google search for World Dynamic Engine finds results about variable fuel economy in petroleum powered engines.

Please add a paragraph summarizing what it is, etc.
(apologies for such a nattering issue)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.