├── .editorconfig ├── .github └── workflows │ ├── ci.yml │ └── deploy.yml ├── .gitignore ├── 404.rst ├── Makefile ├── README.md ├── _static ├── favicon.ico ├── logo.png ├── panda.css ├── redirects.json ├── searchtools.js └── versions.js ├── _templates ├── autosummary │ ├── direct-module.rst │ ├── direct-package.rst │ ├── panda3d-class.rst │ └── panda3d-module.rst ├── layout.html └── searchbox.html ├── conf.py ├── debugging ├── cpp-debugger.rst ├── debugpanda1.jpg ├── debugpanda10.jpg ├── debugpanda2.jpg ├── debugpanda3.jpg ├── debugpanda4.jpg ├── debugpanda5.jpg ├── debugpanda6.jpg ├── debugpanda7.jpg ├── debugpanda8.jpg ├── debugpanda9.jpg ├── index.rst ├── inspection-tools │ ├── directtools1.jpg │ ├── directtools2.jpg │ ├── directtools3.jpg │ ├── directtools4.jpg │ ├── enhanced-mouse-navigation.rst │ ├── index.rst │ ├── scene-graph-browser.rst │ └── utility-functions.rst ├── log-messages.rst └── python-debugger.rst ├── distribution ├── building-binaries.rst ├── index.rst ├── list-of-build-options.rst ├── packaging-binaries.rst ├── setuptools-examples.rst ├── thirdparty-licenses.rst └── troubleshooting.rst ├── glossary.rst ├── index.rst ├── introduction ├── building-from-source.rst ├── environvariables.png ├── environvariables2.png ├── environvariables3.png ├── feature-ai.jpg ├── feature-audio.jpg ├── feature-builtins.jpg ├── feature-debug.jpg ├── feature-graphics.jpg ├── feature-gui.jpg ├── feature-outofbox.jpg ├── feature-particles.jpg ├── feature-perfmon.jpg ├── feature-physics.png ├── feature-pipeline.png ├── feature-python.jpg ├── feature-wizard.jpg ├── features.rst ├── index.rst ├── install-1.png ├── install-2.png ├── install-3.png ├── installation-linux.rst ├── installation-windows.rst ├── msvc-2015-additional-deps.png ├── msvc-2015-release-x64.png ├── preparation.rst ├── running-your-program-1.png ├── running-your-program-2.png ├── running-your-program-3.png ├── running-your-program-4.png ├── running-your-program.rst └── tutorial │ ├── controlling-the-camera.cxx │ ├── controlling-the-camera.py │ ├── controlling-the-camera.rst │ ├── end.rst │ ├── index.rst │ ├── loading-and-animating-the-panda-model.cxx │ ├── loading-and-animating-the-panda-model.py │ ├── loading-and-animating-the-panda-model.rst │ ├── loading-the-grassy-scenery.cxx │ ├── loading-the-grassy-scenery.py │ ├── loading-the-grassy-scenery.rst │ ├── starting-panda3d.rst │ ├── tutorial1.jpg │ ├── tutorial2.jpg │ ├── tutorial3.jpg │ ├── using-intervals-to-move-the-panda.cxx │ ├── using-intervals-to-move-the-panda.py │ └── using-intervals-to-move-the-panda.rst ├── make.bat ├── more-resources ├── cheat-sheets.rst ├── faq.rst ├── index.rst ├── irc-channel.rst ├── panda3d-16-game-engine-beginners-guide.jpg ├── panda3d-17-game-developers-cookbook.jpg ├── panda3d-art-creation-with-blender.jpg ├── panda3d-game-development.jpg ├── samples │ ├── asteroids.rst │ ├── ball-in-maze.rst │ ├── boxing-robots.rst │ ├── bump-mapping.rst │ ├── carousel.rst │ ├── cartoon-shader.rst │ ├── chessboard.rst │ ├── disco-lights.rst │ ├── distortion.rst │ ├── fireflies.rst │ ├── fractal-plants.rst │ ├── gamepad.rst │ ├── glow-filter.rst │ ├── index.rst │ ├── infinite-tunnel.rst │ ├── looking-and-gripping.rst │ ├── media-player.rst │ ├── motion-trails.rst │ ├── mouse-modes.rst │ ├── music-box.rst │ ├── particles.rst │ ├── procedural-cube.rst │ ├── render-to-texture.rst │ ├── roaming-ralph.rst │ ├── screenshot-sample-programs-asteroids.png │ ├── screenshot-sample-programs-ball-in-maze.png │ ├── screenshot-sample-programs-boxing-robots.png │ ├── screenshot-sample-programs-bump-mapping.png │ ├── screenshot-sample-programs-carousel.png │ ├── screenshot-sample-programs-cartoon-shader.png │ ├── screenshot-sample-programs-chessboard.png │ ├── screenshot-sample-programs-culling-occluder.png │ ├── screenshot-sample-programs-culling-portal.png │ ├── screenshot-sample-programs-disco-lights.png │ ├── screenshot-sample-programs-distortion.png │ ├── screenshot-sample-programs-fireflies.png │ ├── screenshot-sample-programs-fractal-plants.png │ ├── screenshot-sample-programs-gamepad-mapping.png │ ├── screenshot-sample-programs-gamepad.png │ ├── screenshot-sample-programs-glow-filter.png │ ├── screenshot-sample-programs-infinite-tunnel.png │ ├── screenshot-sample-programs-looking-and-gripping.png │ ├── screenshot-sample-programs-media-player.png │ ├── screenshot-sample-programs-motion-trails-fireball.png │ ├── screenshot-sample-programs-motion-trails-framebuffer-feedback.png │ ├── screenshot-sample-programs-music-box.png │ ├── screenshot-sample-programs-particles.png │ ├── screenshot-sample-programs-procedural-cube.png │ ├── screenshot-sample-programs-render-to-texture.png │ ├── screenshot-sample-programs-roaming-ralph.png │ ├── screenshot-sample-programs-shadows.png │ ├── screenshot-sample-programs-solar-system.png │ ├── shadows.rst │ ├── solar-system.rst │ └── spirograph.png ├── user-contributed-tutorials-and-examples.rst └── video-lectures.rst ├── optimization ├── basic-performance-diagnostics.rst ├── index.rst ├── performance-issues │ ├── collision-system-misuse.rst │ ├── excessive-fill.rst │ ├── failure-to-garbage-collect.rst │ ├── index.rst │ ├── memory-full.rst │ ├── miscellaneous.rst │ ├── motherboard-integrated-video.rst │ ├── pstats-python-time.png │ ├── pstats-skinning-time.png │ ├── python-calculation.rst │ ├── too-many-meshes.rst │ ├── too-many-polygons.rst │ ├── too-many-shader-instructions.rst │ ├── too-many-state-changes.rst │ └── too-many-text-updates.rst ├── pstats-strip-chart-level.png ├── pstats-strip-chart-time.png ├── rigid-body-combiner.rst └── using-pstats.rst ├── pipeline ├── blender-gltf-1.png ├── blender-gltf-2.png ├── converting-from-3ds-max.rst ├── converting-from-blender.rst ├── converting-from-maya.rst ├── egg-files │ ├── converting-egg-to-bam.rst │ ├── converting-to-egg.rst │ ├── index.rst │ ├── parsing-and-generating-egg-files.rst │ └── syntax.rst ├── gltf-files.rst ├── index.rst ├── launchmpt.jpg ├── max-script.jpg ├── maxexp1.jpg ├── maxexp2.jpg ├── maxexp3.jpg ├── maxexp4.jpg ├── maxexp5.jpg ├── maxexp6.jpg ├── maya-egg-gui-advanced.jpg ├── maya-egg-gui-simple.jpg ├── maya-egg-palettize-1.jpg ├── maya-egg-palettize-2.jpg ├── maya-egg-palettize-3.jpg ├── maya-exporter.png ├── maya-hyper-1.jpg ├── maya-hyper-2.jpg ├── maya-hyper-3.jpg ├── maya-hyper-4.jpg ├── maya-hyper-5.jpg ├── maya-hyper-6.jpg ├── maya-hyper-7.jpg ├── maya-hypershade.jpg ├── maya-tex-1.jpg ├── maya-tex-2.jpg ├── maya-tex-3.jpg ├── maya-tex-4.jpg ├── mayacommandlineexport.png ├── mayapandatoolload.png ├── model-file-formats.rst ├── obj-props.jpg ├── object-properties.jpg ├── previewing-models.rst ├── pview-sample.jpg └── tips.rst ├── programming ├── advanced-loading │ ├── async.rst │ ├── filename-syntax.rst │ ├── index.rst │ ├── loading-resources-from-memory.rst │ ├── multifiles.rst │ ├── patching.rst │ └── virtual-file-system.rst ├── audio │ ├── 3d-audio.rst │ ├── audio-managers.rst │ ├── dsp-effects.rst │ ├── index.rst │ ├── loading-playing-sounds-music.rst │ ├── manipulating-sounds.rst │ └── multi-channel.rst ├── camera-control │ ├── default-camera-driver.rst │ ├── index.rst │ ├── lens-tutorial-orthographic.jpg │ ├── lens-tutorial-perspective.jpg │ ├── lens-tutorial-top.jpg │ ├── orthographic-lenses.rst │ └── perspective-lenses.rst ├── collision-detection │ ├── bitmask-example.py │ ├── bitmask-example.rst │ ├── clicking-on-3d-objects.rst │ ├── collision-bitmasks.rst │ ├── collision-entries.rst │ ├── collision-handlers.rst │ ├── collision-solids.rst │ ├── collision-traversers.rst │ ├── collisionbitmasks.png │ ├── event-example.py │ ├── event-example.rst │ ├── index.rst │ ├── pusher-example.rst │ ├── rapidly-moving-objects.rst │ └── tube.jpg ├── configuration │ ├── accessing-config-vars-in-a-program.rst │ ├── configuring-panda3d.rst │ ├── index.rst │ └── list-of-all-config-variables.rst ├── finite-state-machines │ ├── advanced-fsm-tidbits.rst │ ├── fsm-introduction.rst │ ├── fsm-with-input.rst │ ├── index.rst │ └── simple-fsm-usage.rst ├── gui │ ├── directgui │ │ ├── directbutton.rst │ │ ├── directcheckbutton.rst │ │ ├── directdialog.rst │ │ ├── directentry.rst │ │ ├── directframe.rst │ │ ├── directlabel.rst │ │ ├── directoptionmenu.rst │ │ ├── directradiobutton.rst │ │ ├── directscrollbar.rst │ │ ├── directscrolledframe.rst │ │ ├── directscrolledlist.rst │ │ ├── directslider.rst │ │ ├── directwaitbar.rst │ │ └── index.rst │ ├── embedded-text-properties.rst │ ├── index.rst │ ├── rendering-images.rst │ ├── rendering-text.rst │ ├── text-align.png │ ├── text-attrib.png │ ├── text-card.png │ ├── text-color.png │ ├── text-font.png │ ├── text-fonts.rst │ ├── text-frame.png │ ├── text-plain.png │ ├── text-shadow.png │ ├── text-slant.png │ ├── text-smallcaps-scale.png │ ├── text-smallcaps.png │ └── text-wordwrap.png ├── hardware-support │ ├── index.rst │ ├── joystick-support.rst │ ├── keyboard-support.rst │ └── mouse-support.rst ├── index.rst ├── internal-structures │ ├── deriv-xi.png │ ├── deriv-xo.png │ ├── geometry-storage │ │ ├── boundingvolume.rst │ │ ├── geom.rst │ │ ├── geomlines.png │ │ ├── geomlinestrips.png │ │ ├── geomnode.rst │ │ ├── geompoints.png │ │ ├── geompointsthick.png │ │ ├── geomprimitive.rst │ │ ├── geomtriangles.png │ │ ├── geomtrifans.png │ │ ├── geomtristrips.png │ │ ├── geomvertexdata.rst │ │ ├── geomvertexformat.rst │ │ └── index.rst │ ├── index.rst │ ├── matrix-c.png │ ├── matrix-r.png │ ├── matrix-representation.rst │ ├── other-manipulation │ │ ├── index.rst │ │ ├── meshdrawer.rst │ │ ├── modifying-existing-geometry.rst │ │ ├── more-about-reader-writer-rewriter.rst │ │ ├── reading-existing-geometry.rst │ │ ├── using-memoryviews.rst │ │ └── writing-models-to-disk.rst │ └── procedural-generation │ │ ├── creating-primitives.rst │ │ ├── creating-vertex-data.rst │ │ ├── custom-vertex-format.rst │ │ ├── index.rst │ │ ├── predefined-vertex-formats.rst │ │ └── putting-geometry-in-scene-graph.rst ├── intervals │ ├── actor-intervals.rst │ ├── function-intervals.rst │ ├── index.rst │ ├── lerp-intervals.rst │ ├── motion-path-and-particle-intervals.rst │ ├── motion-paths.rst │ ├── particle-intervals.rst │ ├── projectile-intervals.rst │ ├── sequences-and-parallels.rst │ └── sound-intervals.rst ├── models-and-actors │ ├── actor-animations.rst │ ├── attaching-objects-to-joints.rst │ ├── controlling-joints.rst │ ├── index.rst │ ├── loading-actors-and-animations.rst │ └── multi-part-actors.rst ├── networking │ ├── datagram-protocol │ │ ├── client-server-connection.rst │ │ ├── index.rst │ │ └── transmitting-data.rst │ ├── distributed │ │ ├── ai-created-objects.rst │ │ ├── ai-repositories.rst │ │ ├── client-created-objects.rst │ │ ├── client-repositories.rst │ │ ├── clients.rst │ │ ├── dc-definition-files.rst │ │ ├── distributed-node.rst │ │ ├── distributed-object.rst │ │ ├── distributed-smooth-node.rst │ │ ├── index.rst │ │ ├── owner-view.rst │ │ ├── related-object-manager.rst │ │ ├── server-repositories.rst │ │ ├── servers.rst │ │ ├── time-manager.rst │ │ └── uber-dogs.rst │ ├── downloading.rst │ └── index.rst ├── object-management │ ├── index.rst │ ├── reference-counting.rst │ ├── removing-custom-class-instances.rst │ └── subclassing.rst ├── pandai │ ├── getting-started.rst │ ├── index.rst │ ├── pathfinding │ │ ├── dynamic-obstacles.py │ │ ├── dynamic-obstacles.rst │ │ ├── index.rst │ │ ├── mesh-generation.rst │ │ ├── static-obstacles.py │ │ ├── static-obstacles.rst │ │ ├── uneven-terrain.py │ │ └── uneven-terrain.rst │ ├── source-codes.rst │ └── steering-behaviors │ │ ├── evade.rst │ │ ├── flee.rst │ │ ├── flock.rst │ │ ├── index.rst │ │ ├── obstacle-avoidance.rst │ │ ├── path-follow.rst │ │ ├── pursue.rst │ │ ├── seek.rst │ │ └── wander.rst ├── particle-effects │ ├── basic-effect-parameters.rst │ ├── emitters.rst │ ├── factories.rst │ ├── index.rst │ ├── loading-particle-systems.rst │ ├── ppanel1.png │ ├── ppanel10.png │ ├── ppanel11.png │ ├── ppanel12.png │ ├── ppanel13.png │ ├── ppanel14.png │ ├── ppanel15.png │ ├── ppanel16.png │ ├── ppanel2.png │ ├── ppanel3.png │ ├── ppanel4.png │ ├── ppanel5.png │ ├── ppanel6.png │ ├── ppanel7.png │ ├── ppanel8.png │ ├── ppanel9.png │ ├── renderers.rst │ ├── rocket-particles.png │ └── using-the-particle-panel.rst ├── physics │ ├── builtin │ │ ├── applying-physics-to-a-node.rst │ │ ├── enabling-physics-on-a-node.rst │ │ ├── index.rst │ │ ├── notes-and-caveats.rst │ │ └── types-of-forces.rst │ ├── bullet │ │ ├── bullethinge.png │ │ ├── bulletslider.png │ │ ├── bulletspherical.png │ │ ├── ccd.rst │ │ ├── character-controller.rst │ │ ├── collision-filtering.rst │ │ ├── collision-shapes.rst │ │ ├── config-options.rst │ │ ├── constraints.rst │ │ ├── debug-renderer.rst │ │ ├── faq.rst │ │ ├── ghosts.rst │ │ ├── hello-world.rst │ │ ├── index.rst │ │ ├── queries.rst │ │ ├── samples.rst │ │ ├── softbodies.rst │ │ ├── softbody-config.rst │ │ ├── softbody-patch.rst │ │ ├── softbody-rope.rst │ │ ├── softbody-tetrahedron.rst │ │ ├── softbody-triangles.rst │ │ └── vehicles.rst │ ├── index.rst │ └── ode │ │ ├── attaching-bodies-using-joints.rst │ │ ├── balljointexample2.jpg │ │ ├── collision-detection.rst │ │ ├── index.rst │ │ ├── simulating-physics-world.rst │ │ └── worlds-bodies-masses.rst ├── render-attributes │ ├── alpha-testing.rst │ ├── antialiasing.rst │ ├── auxiliary-bitplane-control.rst │ ├── backface-culling-and-frontface-culling.rst │ ├── clip-planes.rst │ ├── color-write-masks.rst │ ├── depth-test-and-depth-write.rst │ ├── fog.rst │ ├── index.rst │ ├── light-ramps.rst │ ├── lighting.rst │ ├── list-of-all-attributes.rst │ ├── materials.rst │ ├── occlusion-culling │ │ ├── index.rst │ │ ├── polygon-occluder-culling.rst │ │ ├── portal-culling.rst │ │ └── portal-diagram.png │ ├── stencil-attribute.rst │ ├── tinting-and-recoloring.rst │ └── tinting-and-recoloring1.jpg ├── render-effects │ ├── billboard.rst │ ├── compass.rst │ └── index.rst ├── render-to-texture │ ├── common-image-filters.rst │ ├── dynamic-cube-maps.rst │ ├── generalized-image-filters.rst │ ├── index.rst │ └── low-level-render-to-texture.rst ├── rendering-process │ ├── 2d-display-region.rst │ ├── app-cull-draw.png │ ├── appculldraw.png │ ├── clearing-display-regions.rst │ ├── controlling-render-order.rst │ ├── creating-mouse-watchers.rst │ ├── creating-windows-and-buffers.rst │ ├── display-regions.rst │ ├── displayregion-1.jpg │ ├── displayregion-2.jpg │ ├── displayregion-3.jpg │ ├── displayregion-gui.jpg │ ├── displayregionmousewatcher.png │ ├── full-pipeline.png │ ├── graphics-pipe.rst │ ├── index.rst │ ├── introducing-graphics-classes.rst │ ├── multi-pass-rendering.rst │ ├── multithreaded-render-pipeline.rst │ ├── quaddr.jpg │ ├── stereo-display-regions.rst │ ├── stereo-lens-parameters.jpg │ └── supported-renderer-features.rst ├── scene-graph │ ├── common-state-changes.rst │ ├── index.rst │ ├── instancing.rst │ ├── instancing1.jpg │ ├── instancing2.jpg │ ├── instancing3.jpg │ ├── instancing4.jpg │ ├── level-of-detail.rst │ ├── manipulating-a-piece-of-a-model.rst │ ├── model-files.rst │ └── searching-scene-graph.rst ├── shaders │ ├── cg-shader-tutorial │ │ ├── cg-lesson1-screen.png │ │ ├── cg-tut-cube1.png │ │ ├── index.rst │ │ ├── part-1.rst │ │ ├── part-2.rst │ │ └── part-3.rst │ ├── compute-shaders.rst │ ├── coordinate-spaces.rst │ ├── index.rst │ ├── known-shader-issues.rst │ ├── list-of-cg-inputs.rst │ ├── list-of-glsl-inputs.rst │ ├── shader-basics.rst │ └── shader-generator.rst ├── tasks-and-events │ ├── coroutines.rst │ ├── event-handlers.rst │ ├── index.rst │ ├── main-loop.rst │ ├── task-chains.rst │ ├── tasks.rst │ └── threading.rst ├── terrain │ ├── geometrical-mipmapping.rst │ ├── heightfield-tesselator.rst │ └── index.rst ├── texturing │ ├── 3d-textures.rst │ ├── 3dtexture-cube.png │ ├── 3dtexture-levels-0.png │ ├── 3dtexture-sphere.png │ ├── 3dtexture-teapot.png │ ├── automatic-texture-animation.rst │ ├── automatic-texture-coordinates.rst │ ├── car-red.png │ ├── car-with-blue.png │ ├── carnsx-blue.png │ ├── carnsx.png │ ├── choosing-a-texture-size.rst │ ├── chrome-car.jpg │ ├── chrome-teapot.jpg │ ├── color-pattern.png │ ├── creating-textures.rst │ ├── cube-maps.rst │ ├── cubemap-teapot.jpg │ ├── environment-mapping-with-cube-maps.rst │ ├── exploded-cube-map.png │ ├── fractal.jpg │ ├── index.rst │ ├── mapped-cube-map-solid.png │ ├── mapped-cube-map.png │ ├── multiple-texture-coordinate-sets.rst │ ├── multitex-smiley-noise.png │ ├── multitexture-introduction.rst │ ├── multiview-textures.rst │ ├── playing-mpg-and-avi-files.rst │ ├── projected-bamboo.jpg │ ├── projected-textures.rst │ ├── shiny-car.jpg │ ├── simple-environment-mapping.rst │ ├── simple-texture-replacement.rst │ ├── simple-texturing.rst │ ├── small-r.png │ ├── smiley-multitex-add.png │ ├── smiley-multitex-blend-blue.png │ ├── smiley-multitex-blend-red.png │ ├── smiley-multitex-decal-1.png │ ├── smiley-multitex-modulate.png │ ├── smiley-multitex-none.png │ ├── smiley-multitex-replace.png │ ├── streetscene-env-dark.jpg │ ├── streetscene-env.jpg │ ├── tex-gen-teapot-xy.png │ ├── tex-gen-teapot-xz.png │ ├── texture-border-color-blue.png │ ├── texture-border-color-white.png │ ├── texture-clamp-repeat.png │ ├── texture-clamp.png │ ├── texture-combine-modes.rst │ ├── texture-compression.rst │ ├── texture-filter-types.rst │ ├── texture-mag-aniso.jpg │ ├── texture-mag-linear.jpg │ ├── texture-mag-nearest.jpg │ ├── texture-management.rst │ ├── texture-min-aniso.jpg │ ├── texture-min-linear-0.jpg │ ├── texture-min-mipmap-0.jpg │ ├── texture-min-nearest.jpg │ ├── texture-mirror-once.png │ ├── texture-mirror.png │ ├── texture-modes.rst │ ├── texture-order.rst │ ├── texture-repeat.png │ ├── texture-smiley-noise.png │ ├── texture-smiley.png │ ├── texture-transforms.rst │ ├── texture-uvs.png │ ├── texture-wrap-error.png │ ├── texture-wrap-modes.rst │ ├── transparency-and-blending.rst │ ├── white-a.png │ ├── wooden-teapot.jpg │ ├── woodgrain-0.jpg │ ├── woodgrain-1.jpg │ ├── woodgrain-2.jpg │ ├── woodgrain-3.jpg │ ├── woodgrain-4.jpg │ ├── woodgrain-5.jpg │ ├── woodgrain-6.jpg │ ├── woodgrain-7.jpg │ ├── woodgrain-example.py │ └── woodgrain-example.rst └── using-cpp │ └── window-framework.rst ├── reference ├── builtins.rst ├── direct.directbase.DirectStart.rst ├── direct.rst ├── index.rst └── panda3d.rst ├── requirements.txt ├── setup.cfg └── tools ├── interrogate.rst └── list-of-executables.rst /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | insert_final_newline = true 5 | trim_trailing_whitespace = true 6 | indent_style = space 7 | 8 | [*.rst] 9 | indent_size = 3 10 | 11 | [*.py] 12 | indent_size = 4 13 | 14 | [*.{cpp,cxx,h,I}] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Continuous Integration 2 | on: [push, pull_request] 3 | jobs: 4 | lint: 5 | name: Lint 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v1 9 | - uses: actions/setup-python@v1 10 | with: 11 | python-version: '3.7' 12 | - name: Install requirements 13 | run: | 14 | pip install -r requirements.txt 15 | pip install flake8 doc8 16 | - name: Test Python code style 17 | run: | 18 | flake8 19 | - name: Test reStructuredText code style 20 | run: | 21 | doc8 --ignore=D001 22 | #- name: Run linkcheck 23 | # run: | 24 | # make linkcheck 25 | 26 | build-html: 27 | name: Build HTML 28 | runs-on: ubuntu-latest 29 | steps: 30 | - uses: actions/checkout@v1 31 | - uses: actions/setup-python@v1 32 | with: 33 | python-version: '3.7' 34 | - name: Install requirements 35 | run: | 36 | sudo apt-get install --no-install-recommends graphviz 37 | pip install -r requirements.txt 38 | pip uninstall -y panda3d 39 | - name: Build HTML manual 40 | run: | 41 | make html 42 | 43 | build-pdf: 44 | name: Build PDF 45 | runs-on: ubuntu-latest 46 | steps: 47 | - uses: actions/checkout@v1 48 | - uses: actions/setup-python@v1 49 | with: 50 | python-version: '3.7' 51 | - name: Install requirements 52 | run: | 53 | sudo apt-get install --no-install-recommends graphviz latexmk texlive-fonts-recommended texlive-latex-extra tex-gyre 54 | pip install -r requirements.txt 55 | - name: Build PDF manual 56 | run: | 57 | make latexpdf 58 | -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deployment 2 | on: 3 | push: 4 | branches: 5 | - "[0-9]+.[0-9]+" 6 | jobs: 7 | build: 8 | name: Build 9 | runs-on: ubuntu-latest 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.ref }} 12 | cancel-in-progress: true 13 | steps: 14 | - uses: actions/checkout@v1 15 | - uses: actions/setup-python@v1 16 | with: 17 | python-version: '3.7' 18 | - name: Install requirements 19 | run: | 20 | sudo apt-get install --no-install-recommends graphviz 21 | pip install -r requirements.txt 22 | - name: Build HTML manual 23 | run: | 24 | sphinx-build -a -j auto -d _doctrees -D html_absolute_url_root=/ -D html_link_suffix= -D version=$(basename ${{ github.ref }}) -A version=$(basename ${{ github.ref }}) -A github_version=$(basename ${{ github.ref }}) -A theme_canonical_url=https://docs.panda3d.org/$(basename ${{ github.ref }})/ -A theme_display_header=true . _html 25 | - name: Sync to server 26 | run: | 27 | echo "${{ secrets.SSH_IDENTITY }}" > id_rsa 28 | chmod 600 id_rsa 29 | rsync -vzr --delete-after -e 'ssh -l ${{ secrets.SSH_USER }} -p ${{ secrets.SSH_PORT }} -i id_rsa -o StrictHostKeyChecking=no' _html/ "panda3d.org:$(basename ${{ github.ref }})/" 30 | rm -f id_rsa 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | /_build/ 3 | /reference/direct.*.rst 4 | /reference/panda3d.*.rst 5 | -------------------------------------------------------------------------------- /404.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | Not Found 4 | ========= 5 | 6 | The requested page was not found in this version of the documentation. It may 7 | exist in a different version; use the version selector in the sidebar to try a 8 | different version. Otherwise, the search feature may help you find what you are 9 | looking for. 10 | 11 | .. raw:: html 12 | 13 | 14 | 15 | If you have arrived here because you followed a link in the official 16 | documentation, please 17 | `file an issue `__ to make us 18 | aware of this. 19 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/_static/favicon.ico -------------------------------------------------------------------------------- /_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/_static/logo.png -------------------------------------------------------------------------------- /_templates/autosummary/direct-module.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/panda3d/panda3d/blob/master/{{ fullname | replace("direct.", "direct/src/") | replace(".", "/") }}.py 2 | 3 | {{ fullname | escape | underline }} 4 | 5 | .. only:: cpp 6 | 7 | This page describes a Python module, which is not available to C++ users. 8 | To switch to the Python version of the manual, use the link in the sidebar. 9 | 10 | .. only:: python 11 | 12 | .. code-block:: python 13 | 14 | {% if classes %} 15 | from {{ fullname }} import {{ (classes + functions) | join(', ') }} 16 | {% else %} 17 | import {{ fullname }} 18 | {% endif %} 19 | 20 | .. default-role:: obj 21 | 22 | .. automodule:: {{ fullname }} 23 | :members: 24 | :undoc-members: 25 | :ignore-module-all: 26 | 27 | {% if classes %} 28 | .. rubric:: Inheritance diagram 29 | 30 | .. inheritance-diagram:: {{ fullname }} 31 | :parts: 1 32 | {% endif %} 33 | -------------------------------------------------------------------------------- /_templates/autosummary/direct-package.rst: -------------------------------------------------------------------------------- 1 | :github_url: https://github.com/panda3d/panda3d/tree/master/{{ fullname | replace("direct.", "direct/src/") | replace(".", "/") }}/ 2 | 3 | {{ fullname | escape | underline }} 4 | 5 | .. only:: cpp 6 | 7 | This page describes a Python module, which is not available to C++ users. 8 | To switch to the Python version of the manual, use the link in the sidebar. 9 | 10 | .. only:: python 11 | 12 | .. default-role:: obj 13 | 14 | .. automodule:: {{ fullname }} 15 | :members: 16 | :undoc-members: 17 | :ignore-module-all: 18 | 19 | {% if fullname == "direct.directbase" %} 20 | 21 | .. toctree:: 22 | :hidden: 23 | 24 | direct.directbase.DirectStart 25 | 26 | {% else %} 27 | 28 | .. autopackagesummary:: {{ fullname }} 29 | :toctree: . 30 | :template: autosummary/direct-module.rst 31 | 32 | {% endif %} 33 | -------------------------------------------------------------------------------- /_templates/autosummary/panda3d-class.rst: -------------------------------------------------------------------------------- 1 | {{ objname | escape | underline }} 2 | 3 | .. currentmodule:: {{ module }} 4 | 5 | .. only:: python 6 | 7 | .. code-block:: python 8 | 9 | from {{ module }} import {{ name }} 10 | 11 | .. autoclass:: {{ objname }} 12 | :members: 13 | :undoc-members: 14 | 15 | .. rubric:: Inheritance diagram 16 | 17 | .. inheritance-diagram:: {{ objname }} 18 | :parts: 1 19 | 20 | .. only:: cpp 21 | 22 | .. default-domain:: cpp 23 | 24 | .. autoclass:: {{ objname }} 25 | :members: 26 | :undoc-members: 27 | 28 | .. rubric:: Inheritance diagram 29 | 30 | .. inheritance-diagram:: {{ objname }} 31 | :parts: 1 32 | -------------------------------------------------------------------------------- /_templates/autosummary/panda3d-module.rst: -------------------------------------------------------------------------------- 1 | {{ fullname | escape | underline }} 2 | 3 | .. automodule:: {{ fullname }} 4 | :no-members: 5 | 6 | {% if classes %} 7 | .. autosummary:: 8 | :toctree: . 9 | :template: autosummary/panda3d-class.rst 10 | 11 | {% for item in classes %} 12 | {{ item }} 13 | {%- endfor %} 14 | {% endif %} 15 | 16 | {% if functions %} 17 | .. rubric:: Global Functions 18 | 19 | .. only:: python 20 | 21 | {% for item in functions %} 22 | .. autofunction:: {{ item }} 23 | {%- endfor %} 24 | 25 | .. only:: cpp 26 | 27 | .. default-domain:: cpp 28 | 29 | {% for item in functions %} 30 | .. autofunction:: {{ item }} 31 | {%- endfor %} 32 | 33 | {% endif %} 34 | -------------------------------------------------------------------------------- /_templates/searchbox.html: -------------------------------------------------------------------------------- 1 |
2 | {{ version }} 3 |
4 | 5 | {% if currentvariation is defined %} 6 | 11 | {% endif %} 12 | 13 | {% for variation in variations %} 14 | {% if variation[0]|string() == currentvariation[0]|string() %} 15 | {{ variation[1] }} 16 | {% else %} 17 | {{ variation[1] }} 18 | {% endif %} 19 | 20 | {% if not loop.last %} 21 | | 22 | {% endif %} 23 | {% endfor %} 24 | 25 | {%- extends "sphinx_rtd_theme/searchbox.html" %} 26 | -------------------------------------------------------------------------------- /debugging/debugpanda1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda1.jpg -------------------------------------------------------------------------------- /debugging/debugpanda10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda10.jpg -------------------------------------------------------------------------------- /debugging/debugpanda2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda2.jpg -------------------------------------------------------------------------------- /debugging/debugpanda3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda3.jpg -------------------------------------------------------------------------------- /debugging/debugpanda4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda4.jpg -------------------------------------------------------------------------------- /debugging/debugpanda5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda5.jpg -------------------------------------------------------------------------------- /debugging/debugpanda6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda6.jpg -------------------------------------------------------------------------------- /debugging/debugpanda7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda7.jpg -------------------------------------------------------------------------------- /debugging/debugpanda8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda8.jpg -------------------------------------------------------------------------------- /debugging/debugpanda9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/debugpanda9.jpg -------------------------------------------------------------------------------- /debugging/index.rst: -------------------------------------------------------------------------------- 1 | .. _debugging: 2 | 3 | Debugging 4 | ========= 5 | 6 | This section documents the various debugging tools to use to find problems in a 7 | Panda3D program. 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | log-messages 13 | inspection-tools/index 14 | python-debugger 15 | cpp-debugger 16 | -------------------------------------------------------------------------------- /debugging/inspection-tools/directtools1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/inspection-tools/directtools1.jpg -------------------------------------------------------------------------------- /debugging/inspection-tools/directtools2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/inspection-tools/directtools2.jpg -------------------------------------------------------------------------------- /debugging/inspection-tools/directtools3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/inspection-tools/directtools3.jpg -------------------------------------------------------------------------------- /debugging/inspection-tools/directtools4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/debugging/inspection-tools/directtools4.jpg -------------------------------------------------------------------------------- /debugging/inspection-tools/index.rst: -------------------------------------------------------------------------------- 1 | .. _inspection-tools: 2 | 3 | Inspection Tools 4 | ================ 5 | 6 | This section lists a number of tools to support programming in Panda. 7 | 8 | Many of the tools provided are invoked by pressing a hot-key inside of the 9 | Panda3D main window. These hot-key driven tools are called the "direct tools." 10 | The direct tools are initially disabled, because the hot-keys used to invoke 11 | them might interfere with the program's own keys and events. 12 | 13 | To enable the hot-keys for the direct tools, you need to set the 14 | ``want-directtools`` variable in config.prc, the main panda configuration file. 15 | Additionally, set ``want-tk true`` in order to enable the Direct Session Panel. 16 | More information about this configuration file is available in the 17 | :ref:`Configuring Panda ` section. 18 | 19 | If you want to quickly enable the Direct Session browser, add the following code 20 | before importing DirectStart: 21 | 22 | .. code-block:: python 23 | 24 | from panda3d.core import loadPrcFileData 25 | loadPrcFileData("", "want-directtools #t") 26 | loadPrcFileData("", "want-tk #t") 27 | 28 | After enabling direct tools and starting panda, the Direct Session window 29 | should appear: 30 | 31 | .. image:: directtools1.jpg 32 | 33 | Many of these tools can also be launched by calling specific 34 | :ref:`utility functions `. 35 | 36 | Table of Contents 37 | ----------------- 38 | 39 | .. toctree:: 40 | :maxdepth: 2 41 | :titlesonly: 42 | 43 | scene-graph-browser 44 | enhanced-mouse-navigation 45 | utility-functions 46 | -------------------------------------------------------------------------------- /debugging/inspection-tools/scene-graph-browser.rst: -------------------------------------------------------------------------------- 1 | .. _the-scene-graph-browser: 2 | 3 | The Scene Graph Browser 4 | ======================= 5 | 6 | In the main Direct Session window, there are several scene placement tools 7 | available through the tabs at the right side of the screen. Clicking on these 8 | tabs will bring up a dialog box with the various properties for these aspects. 9 | On the left side of the panel is a collapsible scene graph for the render parent 10 | node. Right click any of the objects to bring up a list of possible commands. 11 | 12 | .. image:: directtools3.jpg 13 | 14 | Of particular interest is the placer panel, selected by the place command for 15 | an object. This brings up a separate window that may alter the position, 16 | orientation, and scale for the selected object. A dialog box at the top of the 17 | window allows these movements to be relative to another object in the program. 18 | 19 | .. image:: directtools4.jpg 20 | 21 | Many of these panels can also be launched by calling specific 22 | :ref:`utility functions `. 23 | -------------------------------------------------------------------------------- /debugging/inspection-tools/utility-functions.rst: -------------------------------------------------------------------------------- 1 | .. _inspection-utilities: 2 | 3 | Utility Functions 4 | ================= 5 | 6 | Panda3D has a set of utilities that may be used to learn more about various 7 | objects and methods within an application. 8 | 9 | One of these commands is :py:func:`~direct.tkpanels.Inspector.inspect()`. 10 | This command will create a window with methods and attributes on one side, and 11 | the details of a selected attribute on the other. It also displays the current 12 | values of a class’ attributes. If these attributes are changing, you may have to 13 | click on a value to refresh it. To use it you have to do the following: 14 | 15 | .. code-block:: python 16 | 17 | from direct.tkpanels.Inspector import inspect 18 | inspect(NodePath) 19 | # e.g. inspect(camera) 20 | 21 | While the directtools suite calls upon a number of tools, if the suite is 22 | disabled, the user may activate certain panels of the suite. The ``place()`` 23 | command opens the object placer console. The ``explore()`` opens the scene graph 24 | explorer, which allows you to inspect the hierarchy of a NodePath. Finally, in 25 | order to change the color of a NodePath, the ``rgbPanel()`` command opens color 26 | panel. 27 | 28 | .. code-block:: python 29 | 30 | camera.place() 31 | render.explore() 32 | panda.rgbPanel() 33 | -------------------------------------------------------------------------------- /distribution/packaging-binaries.rst: -------------------------------------------------------------------------------- 1 | .. _packaging-binaries: 2 | 3 | Packaging Binaries 4 | ================== 5 | 6 | Overview 7 | -------- 8 | 9 | The ``bdist_apps`` command will run the ``build_apps`` command and then package 10 | the resulting builds. Currently, the only packaging options available are 11 | archives (e.g, zip, tar.gz, etc.). Adding support for installers is planned for 12 | the future. 13 | 14 | The ``bdist_apps`` command will make use of ``build_apps.build_base`` and 15 | ``build_apps.platforms``. The following options are unique to ``bdist_apps``: 16 | 17 | installers 18 | A dictionary of installers/packages to create for each platform (keys are 19 | strings for the platform, values are strings representing installers, 20 | defaults to gztar for manylinux1_x86_64/manylinux1_i386 and zip for 21 | everything else) 22 | 23 | Installers 24 | ---------- 25 | 26 | The list of available installers are: 27 | 28 | zip 29 | A zip archive 30 | gztar 31 | A gzip-compressed tar archive 32 | bztar 33 | A bzip2-compressed tar archive 34 | xztar 35 | An xz-compressed tar archive 36 | nsis 37 | An `NSIS-based `_ Windows installer (valid only for Windows targets). 38 | Requires that ``makensis`` is available on the host. 39 | -------------------------------------------------------------------------------- /introduction/building-from-source.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. _building-from-source: 4 | 5 | Building Panda3D from Source 6 | ============================ 7 | 8 | Note that in the past, it was very difficult to build Panda3D. Things have 9 | improved. It is now fairly straightforward to download and compile Panda3D. In 10 | particular, this is a sensible thing to do if you wish to add some functionality 11 | to Panda3D. 12 | 13 | To avoid possible consistency problems, the documentation for building the 14 | source is included with the source, not in the manual. Download a source package 15 | from the panda website, then look at a file called README.md. It contains 16 | instructions for invoking the build system, makepanda. 17 | 18 | A link to the latest build instructions can be found here: 19 | https://github.com/panda3d/panda3d/blob/master/README.md 20 | 21 | While building you'll get a list of not found dependencies. Further descriptions 22 | of those can be found here: :ref:`Dependencies `. 23 | -------------------------------------------------------------------------------- /introduction/environvariables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/environvariables.png -------------------------------------------------------------------------------- /introduction/environvariables2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/environvariables2.png -------------------------------------------------------------------------------- /introduction/environvariables3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/environvariables3.png -------------------------------------------------------------------------------- /introduction/feature-ai.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-ai.jpg -------------------------------------------------------------------------------- /introduction/feature-audio.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-audio.jpg -------------------------------------------------------------------------------- /introduction/feature-builtins.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-builtins.jpg -------------------------------------------------------------------------------- /introduction/feature-debug.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-debug.jpg -------------------------------------------------------------------------------- /introduction/feature-graphics.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-graphics.jpg -------------------------------------------------------------------------------- /introduction/feature-gui.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-gui.jpg -------------------------------------------------------------------------------- /introduction/feature-outofbox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-outofbox.jpg -------------------------------------------------------------------------------- /introduction/feature-particles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-particles.jpg -------------------------------------------------------------------------------- /introduction/feature-perfmon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-perfmon.jpg -------------------------------------------------------------------------------- /introduction/feature-physics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-physics.png -------------------------------------------------------------------------------- /introduction/feature-pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-pipeline.png -------------------------------------------------------------------------------- /introduction/feature-python.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-python.jpg -------------------------------------------------------------------------------- /introduction/feature-wizard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/feature-wizard.jpg -------------------------------------------------------------------------------- /introduction/install-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/install-1.png -------------------------------------------------------------------------------- /introduction/install-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/install-2.png -------------------------------------------------------------------------------- /introduction/install-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/install-3.png -------------------------------------------------------------------------------- /introduction/msvc-2015-additional-deps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/msvc-2015-additional-deps.png -------------------------------------------------------------------------------- /introduction/msvc-2015-release-x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/msvc-2015-release-x64.png -------------------------------------------------------------------------------- /introduction/running-your-program-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/running-your-program-1.png -------------------------------------------------------------------------------- /introduction/running-your-program-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/running-your-program-2.png -------------------------------------------------------------------------------- /introduction/running-your-program-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/running-your-program-3.png -------------------------------------------------------------------------------- /introduction/running-your-program-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/running-your-program-4.png -------------------------------------------------------------------------------- /introduction/tutorial/controlling-the-camera.py: -------------------------------------------------------------------------------- 1 | from math import pi, sin, cos 2 | 3 | from direct.showbase.ShowBase import ShowBase 4 | from direct.task import Task 5 | 6 | 7 | class MyApp(ShowBase): 8 | def __init__(self): 9 | ShowBase.__init__(self) 10 | 11 | # Load the environment model. 12 | self.scene = self.loader.loadModel("models/environment") 13 | # Reparent the model to render. 14 | self.scene.reparentTo(self.render) 15 | # Apply scale and position transforms on the model. 16 | self.scene.setScale(0.25, 0.25, 0.25) 17 | self.scene.setPos(-8, 42, 0) 18 | 19 | # Add the spinCameraTask procedure to the task manager. 20 | self.taskMgr.add(self.spinCameraTask, "SpinCameraTask") 21 | 22 | # Define a procedure to move the camera. 23 | def spinCameraTask(self, task): 24 | angleDegrees = task.time * 6.0 25 | angleRadians = angleDegrees * (pi / 180.0) 26 | self.camera.setPos(20 * sin(angleRadians), -20 * cos(angleRadians), 3) 27 | self.camera.setHpr(angleDegrees, 0, 0) 28 | return Task.cont 29 | 30 | 31 | app = MyApp() 32 | app.run() 33 | -------------------------------------------------------------------------------- /introduction/tutorial/end.rst: -------------------------------------------------------------------------------- 1 | .. _tutorial-end: 2 | 3 | Tutorial End 4 | ============ 5 | 6 | This concludes the "A Panda Hello World" tutorial. For more information on any 7 | part of the Panda3D engine, consult the rest of the :ref:`Manual `. 8 | If you still have questions, don't hesitate to ask on the 9 | `Panda3D Forums `__ or on the 10 | `Panda3D Discord server `__. 11 | Have fun developing 3D applications with Panda3D! 12 | 13 | If you are looking for a more comprehensive tutorial for Panda3D, try out the 14 | `Beginner's Tutorial for Panda3D `__, 15 | contributed by community member Thaumaturge. 16 | -------------------------------------------------------------------------------- /introduction/tutorial/index.rst: -------------------------------------------------------------------------------- 1 | .. _tutorial: 2 | 3 | A Panda3D Hello World Tutorial 4 | ============================== 5 | 6 | This tutorial is called "A Panda Hello World". It is a typical example of a 7 | simple Panda3D program. Walking through this tutorial will enable you to obtain 8 | some limited familiarity with the Panda3D API without having to learn the entire 9 | thing. The program that we are going to create will load up a small scene 10 | containing some grass and a panda. The panda will be animated to walk back and 11 | forth over the grass. 12 | 13 | .. toctree:: 14 | :maxdepth: 2 15 | 16 | starting-panda3d 17 | loading-the-grassy-scenery 18 | controlling-the-camera 19 | loading-and-animating-the-panda-model 20 | using-intervals-to-move-the-panda 21 | end 22 | -------------------------------------------------------------------------------- /introduction/tutorial/loading-and-animating-the-panda-model.py: -------------------------------------------------------------------------------- 1 | from math import pi, sin, cos 2 | 3 | from direct.showbase.ShowBase import ShowBase 4 | from direct.task import Task 5 | from direct.actor.Actor import Actor 6 | 7 | 8 | class MyApp(ShowBase): 9 | def __init__(self): 10 | ShowBase.__init__(self) 11 | 12 | # Load the environment model. 13 | self.scene = self.loader.loadModel("models/environment") 14 | # Reparent the model to render. 15 | self.scene.reparentTo(self.render) 16 | # Apply scale and position transforms on the model. 17 | self.scene.setScale(0.25, 0.25, 0.25) 18 | self.scene.setPos(-8, 42, 0) 19 | 20 | # Add the spinCameraTask procedure to the task manager. 21 | self.taskMgr.add(self.spinCameraTask, "SpinCameraTask") 22 | 23 | # Load and transform the panda actor. 24 | self.pandaActor = Actor("models/panda-model", 25 | {"walk": "models/panda-walk4"}) 26 | self.pandaActor.setScale(0.005, 0.005, 0.005) 27 | self.pandaActor.reparentTo(self.render) 28 | # Loop its animation. 29 | self.pandaActor.loop("walk") 30 | 31 | # Define a procedure to move the camera. 32 | def spinCameraTask(self, task): 33 | angleDegrees = task.time * 6.0 34 | angleRadians = angleDegrees * (pi / 180.0) 35 | self.camera.setPos(20 * sin(angleRadians), -20 * cos(angleRadians), 3) 36 | self.camera.setHpr(angleDegrees, 0, 0) 37 | return Task.cont 38 | 39 | 40 | app = MyApp() 41 | app.run() 42 | -------------------------------------------------------------------------------- /introduction/tutorial/loading-the-grassy-scenery.cxx: -------------------------------------------------------------------------------- 1 | #include "pandaFramework.h" 2 | #include "pandaSystem.h" 3 | 4 | int main(int argc, char *argv[]) { 5 | // Load the window and set its title. 6 | PandaFramework framework; 7 | framework.open_framework(argc, argv); 8 | framework.set_window_title("My Panda3D Window"); 9 | WindowFramework *window = framework.open_window(); 10 | 11 | // Load the environment model. 12 | NodePath scene = window->load_model(framework.get_models(), "models/environment"); 13 | // Reparent the model to render. 14 | scene.reparent_to(window->get_render()); 15 | // Apply scale and position transforms to the model. 16 | scene.set_scale(0.25f, 0.25f, 0.25f); 17 | scene.set_pos(-8, 42, 0); 18 | 19 | // Run the engine. 20 | framework.main_loop(); 21 | // Shut down the engine when done. 22 | framework.close_framework(); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /introduction/tutorial/loading-the-grassy-scenery.py: -------------------------------------------------------------------------------- 1 | from direct.showbase.ShowBase import ShowBase 2 | 3 | 4 | class MyApp(ShowBase): 5 | 6 | def __init__(self): 7 | ShowBase.__init__(self) 8 | 9 | # Load the environment model. 10 | self.scene = self.loader.loadModel("models/environment") 11 | # Reparent the model to render. 12 | self.scene.reparentTo(self.render) 13 | # Apply scale and position transforms on the model. 14 | self.scene.setScale(0.25, 0.25, 0.25) 15 | self.scene.setPos(-8, 42, 0) 16 | 17 | 18 | app = MyApp() 19 | app.run() 20 | -------------------------------------------------------------------------------- /introduction/tutorial/tutorial1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/tutorial/tutorial1.jpg -------------------------------------------------------------------------------- /introduction/tutorial/tutorial2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/tutorial/tutorial2.jpg -------------------------------------------------------------------------------- /introduction/tutorial/tutorial3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/introduction/tutorial/tutorial3.jpg -------------------------------------------------------------------------------- /introduction/tutorial/using-intervals-to-move-the-panda.rst: -------------------------------------------------------------------------------- 1 | .. _using-intervals-to-move-the-panda: 2 | 3 | Using Intervals to move the Panda 4 | ================================= 5 | 6 | Intervals and Sequences 7 | ----------------------- 8 | 9 | :ref:`intervals` 10 | ~~~~~~~~~~~~~~~~ 11 | 12 | *Intervals* are tasks that change a property from one value to another over a 13 | specified period of time. Starting an interval effectively starts a background 14 | process that modifies the property over the specified period of time. 15 | 16 | :ref:`Sequences ` 17 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | 19 | *Sequences*, sometimes called *MetaIntervals*, are a type of interval that 20 | contains other intervals. Playing a sequence will cause each contained interval 21 | to execute in sequence, one after the other. 22 | 23 | The Program 24 | ----------- 25 | 26 | Update the Code 27 | ~~~~~~~~~~~~~~~ 28 | 29 | The next step is to cause the panda to actually move back and forth. Update the 30 | code to the following: 31 | 32 | .. only:: python 33 | 34 | .. literalinclude:: using-intervals-to-move-the-panda.py 35 | :language: python 36 | :linenos: 37 | 38 | .. only:: cpp 39 | 40 | .. literalinclude:: using-intervals-to-move-the-panda.cxx 41 | :language: cpp 42 | :linenos: 43 | 44 | When the ``pandaPosInterval1`` interval is started, it will gradually adjust the 45 | position of the panda from (0, 10, 0) to (0, -10, 0) over a period of 13 46 | seconds. Similarly, when the ``pandaHprInterval1`` interval is started, the 47 | heading of the panda will rotate 180 degrees over a period of 3 seconds. 48 | 49 | The ``pandaPace`` sequence above causes the panda to move in a straight line, 50 | turn, move in the opposite straight line, and finally turn again. The code 51 | ``pandaPace.loop()`` causes the Sequence to be started in looping mode. 52 | 53 | Run the Program 54 | ~~~~~~~~~~~~~~~ 55 | 56 | The result of all this is to cause the panda to pace back and forth from one 57 | tree to the other. 58 | -------------------------------------------------------------------------------- /make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /more-resources/irc-channel.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. _the-irc-channel: 4 | 5 | The IRC Channel 6 | =============== 7 | 8 | The IRC channel is a great place to talk to other developers that use Panda3D, 9 | and to ask questions about anything related to Panda3D. 10 | 11 | ======= ============================================= 12 | Network `Libera Chat `__ 13 | ======= ============================================= 14 | Server irc.libera.chat 15 | Channel `#panda3d `__ 16 | ======= ============================================= 17 | 18 | You need an IRC client to connect to the channel. If you do not have an IRC 19 | client, you can use the web client: https://web.libera.chat/#panda3d 20 | 21 | Although you will often get a response fairly quickly, depending on the time of 22 | day and timezone of our users, it may take longer for people to notice your 23 | message and respond. It is recommended that you stay on the channel after asking 24 | your question. Asking whether you may ask a question is pointless. 25 | -------------------------------------------------------------------------------- /more-resources/panda3d-16-game-engine-beginners-guide.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/panda3d-16-game-engine-beginners-guide.jpg -------------------------------------------------------------------------------- /more-resources/panda3d-17-game-developers-cookbook.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/panda3d-17-game-developers-cookbook.jpg -------------------------------------------------------------------------------- /more-resources/panda3d-art-creation-with-blender.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/panda3d-art-creation-with-blender.jpg -------------------------------------------------------------------------------- /more-resources/panda3d-game-development.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/panda3d-game-development.jpg -------------------------------------------------------------------------------- /more-resources/samples/asteroids.rst: -------------------------------------------------------------------------------- 1 | .. _asteroids: 2 | 3 | Sample Programs: Asteroids 4 | ========================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-asteroids.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This sample program shows how to use Tasks. Tasks are functions that run during 18 | every frame of the program. Panda3D runs a number of tasks during any program, 19 | but additional tasks may be added. For this tutorial, tasks will be used to 20 | update the ship, asteroid and bullet positions, in addition to checking for 21 | collisions. To do this, all the data you need to know is how much time has 22 | passed and the velocity of each object. 23 | 24 | .. note:: 25 | Adding lots of processor intensive tasks will have an adverse affect on the 26 | framerate/performance of your program. 27 | 28 | For more information on tasks, please consult the :ref:`tasks` section of the 29 | manual. 30 | 31 | .. rubric:: Back to the List of Sample Programs: 32 | 33 | :ref:`samples` 34 | -------------------------------------------------------------------------------- /more-resources/samples/ball-in-maze.rst: -------------------------------------------------------------------------------- 1 | .. _ball-in-maze: 2 | 3 | Sample Programs: Ball in Maze 4 | ============================= 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-ball-in-maze.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This tutorial will demonstrate how collision detection works in panda and 18 | provide a simple implementation of its use. Collisions are used extensively in 19 | modern games for a variety of purposes. At the most basic level, collision 20 | detection allows for two objects to bump into each other and react. This can be 21 | used to keep the objects from passing through each other but is not limited to 22 | that purpose. In this tutorial, collision detection be used to simulate the game 23 | of Labyrinth and will keep the ball within the bounds of the board. It will also 24 | be used to detect if the ball is over a hole. 25 | 26 | .. rubric:: Back to the List of Sample Programs: 27 | 28 | :ref:`samples` 29 | -------------------------------------------------------------------------------- /more-resources/samples/boxing-robots.rst: -------------------------------------------------------------------------------- 1 | .. _boxing-robots: 2 | 3 | Sample Programs: Boxing Robots 4 | ============================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-boxing-robots.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This tutorial will show how to play animations on models aka "actors". We will 18 | base this world on a the popular game of "Rock 'em Sock 'em Robots". 19 | 20 | Actors are specific models that come with some pre-generated animations. These 21 | animations are either available in the same egg file as the model or they are 22 | available as their own egg files. Only actors may play these animations, and 23 | actors also come with their own set of functions to use. Actors behave almost 24 | identically to models but use a different load command called ``Actor.Actor()``. 25 | For more information on actors, please consult the Panda3D online manual. 26 | 27 | The image above shows the tutorial in action. Use the A,S,K,L keys to make the 28 | robots punch and thus triggering their animations. 29 | 30 | .. rubric:: Back to the List of Sample Programs: 31 | 32 | :ref:`samples` 33 | -------------------------------------------------------------------------------- /more-resources/samples/carousel.rst: -------------------------------------------------------------------------------- 1 | .. _carousel: 2 | 3 | Sample Programs: Carousel 4 | ========================= 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-carousel.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This sample progam demonstrates some uses for intervals in panda to move objects 18 | in your panda world. 19 | 20 | Intervals are built in Panda3D functions that will let you change an attribute 21 | over time. In this tutorial, the position and texture attributes of various 22 | objects will be altered over time to give life to a carousel. The most common 23 | intervals for doing simple movement of objects are the posInterval and 24 | hprInterval. These intervals will change the position/orientation of an object 25 | (or node) over a given time and given displacement/rotation, respectively. 26 | Another interval we will look at is the LerpFunc interval. LerpFunc will call a 27 | function and give it a linearly interpolated value range over a specified time 28 | range. This is how we will oscilate pandas via a sin wave and alternate textures 29 | over time. For more information on intervals, please refer to the intervals 30 | section of the online manual. 31 | 32 | .. rubric:: Back to the List of Sample Programs: 33 | 34 | :ref:`samples` 35 | -------------------------------------------------------------------------------- /more-resources/samples/cartoon-shader.rst: -------------------------------------------------------------------------------- 1 | .. _cartoon-shader: 2 | 3 | Sample Programs: Cartoon Shader 4 | =============================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-cartoon-shader.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This tutorial will show how to make a cartoon shader. It requires three separate 18 | shaders. On video cards that do not support shaders, the results will not be 19 | interesting. 20 | 21 | Every frame, the scene is rendered into the main window using a "lighting 22 | shader." The lighting shader calculates lighting pretty much the same way OpenGL 23 | always does, but it adds a threshold function, so that the line between light 24 | and dark is a clear, discrete line. 25 | 26 | Every frame, the scene is also rendered into an offscreen buffer using a shader 27 | that stores the surface normals into the buffer. Every frame, the contents of 28 | this buffer are copied to a texture. The result is a "surface normals texture." 29 | The lower-right corner of the screen contains a small quad showing the contents 30 | of the "surface normals texture." 31 | 32 | The surface normals texture is applied to the main window using a fullscreen 33 | quad. A shader that detects edges is run on this quad. Wherever there is a 34 | discontinuity in the normals, the shader outputs black. Otherwise, it outputs a 35 | transparent pixel. This creates the lines around the model. 36 | 37 | The model itself isn't even textured - it's vertex colored. Untextured models 38 | often look great in cartoon-shaded worlds. 39 | 40 | The image above shows the tutorial in action. 41 | 42 | .. rubric:: Back to the List of Sample Programs: 43 | 44 | :ref:`samples` 45 | -------------------------------------------------------------------------------- /more-resources/samples/chessboard.rst: -------------------------------------------------------------------------------- 1 | .. _chessboard: 2 | 3 | Sample Programs: Chessboard 4 | =========================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-chessboard.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This sample program demonstrates how to use the mouse cursor interactively in 18 | your panda world. It is sometimes desirable to be able to interact with objects 19 | in a 3D scene via a mouse cursor. There are many solutions to this problem and 20 | this tutorial will cover a popular method. The method used in this tutorial will 21 | use collision detection to determine which objects the mouse cursor is hovering 22 | over. By using collision rays and shooting them from the lens (camera) with 23 | respect to the current position of the mouse cursor, we can hit objects that are 24 | being covered by the cursor. 25 | 26 | Note that there's a much faster way to achieve this, using the Plane class. 27 | However, this sample demonstrates how it can be done using the Collision system. 28 | 29 | .. rubric:: Back to the List of Sample Programs: 30 | 31 | :ref:`samples` 32 | -------------------------------------------------------------------------------- /more-resources/samples/disco-lights.rst: -------------------------------------------------------------------------------- 1 | .. _disco-lights: 2 | 3 | Sample Programs: Disco Lights 4 | ============================= 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-disco-lights.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This sample program demonstrates lighting in panda. Lighting in panda can add a 18 | lot of depth into a scene. In panda, you can create point, directional, ambient 19 | and spot lights (for a detailed description of these lights, see the manual link 20 | below). Lights in Panda can also optionally cast shadows. 21 | For more information on lighting, please consult the Panda3D online manual. 22 | 23 | .. rubric:: Back to the List of Sample Programs: 24 | 25 | :ref:`samples` 26 | -------------------------------------------------------------------------------- /more-resources/samples/distortion.rst: -------------------------------------------------------------------------------- 1 | .. _distortion: 2 | 3 | Sample Programs: Distortion 4 | =========================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-distortion.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | Creates an interesting shader effect where the entire screen is rendered into a 18 | texture. 19 | 20 | .. rubric:: Back to the List of Sample Programs: 21 | 22 | :ref:`samples` 23 | -------------------------------------------------------------------------------- /more-resources/samples/fractal-plants.rst: -------------------------------------------------------------------------------- 1 | .. _fractal-plants: 2 | 3 | Sample Programs: Fractal Plants 4 | =============================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-fractal-plants.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This sample program isn't so much about fractals as it is about synthesizing a 18 | 3D model. Ie, this program does not include any 3D models on disk - it generates 19 | the trees procedurally. 20 | 21 | .. rubric:: Back to the List of Sample Programs: 22 | 23 | :ref:`samples` 24 | -------------------------------------------------------------------------------- /more-resources/samples/infinite-tunnel.rst: -------------------------------------------------------------------------------- 1 | .. _infinite-tunnel: 2 | 3 | Sample Programs: Infinite Tunnel 4 | ================================ 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-infinite-tunnel.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This tutorial will cover fog and how it can be used to make a finite length 18 | tunnel seem endless by hiding its endpoint in darkness. Fog in panda works be 19 | coloring objects based on their distance from the camera. Fog is not a 3D volume 20 | object like real world fog. With the right settings, Fog in panda can mimic the 21 | appearance of real world fog. 22 | 23 | The way fog in Panda works is by coloring the models in the world. Fog cannot 24 | exist without any objects in the scene. The parts of the object which are 25 | furthest from the camera will get gradually colored by the color specified for 26 | the fog. If this color blends in with the background, it will appear as it the 27 | object is being occluded by a 'cloud' of fog. 28 | 29 | .. rubric:: Back to the List of Sample Programs: 30 | 31 | :ref:`samples` 32 | -------------------------------------------------------------------------------- /more-resources/samples/media-player.rst: -------------------------------------------------------------------------------- 1 | .. _media-player: 2 | 3 | Sample Programs: Media Player 4 | ============================= 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-media-player.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This sample program shows how to play a movie in panda. This is particularly 18 | useful for cut-scenes, but movies can also be used as animated textures on the 19 | surfaces of objects. This sample shows both video and audio, and how to 20 | synchronize them properly. 21 | 22 | .. rubric:: Back to the List of Sample Programs: 23 | 24 | :ref:`samples` 25 | -------------------------------------------------------------------------------- /more-resources/samples/music-box.rst: -------------------------------------------------------------------------------- 1 | .. _music-box: 2 | 3 | Sample Programs: Music Box 4 | ========================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-music-box.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | Music Box is a simple program that allows you to play sounds. It demonstrates 18 | playing sounds, and creating GUI buttons and sliders. 19 | 20 | .. rubric:: Back to the List of Sample Programs: 21 | 22 | :ref:`samples` 23 | -------------------------------------------------------------------------------- /more-resources/samples/procedural-cube.rst: -------------------------------------------------------------------------------- 1 | .. _procedural-cube: 2 | 3 | Sample Programs: Procedural Cube 4 | ================================ 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-procedural-cube.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This program synthesizes a 3D model of a cube. If you need to see in the minimum 18 | number of lines of code how to synthesize a model, this is the sample you want. 19 | 20 | .. rubric:: Back to the List of Sample Programs: 21 | 22 | :ref:`samples` 23 | -------------------------------------------------------------------------------- /more-resources/samples/render-to-texture.rst: -------------------------------------------------------------------------------- 1 | .. _render-to-texture: 2 | 3 | Sample Programs: Teapot on TV 4 | ============================= 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-render-to-texture.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | In this tutorial, a spinning teapot is rendered into a texture. Then, the 18 | texture (which contains a picture of a teapot) is applied to the face of an 19 | animated TV-headed character, who dances. 20 | 21 | .. rubric:: Back to the List of Sample Programs: 22 | 23 | :ref:`samples` 24 | -------------------------------------------------------------------------------- /more-resources/samples/roaming-ralph.rst: -------------------------------------------------------------------------------- 1 | .. _roaming-ralph: 2 | 3 | Sample Programs: Roaming Ralph 4 | ============================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-roaming-ralph.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This tutorial shows a character walking on uneven terrain. He rises and falls 18 | with the contours of the terrain, stops when he runs into a tree or a rock, and 19 | won't walk off the edge. The camera follows him, also moving intelligently over 20 | the terrain, and you have some control over the camera angle. The character's 21 | body animates sensibly according to his motion. 22 | 23 | Much of this is implemented using collision rays to detect the height of the 24 | terrain and the presence of obstacles. 25 | 26 | .. caution:: 27 | 28 | This program uses an extremely inefficient method for detecting the height of 29 | the terrain. There is a much better way to do it, but we have not had time to 30 | correct the sample program. 31 | 32 | .. rubric:: Back to the List of Sample Programs: 33 | 34 | :ref:`samples` 35 | -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-asteroids.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-asteroids.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-ball-in-maze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-ball-in-maze.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-boxing-robots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-boxing-robots.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-bump-mapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-bump-mapping.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-carousel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-carousel.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-cartoon-shader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-cartoon-shader.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-chessboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-chessboard.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-culling-occluder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-culling-occluder.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-culling-portal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-culling-portal.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-disco-lights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-disco-lights.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-distortion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-distortion.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-fireflies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-fireflies.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-fractal-plants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-fractal-plants.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-gamepad-mapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-gamepad-mapping.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-gamepad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-gamepad.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-glow-filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-glow-filter.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-infinite-tunnel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-infinite-tunnel.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-looking-and-gripping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-looking-and-gripping.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-media-player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-media-player.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-motion-trails-fireball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-motion-trails-fireball.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-motion-trails-framebuffer-feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-motion-trails-framebuffer-feedback.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-music-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-music-box.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-particles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-particles.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-procedural-cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-procedural-cube.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-render-to-texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-render-to-texture.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-roaming-ralph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-roaming-ralph.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-shadows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-shadows.png -------------------------------------------------------------------------------- /more-resources/samples/screenshot-sample-programs-solar-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/screenshot-sample-programs-solar-system.png -------------------------------------------------------------------------------- /more-resources/samples/shadows.rst: -------------------------------------------------------------------------------- 1 | .. _shadows: 2 | 3 | Sample Programs: Shadows 4 | ======================== 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-shadows.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This program shows how to use shadow maps in Panda3D. This is a technique for 18 | dynamic shadowing. 19 | 20 | .. rubric:: Back to the List of Sample Programs: 21 | 22 | :ref:`samples` 23 | -------------------------------------------------------------------------------- /more-resources/samples/solar-system.rst: -------------------------------------------------------------------------------- 1 | .. _solar-system: 2 | 3 | Sample Programs: Solar System 4 | ============================= 5 | 6 | To run a sample program, you need to install Panda3D. 7 | If you're a Windows user, you'll find the sample programs in your start menu. 8 | If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. 9 | 10 | .. rubric:: Screenshots 11 | 12 | .. image:: screenshot-sample-programs-solar-system.png 13 | :height: 392 14 | 15 | .. rubric:: Explanation 16 | 17 | This sample program shows planets orbiting around the sun, and a moon orbiting 18 | one of the planets. If you just stare at the moon, you'll realize that its 19 | motion is a spiral: 20 | 21 | .. image:: spirograph.png 22 | 23 | The motion of the moon is only simple if you think about it in relative terms: 24 | the moon is moving in a circle relative to the planet, and the planet is 25 | moving in a circle relative to the sun. 26 | 27 | This panda program shows how to implement relative movement and relative 28 | positioning. 29 | 30 | .. rubric:: Back to the List of Sample Programs: 31 | 32 | :ref:`samples` 33 | -------------------------------------------------------------------------------- /more-resources/samples/spirograph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/more-resources/samples/spirograph.png -------------------------------------------------------------------------------- /more-resources/user-contributed-tutorials-and-examples.rst: -------------------------------------------------------------------------------- 1 | .. _user-contributed-tutorials-and-examples: 2 | 3 | User Contributed Tutorials and Examples 4 | ======================================= 5 | 6 | The following are some open source games and some example code snippets made 7 | by Panda3D users. They are by private individuals not affiliated with the 8 | Panda3D core development team, we cannot vouch that they are valid with every 9 | version of Panda3D. This is not a complete and up-to-date list of all the open 10 | source games and code snippets. Check the appropriate forum sections for all 11 | the contributions. 12 | 13 | Tutorials 14 | --------- 15 | 16 | MyGameFast: http://www.mygamefast.com/ 17 | 18 | Open source games 19 | ----------------- 20 | 21 | Tagger: https://discourse.panda3d.org/t/tagger/7322 22 | 23 | Pac-Bat pac-man clone: https://discourse.panda3d.org/t/pac-bat/11035 24 | 25 | A3P: https://discourse.panda3d.org/t/a3p-formerly-stainless/7335 26 | 27 | Naith: https://code.google.com/archive/p/naith 28 | 29 | 3d-rama pong: https://discourse.panda3d.org/t/3d-rama-pong/9427 30 | 31 | Yorg: https://www.ya2.it/pages/yorg.html 32 | 33 | The Traveling Fox: https://discourse.panda3d.org/t/the-traveling-fox/15815 34 | 35 | Code snippets 36 | ------------- 37 | 38 | There are a number of useful code snippets available on the community forums: 39 | 40 | https://discourse.panda3d.org/c/code-snippets/12 41 | -------------------------------------------------------------------------------- /optimization/performance-issues/excessive-fill.rst: -------------------------------------------------------------------------------- 1 | .. _excessive-fill: 2 | 3 | Excessive Fill 4 | ============== 5 | 6 | The fill rate of the video card is number of pixels it can render per second. 7 | Objects that are occluded (behind other objects) still consume fill rate. The 8 | total fill-consumption of the scene is the total screen real estate of all 9 | objects, including the occluded ones. Particles, in particular, can consume 10 | fill-rate like crazy, especially if the camera gets close to the particles. 11 | 12 | Transparency 13 | ------------ 14 | 15 | In general, it is better for your graphics card to render the polygons 16 | front-to-back, because a depth test can be used to toss out the occluded 17 | fragments before they are written to the framebuffer. 18 | 19 | When enabling the M_alpha or M_dual transparency modes, however, Panda forces 20 | the nodes with this transparency mode to be sorted back-to-front. This is 21 | necessary for alpha blending to work correctly. If you have many occluded 22 | polygons in view, for example thousands of blades of grass that are positioned 23 | behind each other, this may quickly consume your fill rate. 24 | 25 | Do not enable transparency modes unless it is necessary, and when you do, 26 | consider using the M_binary mode, which does not require back-to-front sorting. 27 | However, if alpha blending is required and if large areas of the polygons are 28 | fully transparent, using M_dual may provide an improvement over M_alpha. 29 | 30 | For a more in-depth explanation on the various transparency modes, see 31 | :ref:`transparency-and-blending`. 32 | -------------------------------------------------------------------------------- /optimization/performance-issues/failure-to-garbage-collect.rst: -------------------------------------------------------------------------------- 1 | .. _failure-to-garbage-collect: 2 | 3 | Failure to Garbage Collect 4 | ========================== 5 | 6 | It's easy to get used to the fact that Python's garbage collector can 7 | automatically clean up Panda3D data structures. Unfortunately, there are a few 8 | structures that can't be cleaned up automatically. You need to know what they 9 | are, or you may end up with a leak. 10 | 11 | Unloading Models and Textures 12 | ----------------------------- 13 | 14 | Normally, models that are loaded are automatically cached in memory, in the 15 | :class:`.ModelPool`. This is very useful if a model is loaded more than once in 16 | an application, so that Panda3D does not need to reload the model if it is 17 | loaded again. However, it can also mean that these models unnecessarily use up 18 | memory even if it is no longer needed. Consult the :class:`.ModelPool` reference 19 | to find out how to release models from this cache. 20 | 21 | The same applies to textures, which are cached in the :class:`.TexturePool`, and 22 | fonts, which are cached in the :class:`.FontPool`. 23 | 24 | .. only:: python 25 | 26 | Reference Cycles with Python Tags 27 | --------------------------------- 28 | 29 | When using Python tags to store references to Panda3D objects, it is easy to 30 | accidentally create a reference cycle that Python's garbage collector cannot 31 | detect. This scenario is explained on the page :ref:`subclassing`. 32 | 33 | Removing Custom Class Instances 34 | ------------------------------- 35 | 36 | When using custom Python classes that manage Panda3D objects, there are a few 37 | things to be aware of in order to ensure that they get cleaned up properly. 38 | These are explained on the page :ref:`removing-custom-class-instances`. 39 | -------------------------------------------------------------------------------- /optimization/performance-issues/memory-full.rst: -------------------------------------------------------------------------------- 1 | .. _memory-full: 2 | 3 | Memory Full 4 | =========== 5 | 6 | A floating-point number takes four bytes. Just one vertex contains (X,Y,Z), and 7 | a normal, and a texture coordinate. An RGBA color takes four bytes, so a 8 | 1024x1024 texture is four megabytes. Do the math, and you'll see how fast it all 9 | adds up. 10 | 11 | If CPU memory is used excessively, it is possible to use PStats to find out 12 | which Panda3D structures are using the most memory. Click the "System memory" 13 | graph, and then navigate down into the various subcollectors to find out the 14 | cause of the high memory consumption. 15 | 16 | Also see the page :ref:`failure-to-garbage-collect` for a possible cause of CPU 17 | memory filling up. 18 | -------------------------------------------------------------------------------- /optimization/performance-issues/miscellaneous.rst: -------------------------------------------------------------------------------- 1 | .. _miscellaneous: 2 | 3 | Miscellaneous 4 | ============= 5 | 6 | This page lists a number of miscellaneous things that can possibly be a cause 7 | of bad performance in your game. 8 | 9 | - You are using textures with a width or height that is not a power of two. 10 | This could cause Panda3D to resize the textures, which can slow your game 11 | down a lot. Always try to stick to powers of two when 12 | :ref:`choosing a Texture Size `. 13 | - You are printing too much to the console every frame. Printing to the 14 | console, especially on Windows, can cause a slow-down of your application. 15 | Always check your console whether its not flooded with errors or debug 16 | messages. You might want to consider output buffering or, on Windows, using 17 | pythonw (python running with windows subsystem instead of console subsystem) 18 | if you are experiencing this issue. 19 | -------------------------------------------------------------------------------- /optimization/performance-issues/pstats-python-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/optimization/performance-issues/pstats-python-time.png -------------------------------------------------------------------------------- /optimization/performance-issues/pstats-skinning-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/optimization/performance-issues/pstats-skinning-time.png -------------------------------------------------------------------------------- /optimization/performance-issues/too-many-state-changes.rst: -------------------------------------------------------------------------------- 1 | .. _too-many-state-changes: 2 | 3 | Too Many State Changes 4 | ====================== 5 | 6 | The state of an object is the sum of its color, material, light, fog, and other 7 | attributes. It can be expensive, for a variety of reasons, to have too many 8 | different states in your scene. It is better if many objects share the same 9 | state. 10 | 11 | One example is a model that consists of various parts, each with its own texture 12 | and UV map. A texture is a kind of state change, so this will not be very 13 | efficient. A better way to do this is to combine all the textures of the 14 | different parts into a single larger texture, and use the UV map to reference 15 | different parts of the same texture. This way, Panda only needs to send only a 16 | single texture state change to the graphics card, rather than one for each part. 17 | 18 | If different parts of the model all have their own state, this will additionally 19 | prevent Panda from being able to flatten these parts of the model together, as 20 | explained in :ref:`too-many-meshes`. 21 | -------------------------------------------------------------------------------- /optimization/performance-issues/too-many-text-updates.rst: -------------------------------------------------------------------------------- 1 | .. _too-many-text-updates: 2 | 3 | Too Many Text Updates 4 | ===================== 5 | 6 | If you are using the :ref:`TextNode ` or :ref:`onscreentext` (or 7 | similar) interfaces, and you have large chunks of text changing every frame, you 8 | might find it to be a big performance hit. Panda3D does a lot of work to 9 | assemble the text, so you will want to minimize unnecessary calls to 10 | :meth:`~.TextNode.set_text()` or related functions that force the text to be 11 | recomputed. 12 | 13 | On the other hand, if you really want to change your text frequently, you can 14 | try putting this in your :ref:`Config.prc ` file:: 15 | 16 | text-flatten 0 17 | 18 | This will remove the call to :meth:`~.NodePath.flatten_strong()` within the text 19 | generation process. 20 | Changing the text may be a bit faster, but rendering the resulting text might be 21 | slower, since you will be dealing with :ref:`more meshes ` in 22 | your scene graph. 23 | 24 | If you have a lot of different glyphs, Panda may spend more effort garbage 25 | collecting used glyphs in order to conserve texture memory. You can increase 26 | the default texture size to improve the performance of this, for example:: 27 | 28 | text-page-size 512 512 29 | -------------------------------------------------------------------------------- /optimization/pstats-strip-chart-level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/optimization/pstats-strip-chart-level.png -------------------------------------------------------------------------------- /optimization/pstats-strip-chart-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/optimization/pstats-strip-chart-time.png -------------------------------------------------------------------------------- /pipeline/blender-gltf-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/blender-gltf-1.png -------------------------------------------------------------------------------- /pipeline/blender-gltf-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/blender-gltf-2.png -------------------------------------------------------------------------------- /pipeline/index.rst: -------------------------------------------------------------------------------- 1 | .. _asset-pipeline: 2 | 3 | Asset Pipeline 4 | ============== 5 | 6 | This section explains how to import content produced in other tools into 7 | Panda3D. 8 | 9 | Table of Contents 10 | ----------------- 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | :titlesonly: 15 | 16 | model-file-formats 17 | egg-files/index 18 | gltf-files 19 | converting-from-blender 20 | converting-from-maya 21 | converting-from-3ds-max 22 | previewing-models 23 | tips 24 | -------------------------------------------------------------------------------- /pipeline/launchmpt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/launchmpt.jpg -------------------------------------------------------------------------------- /pipeline/max-script.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/max-script.jpg -------------------------------------------------------------------------------- /pipeline/maxexp1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maxexp1.jpg -------------------------------------------------------------------------------- /pipeline/maxexp2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maxexp2.jpg -------------------------------------------------------------------------------- /pipeline/maxexp3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maxexp3.jpg -------------------------------------------------------------------------------- /pipeline/maxexp4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maxexp4.jpg -------------------------------------------------------------------------------- /pipeline/maxexp5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maxexp5.jpg -------------------------------------------------------------------------------- /pipeline/maxexp6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maxexp6.jpg -------------------------------------------------------------------------------- /pipeline/maya-egg-gui-advanced.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-egg-gui-advanced.jpg -------------------------------------------------------------------------------- /pipeline/maya-egg-gui-simple.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-egg-gui-simple.jpg -------------------------------------------------------------------------------- /pipeline/maya-egg-palettize-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-egg-palettize-1.jpg -------------------------------------------------------------------------------- /pipeline/maya-egg-palettize-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-egg-palettize-2.jpg -------------------------------------------------------------------------------- /pipeline/maya-egg-palettize-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-egg-palettize-3.jpg -------------------------------------------------------------------------------- /pipeline/maya-exporter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-exporter.png -------------------------------------------------------------------------------- /pipeline/maya-hyper-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-hyper-1.jpg -------------------------------------------------------------------------------- /pipeline/maya-hyper-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-hyper-2.jpg -------------------------------------------------------------------------------- /pipeline/maya-hyper-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-hyper-3.jpg -------------------------------------------------------------------------------- /pipeline/maya-hyper-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-hyper-4.jpg -------------------------------------------------------------------------------- /pipeline/maya-hyper-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-hyper-5.jpg -------------------------------------------------------------------------------- /pipeline/maya-hyper-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-hyper-6.jpg -------------------------------------------------------------------------------- /pipeline/maya-hyper-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-hyper-7.jpg -------------------------------------------------------------------------------- /pipeline/maya-hypershade.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-hypershade.jpg -------------------------------------------------------------------------------- /pipeline/maya-tex-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-tex-1.jpg -------------------------------------------------------------------------------- /pipeline/maya-tex-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-tex-2.jpg -------------------------------------------------------------------------------- /pipeline/maya-tex-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-tex-3.jpg -------------------------------------------------------------------------------- /pipeline/maya-tex-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/maya-tex-4.jpg -------------------------------------------------------------------------------- /pipeline/mayacommandlineexport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/mayacommandlineexport.png -------------------------------------------------------------------------------- /pipeline/mayapandatoolload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/mayapandatoolload.png -------------------------------------------------------------------------------- /pipeline/obj-props.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/obj-props.jpg -------------------------------------------------------------------------------- /pipeline/object-properties.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/object-properties.jpg -------------------------------------------------------------------------------- /pipeline/pview-sample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/pipeline/pview-sample.jpg -------------------------------------------------------------------------------- /programming/advanced-loading/index.rst: -------------------------------------------------------------------------------- 1 | .. _advanced-loading: 2 | 3 | Advanced Loading Techniques 4 | =========================== 5 | 6 | Whereas the basics of loading models and animations has already been touched 7 | upon in the :ref:`model-files` and :ref:`animated-models` sections, Panda's 8 | asset loading system is very advanced, supporting loads from arbitrary sources, 9 | a virtual file system, and asynchronous (threaded) loading. This section 10 | describes some of the possibilities in more detail. 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | 15 | filename-syntax 16 | async 17 | virtual-file-system 18 | multifiles 19 | loading-resources-from-memory 20 | patching 21 | -------------------------------------------------------------------------------- /programming/advanced-loading/loading-resources-from-memory.rst: -------------------------------------------------------------------------------- 1 | .. _loading-resources-from-memory: 2 | 3 | Loading Resources from Memory 4 | ============================= 5 | 6 | If you have want to load a resource from a different spot then a hard drive or 7 | inside a multifile, say for instance database or network packet you can using 8 | a StringStream. 9 | 10 | Here is an example that reads and image into data and then uses StringStream 11 | to feed that data into the image. 12 | 13 | .. code-block:: python 14 | 15 | data = open('my-image-file.png', 'rb').read() 16 | # send data over network or any other place and pass it on 17 | p = PNMImage() 18 | p.read(StringStream(data)) 19 | tex = Texture() 20 | tex.load(p) 21 | 22 | But, you can go one step further. Instead of just loading textures, models, 23 | sounds or other data one at a time this way, you can load an entire multifile, 24 | which as we learned in the previous section can contain any number of models, 25 | textures, sounds and other data. 26 | 27 | .. code-block:: python 28 | 29 | data = open('my-multifile.mf', 'rb').read() 30 | stream = StringStream(data) 31 | mf = Multifile() 32 | mf.openRead(stream) 33 | vfs = VirtualFileSystem.getGlobalPtr() 34 | vfs.mount(mf, '/mf', 0) 35 | smiley = loader.loadModel('/mf/smiley.egg') 36 | -------------------------------------------------------------------------------- /programming/advanced-loading/patching.rst: -------------------------------------------------------------------------------- 1 | .. _patching: 2 | 3 | Patching 4 | ======== 5 | 6 | Patching is a process of generating the difference between 2 files: 7 | 8 | .. code-block:: python 9 | 10 | p = Patchfile() 11 | p.build('version_1.mf', 'version_2.mf', 'v1_to_v2.patch') 12 | 13 | This will generate the file v1_to_v2.patch based on the differences between 14 | version_1.mf and version_2.mf. Then when you have version_1.mf and 15 | v1_to_v2.patch, you can produce version_2.mf with: 16 | 17 | .. code-block:: python 18 | 19 | p = Patchfile() 20 | p.apply(Filename('v1_to_v2.patch'), Filename('version_1.mf')) 21 | 22 | There are other, more esoteric options, for limiting memory usage during 23 | patching, or for patching in increments instead of all at once so you can update 24 | a progress bar. 25 | 26 | In the example above the files are named \*.mf. This example suggests that you 27 | might be patching files in Panda's Multifile format (\*.mf). The multifiles can 28 | store multiple resources like bams, textures, mp3's, and so on, and Panda can 29 | load them from directly from the multifiles without having to unpack them first. 30 | 31 | The Patchfile object works on any arbitrary binary files; you don't need to 32 | limit yourself to just patching multifiles. However, the Patchfile does 33 | recognize a multifile and treats it as a special case; it can build patches for 34 | large multifiles without running out of memory, while building a patch for a 35 | large generic binary file might require so much memory it brings your system to 36 | its knees. (Applying patches doesn't require much memory, however.) 37 | 38 | Patchfiles are not automatically compressed. You can do that yourself. Also, I 39 | recommend patching uncompressed source files for best results. (You can build 40 | patches against compressed source files, but the resulting patchfiles will tend 41 | to be much larger than the same patchfiles built against the original 42 | uncompressed files.) 43 | -------------------------------------------------------------------------------- /programming/advanced-loading/virtual-file-system.rst: -------------------------------------------------------------------------------- 1 | .. _virtual-file-system: 2 | 3 | The Virtual File System 4 | ======================= 5 | 6 | General file reading in Panda is handled by the Virtual File System. 7 | 8 | Although it presents the files and directories that it provides access to as a 9 | single, unbroken file system, it can in fact include files from multiple 10 | sources (such as :ref:`multifiles`) in the hierarchy, regardless of the 11 | underlying structure. 12 | 13 | This has the advantage of allowing one to access files and directories without 14 | worrying overmuch about where they actually reside, and even access Multifile 15 | archives as a directory hierarchy. 16 | 17 | .. only:: python 18 | 19 | Python Interface 20 | ---------------- 21 | 22 | Panda3D offers a replacement for the Python file module that supports the 23 | virtual file system. You can find it in :py:mod:`direct.stdpy.file`. 24 | The interface is exactly the same as Python's, so it's safe to put this 25 | import above all the files where you want to use the :func:`open()` function: 26 | 27 | .. code-block:: python 28 | 29 | from direct.stdpy.file import * 30 | 31 | This module reimplements Python's file I/O mechanisms using Panda constructs. 32 | This enables Python to interface more easily with Panda's virtual file 33 | system, and it also better-supports Panda's SIMPLE_THREADS model, by avoiding 34 | blocking all threads while waiting for I/O to complete. 35 | 36 | Besides the :py:func:`~direct.stdpy.file.open()` call, this module also 37 | contains replacements for various other functions provided by the Python 38 | :py:mod:`os` and :py:mod:`os.path` modules. 39 | See the :py:mod:`API reference page ` for a full listing. 40 | 41 | 42 | .. note:: This section is incomplete. 43 | -------------------------------------------------------------------------------- /programming/audio/audio-managers.rst: -------------------------------------------------------------------------------- 1 | .. _audio-managers: 2 | 3 | Audio Managers 4 | ============== 5 | 6 | Sound effects and music in code are implemented as :class:`.AudioManager` 7 | objects. You can access these audio managers with the following code: 8 | 9 | .. code-block:: python 10 | 11 | sfxMgr = base.sfxManagerList[0] 12 | musicMgr = base.musicManager 13 | 14 | In :py:obj:`~builtins.base`, :py:obj:`sfxManagerList 15 | ` is a list of 16 | :class:`.AudioManager` objects intended to be used for sound effects, and 17 | :py:obj:`musicManager ` is an 18 | :class:`.AudioManager` object intended to be used for music. 19 | 20 | Each :class:`.AudioManager` object can have 16 different sounds cached at a 21 | given time. This value is actually set as the ``audio-cache-limit`` in the panda 22 | config.prc (found in your install directory) and can be changed. 23 | 24 | .. only:: python 25 | 26 | By default, :py:obj:`base.musicManager 27 | ` has a limit of 1 concurrent 28 | sound, however. This limit can be explicitly increased using the following 29 | code: 30 | 31 | .. code-block:: python 32 | 33 | # Allow playing two music files at the same time. 34 | base.musicManager.setConcurrentSoundLimit(2) 35 | 36 | There are times where either sound effects, music, or both should be disabled 37 | and later enabled. These commands affect entire categories of sounds. Passing 38 | True or False in the last 2 functions will disable or enable the respective 39 | groups. 40 | 41 | .. code-block:: python 42 | 43 | base.disableAllAudio() 44 | base.enableAllAudio() 45 | base.enableMusic(True) 46 | base.enableSoundEffects(True) 47 | 48 | Positional audio is implemented through a wrapper of these objects and is 49 | covered in the next section, :ref:`3d-audio`. 50 | -------------------------------------------------------------------------------- /programming/audio/multi-channel.rst: -------------------------------------------------------------------------------- 1 | .. _multi-channel: 2 | 3 | Multi-Channel 4 | ============= 5 | 6 | Summary 7 | ------- 8 | 9 | To Enable FMOD to use 5.1 Surround Sound uncomment/add the following line in 10 | the config.prc file:: 11 | 12 | fmod-use-surround-sound true 13 | 14 | 15 | -------------------------------------------------------------------------------- /programming/camera-control/index.rst: -------------------------------------------------------------------------------- 1 | .. _camera-control: 2 | 3 | Camera Control 4 | ============== 5 | 6 | Panda3D's camera is considered a :class:`.PandaNode`. It can therefore be 7 | manipulated as any other node. 8 | 9 | The actual camera is defined in ShowBase as a :class:`.NodePath` named 10 | :py:obj:`base.cam `. 11 | There is also a plain node above the camera, which is a NodePath called 12 | :py:obj:`base.camera `. 13 | Generally you want to control the latter with your code. 14 | 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | default-camera-driver 20 | perspective-lenses 21 | orthographic-lenses 22 | -------------------------------------------------------------------------------- /programming/camera-control/lens-tutorial-orthographic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/camera-control/lens-tutorial-orthographic.jpg -------------------------------------------------------------------------------- /programming/camera-control/lens-tutorial-perspective.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/camera-control/lens-tutorial-perspective.jpg -------------------------------------------------------------------------------- /programming/camera-control/lens-tutorial-top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/camera-control/lens-tutorial-top.jpg -------------------------------------------------------------------------------- /programming/collision-detection/bitmask-example.rst: -------------------------------------------------------------------------------- 1 | .. _bitmask-example: 2 | 3 | Bitmask Example 4 | =============== 5 | 6 | .. only:: python 7 | 8 | Here is a short example of using bitmasks to selectively test collisions 9 | against different object in the scene: 10 | 11 | .. literalinclude:: bitmask-example.py 12 | :language: python 13 | :linenos: 14 | 15 | .. image:: collisionbitmasks.png 16 | 17 | .. only:: cpp 18 | 19 | -------------------------------------------------------------------------------- /programming/collision-detection/collisionbitmasks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/collision-detection/collisionbitmasks.png -------------------------------------------------------------------------------- /programming/collision-detection/event-example.rst: -------------------------------------------------------------------------------- 1 | .. _event-example: 2 | 3 | Event Example 4 | ============= 5 | 6 | .. only:: python 7 | 8 | Here is a short example of using the Collision Handler Events: 9 | 10 | .. literalinclude:: event-example.py 11 | :language: python 12 | :linenos: 13 | 14 | .. only:: cpp 15 | 16 | -------------------------------------------------------------------------------- /programming/collision-detection/index.rst: -------------------------------------------------------------------------------- 1 | .. _collision-detection: 2 | 3 | Collision Detection 4 | =================== 5 | 6 | Collision detection allows for two objects to bump into each other and react. 7 | This includes not only sending messages for events, but also to keep the 8 | objects from passing through each other. Collision detection is a very 9 | powerful tool for immersion, but it is somewhat complex. 10 | 11 | There are two ways to go about collision detection. One is to create special 12 | collision geometry, such as spheres and polygons, to determine collisions. The 13 | other is to allow collisions against all geometry. While the first is somewhat 14 | more complex and takes more effort to implement, it is much faster to execute 15 | and is a better long-term solution. For quick-and-dirty applications, though, 16 | collision with geometry can be a fine solution. 17 | 18 | This section of the manual will address both methods. 19 | 20 | 21 | .. toctree:: 22 | :maxdepth: 2 23 | 24 | collision-solids 25 | collision-handlers 26 | collision-entries 27 | collision-traversers 28 | collision-bitmasks 29 | rapidly-moving-objects 30 | pusher-example 31 | event-example 32 | bitmask-example 33 | clicking-on-3d-objects 34 | -------------------------------------------------------------------------------- /programming/collision-detection/tube.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/collision-detection/tube.jpg -------------------------------------------------------------------------------- /programming/configuration/index.rst: -------------------------------------------------------------------------------- 1 | .. _the-configuration-file: 2 | 3 | The Configuration File 4 | ====================== 5 | 6 | Panda3D features a powerful configuration system that is used to control many 7 | aspects of Panda3D functionality. These configuration variables may be set using 8 | a configuration file or programmatically. It is also possible for an application 9 | to define and use custom configuration variables. 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | configuring-panda3d 15 | list-of-all-config-variables 16 | accessing-config-vars-in-a-program 17 | -------------------------------------------------------------------------------- /programming/finite-state-machines/index.rst: -------------------------------------------------------------------------------- 1 | .. _finite-state-machines: 2 | 3 | Finite State Machines 4 | ===================== 5 | 6 | .. only:: python 7 | 8 | A "Finite State Machine" is a concept from computer science. Strictly 9 | speaking, it means any system that involves a finite number of different 10 | states, and a mechanism to transition from one state to another. 11 | 12 | In Panda3D, a Finite State Machine, or FSM, is implemented as a Python class. 13 | To define a new FSM, you should define a Python class that inherits from the 14 | FSM class. You define the available states by writing appropriate method 15 | names within the class, which define the actions the FSM takes when it enters 16 | or leaves certain states. Then you can request your FSM to transition from 17 | state to state as you need it to. 18 | 19 | You may come across some early Panda3D code that creates an instance of the 20 | ClassicFSM class. :py:class:`~direct.fsm.ClassicFSM.ClassicFSM` is an earlier 21 | implementation of the FSM class, and is now considered deprecated. It is no 22 | longer documented here. We recommend that new code use the FSM class instead, 23 | which is documented on the following pages. 24 | 25 | .. only:: cpp 26 | 27 | This section does not apply to C++ users. 28 | 29 | .. toctree:: 30 | :maxdepth: 2 31 | 32 | fsm-introduction 33 | simple-fsm-usage 34 | fsm-with-input 35 | advanced-fsm-tidbits 36 | -------------------------------------------------------------------------------- /programming/gui/directgui/directlabel.rst: -------------------------------------------------------------------------------- 1 | .. _directlabel: 2 | 3 | DirectLabel 4 | =========== 5 | 6 | Labels are like buttons, but they do not respond to mouse-clicks. This means a 7 | DirectLabel is basically just a text string, and in that respect is similar to 8 | :ref:`onscreentext`, except that the DirectLabel integrates better with the 9 | rest of the DirectGUI system (and the constructor accepts more DirectGUI-like 10 | options). 11 | 12 | If you are making a text label to appear on a DirectFrame or in conjunction 13 | with DirectGUI somehow, you should probably use a DirectLabel. For all other 14 | uses of text, you would probably be better off using :ref:`onscreentext` or a 15 | making a plain :ref:`text-node` instead. 16 | 17 | DirectLabel's only unique keyword can be used if you want to create a label 18 | with multiple states. If you set the value of activeState to a nonexistent 19 | state, the label will disappear, since the default state is undefined. 20 | 21 | =========== ========================================= ====== 22 | Keyword Definition Value 23 | =========== ========================================= ====== 24 | activeState The “active” or normal state of the label Number 25 | =========== ========================================= ====== 26 | -------------------------------------------------------------------------------- /programming/gui/text-align.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-align.png -------------------------------------------------------------------------------- /programming/gui/text-attrib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-attrib.png -------------------------------------------------------------------------------- /programming/gui/text-card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-card.png -------------------------------------------------------------------------------- /programming/gui/text-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-color.png -------------------------------------------------------------------------------- /programming/gui/text-font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-font.png -------------------------------------------------------------------------------- /programming/gui/text-frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-frame.png -------------------------------------------------------------------------------- /programming/gui/text-plain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-plain.png -------------------------------------------------------------------------------- /programming/gui/text-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-shadow.png -------------------------------------------------------------------------------- /programming/gui/text-slant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-slant.png -------------------------------------------------------------------------------- /programming/gui/text-smallcaps-scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-smallcaps-scale.png -------------------------------------------------------------------------------- /programming/gui/text-smallcaps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-smallcaps.png -------------------------------------------------------------------------------- /programming/gui/text-wordwrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/gui/text-wordwrap.png -------------------------------------------------------------------------------- /programming/hardware-support/index.rst: -------------------------------------------------------------------------------- 1 | .. _hardware-support: 2 | 3 | Hardware Support 4 | ================ 5 | 6 | Panda3D provides multiple ways to access the various devices connected to your 7 | system. The following sections will show you how to gain input from mouse, 8 | keyboard and other video game related input devices like gamepads, joysticks 9 | and steering wheels using Panda3D's built-in device support. 10 | 11 | As of now, Panda3D will have access to any device that is recognized by Evdev 12 | or the older Linux Joystick API on Linux based systems and XInput on Windows 13 | based systems. There also is a section for VR devices which is geared towards 14 | Carnegie Mellon University's virtual reality equipment. 15 | 16 | 17 | .. toctree:: 18 | :maxdepth: 2 19 | 20 | keyboard-support 21 | mouse-support 22 | joystick-support 23 | -------------------------------------------------------------------------------- /programming/index.rst: -------------------------------------------------------------------------------- 1 | .. _programming-with-panda3d: 2 | 3 | Programming with Panda3D 4 | ======================== 5 | 6 | The Programming with Panda section of the manual attempts to enumerate all the 7 | various functionality that Panda3D provides. 8 | 9 | This manual does not attempt to be complete in the sense of listing every 10 | class, function, and method provided by Panda3D. If that's what you're looking 11 | for, go to the :ref:`Reference Section ` instead. 12 | 13 | The purpose of this manual is to: 14 | 15 | 1. List all of Panda3D's broad capabilities, 16 | 17 | 2. Help you understand what purpose these serve, 18 | 19 | 3. Give you a general understanding of how to build games in Panda3D. 20 | 21 | In time, though, you will need to supplement the knowledge provided by this 22 | manual by studying the :ref:`Reference Section `. 23 | 24 | 25 | .. toctree:: 26 | :titlesonly: 27 | :maxdepth: 2 28 | 29 | scene-graph/index 30 | models-and-actors/index 31 | configuration/index 32 | render-attributes/index 33 | texturing/index 34 | shaders/index 35 | camera-control/index 36 | audio/index 37 | intervals/index 38 | tasks-and-events/index 39 | gui/index 40 | render-effects/index 41 | finite-state-machines/index 42 | terrain/index 43 | internal-structures/index 44 | render-to-texture/index 45 | rendering-process/index 46 | particle-effects/index 47 | collision-detection/index 48 | object-management/index 49 | hardware-support/index 50 | physics/index 51 | networking/index 52 | advanced-loading/index 53 | pandai/index 54 | -------------------------------------------------------------------------------- /programming/internal-structures/deriv-xi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/deriv-xi.png -------------------------------------------------------------------------------- /programming/internal-structures/deriv-xo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/deriv-xo.png -------------------------------------------------------------------------------- /programming/internal-structures/geometry-storage/geomlines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/geometry-storage/geomlines.png -------------------------------------------------------------------------------- /programming/internal-structures/geometry-storage/geomlinestrips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/geometry-storage/geomlinestrips.png -------------------------------------------------------------------------------- /programming/internal-structures/geometry-storage/geompoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/geometry-storage/geompoints.png -------------------------------------------------------------------------------- /programming/internal-structures/geometry-storage/geompointsthick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/geometry-storage/geompointsthick.png -------------------------------------------------------------------------------- /programming/internal-structures/geometry-storage/geomtriangles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/geometry-storage/geomtriangles.png -------------------------------------------------------------------------------- /programming/internal-structures/geometry-storage/geomtrifans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/geometry-storage/geomtrifans.png -------------------------------------------------------------------------------- /programming/internal-structures/geometry-storage/geomtristrips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/geometry-storage/geomtristrips.png -------------------------------------------------------------------------------- /programming/internal-structures/geometry-storage/index.rst: -------------------------------------------------------------------------------- 1 | .. _how-panda3d-stores-vertices-and-geometry: 2 | 3 | How Panda3D Stores Vertices and Geometry 4 | ======================================== 5 | 6 | This section describes the structure and interconnections of Panda3D's 7 | internal vertex and geometry data objects, in general terms. You should read 8 | through this section carefully, so that you have a good understanding of 9 | Panda3D's data structures, before attempting to read the section about 10 | generating procedural data. 11 | 12 | 13 | .. toctree:: 14 | :maxdepth: 2 15 | 16 | geomvertexdata 17 | geomvertexformat 18 | geomprimitive 19 | geom 20 | geomnode 21 | boundingvolume 22 | -------------------------------------------------------------------------------- /programming/internal-structures/index.rst: -------------------------------------------------------------------------------- 1 | .. _advanced-operations-with-internal-structures: 2 | 3 | Advanced operations with internal structures 4 | ============================================ 5 | 6 | The following pages provide descriptions of Panda's internal representation of 7 | vertices and the renderable geometry that uses them, as well as instructions 8 | for directly reading or manipulating this data. 9 | 10 | This is an advanced topic of Panda3D and is not necessary for ordinary model 11 | rendering and animation, but the advanced user may find this information 12 | useful. 13 | 14 | 15 | .. toctree:: 16 | :maxdepth: 2 17 | 18 | geometry-storage/index 19 | procedural-generation/index 20 | other-manipulation/index 21 | matrix-representation 22 | -------------------------------------------------------------------------------- /programming/internal-structures/matrix-c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/matrix-c.png -------------------------------------------------------------------------------- /programming/internal-structures/matrix-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/panda3d/panda3d-docs/f645db193247d008e52ff76de6a173c3ec95c9ef/programming/internal-structures/matrix-r.png -------------------------------------------------------------------------------- /programming/internal-structures/other-manipulation/index.rst: -------------------------------------------------------------------------------- 1 | .. _other-vertex-and-model-manipulation: 2 | 3 | Other Vertex and Model Manipulation 4 | =================================== 5 | 6 | This section shows some other ways to manipulate low-level geometry and vertex 7 | information, including dynamically creating other kinds of Panda3D objects 8 | like Textures. 9 | 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | reading-existing-geometry 15 | modifying-existing-geometry 16 | using-memoryviews 17 | meshdrawer 18 | more-about-reader-writer-rewriter 19 | writing-models-to-disk 20 | -------------------------------------------------------------------------------- /programming/internal-structures/procedural-generation/index.rst: -------------------------------------------------------------------------------- 1 | .. _procedural-generation: 2 | 3 | Procedurally Generating 3D Models 4 | ================================= 5 | 6 | Building on the fundamental concepts introduced in the last section, the 7 | following section explains how to use Panda's basic geometry building blocks 8 | to generate your own custom geometry at runtime. 9 | 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | custom-vertex-format 15 | predefined-vertex-formats 16 | creating-vertex-data 17 | creating-primitives 18 | putting-geometry-in-scene-graph 19 | -------------------------------------------------------------------------------- /programming/intervals/function-intervals.rst: -------------------------------------------------------------------------------- 1 | .. _function-intervals: 2 | 3 | Function Intervals 4 | ================== 5 | 6 | .. only:: python 7 | 8 | Function intervals are different from function lerp intervals. While the 9 | function lerp interval passes data to a function over a period of time, a 10 | function interval will simply execute a function when called. As such, a 11 | function interval’s use really appears when combined with sequences and 12 | parallels. The function interval’s format is simple. 13 | 14 | .. code-block:: python 15 | 16 | intervalName = Func(myFunction) 17 | 18 | You pass the function without parentheses (i.e. you pass 19 | ``Func``- a function pointer) 20 | as the parameter. If ``myFunction`` 21 | takes arguments, then pass them as parameters to 22 | ``Func`` as follows: 23 | 24 | .. code-block:: python 25 | 26 | def myFunction(arg1, arg2): 27 | # Do something. 28 | 29 | intervalName = Func(myFunction, arg1, arg2) 30 | 31 | Functions cannot be called on their own in sequences and parallels, so it is 32 | necessary to wrap them in an interval in order to call them. Since function 33 | intervals have no duration, they complete the moment they are called. 34 | 35 | .. only:: cpp 36 | 37 | As FunctionInterval is implemented in Python, this section does not apply to 38 | C++. 39 | -------------------------------------------------------------------------------- /programming/intervals/motion-path-and-particle-intervals.rst: -------------------------------------------------------------------------------- 1 | :orphan: 2 | 3 | .. _motion-path-and-particle-intervals: 4 | 5 | Motion Path and Particle Intervals 6 | ================================== 7 | 8 | This content has moved. For motion paths, see :ref:`motion-paths`. For particle 9 | effect intervals, see :ref:`particle-intervals`. 10 | -------------------------------------------------------------------------------- /programming/intervals/motion-paths.rst: -------------------------------------------------------------------------------- 1 | .. _motion-paths: 2 | 3 | Motion Paths 4 | ============ 5 | 6 | Motion paths in Panda3D are splines created by a modeler that are then 7 | exported to egg files. These egg files are then imported into a program, and 8 | various nodes can then use the motion path for complex movement. A viable egg 9 | file for a motion path has the “curve” tag. 10 | 11 | First, the :py:mod:`~direct.directutil.Mopath` and 12 | :py:mod:`~direct.interval.MopathInterval` modules must be loaded. While motion 13 | paths come with their own play functions, a motion path interval allows for 14 | more functionality. 15 | 16 | .. code-block:: python 17 | 18 | from direct.directutil import Mopath 19 | from direct.interval.MopathInterval import * 20 | 21 | With the modules loaded, the motion path is loaded much like an actor is 22 | loaded. A NodePath is created with the knowledge that it will be used for a 23 | motion path, and then the file is loaded. 24 | 25 | .. code-block:: python 26 | 27 | myMotionPathName = Mopath.Mopath() 28 | myMotionPathName.loadFile("File Path") 29 | 30 | Finally, the motion path interval may be created, and played like any interval 31 | can. The interval requires not only the name of the motion path, but also the 32 | NodePath that will be affected by it. 33 | 34 | .. code-block:: python 35 | 36 | myInterval = MopathInterval(myMotionPathName, myNodePath, name = "Name") 37 | myInterval.start() 38 | -------------------------------------------------------------------------------- /programming/intervals/particle-intervals.rst: -------------------------------------------------------------------------------- 1 | .. _particle-intervals: 2 | 3 | Particle Intervals 4 | ================== 5 | 6 | Particle effects can be run from inside intervals as well, using the 7 | :py:class:`~direct.interval.ParticleInterval.ParticleInterval` class: 8 | 9 | .. code-block:: python 10 | 11 | intervalName = ParticleInterval( 12 | particleEffect, 13 | parent, 14 | worldRelative=True, 15 | duration=myDuration 16 | ) 17 | 18 | Read more about :ref:`particle-effects`. 19 | -------------------------------------------------------------------------------- /programming/intervals/projectile-intervals.rst: -------------------------------------------------------------------------------- 1 | .. _projectile-intervals: 2 | 3 | Projectile Intervals 4 | ==================== 5 | 6 | Projectile intervals are used to move a NodePath through the trajectory of a 7 | projectile under the influence of gravity. 8 | 9 | .. code-block:: python 10 | 11 | myInterval = ProjectileInterval(, 12 | startPos=Point3(X, Y, Z), endPos=Point3(X, Y, Z), 13 | duration=