Giter VIP home page Giter VIP logo

demo-models's Introduction

Castle Game Engine

"Castle Game Engine" is a cross-platform (desktop, mobile, console) 3D and 2D game engine.

Castle Game Engine - editor with terrain

We feature:

  • Powerful visual editor to design 3D and 2D games.

  • A lot of components to design viewport contents (3D and 2D world, using scenes, cameras, navigation, primitives, lights...) and user inteface (buttons, images, labels...).

  • Support for glTF, X3D, Spine and more formats.

  • Composable shader effects, shadows, mirrors, physically based rendering, bump mapping, gamma correction...

  • Fast clean code using modern Pascal.

  • We are free and open-source.

See https://castle-engine.io/features for the complete list of engine features.

Installation and building your first application

See the Installation manual page.

We recommend you download the engine from our downloads, unpack the release and then run bin/castle-editor executable inside.

If you got the source code straight from our GitHub repository then read first Compiling from source.

Usage in short:

  • Our editor is used to design and build your applications.

  • Our build tool is used to build your applications from the command-line.

    Both the build tool and editor use the project settings from the CastleEngineManifest.xml file.

  • You can also use Visual Studio Code.

    We have a Castle Game Engine extension for VS Code, that enables comfortable Pascal code editing (with completion, syntax highighting) and integration with CGE projects (so you can build, debug, run the projects straight from VS Code).

  • You can also use Lazarus.

    Make sure to register in Lazarus our packages. It's easiest to do this using the button "Register Lazarus Packages" in CGE editor "Preferences -> FPC and Lazarus".

    You can install the castle_components.lpk package in Lazarus, to have LCL component TCastleControl (see https://castle-engine.io/control_on_form ).

    You can build the most important CGE packages and tools (editor, build tool) using Lazarus project group called most_important_lazarus_packages_and_tools.lpg.

  • You can also use Delphi.

    We recommend to install our Delphi packages in Delphi. This will give you a comfortable menu in Delphi IDE "Tools โ†’ Castle Game Engine", with useful commands like "Set Engine Path..." and "Configure Delphi to Use Engine".

Documentation

  • Manual is the most recommended way to learn the engine.

  • API reference.

    It is also available offline in the engine archive (if you downloaded the binary engine release), just open the file doc/reference/index.html in your WWW browser.

  • Numerous examples are provided in the examples/ subdirectory.

  • Guide to creating game data.

Support

Questions? Talk to us on forum or Discord chat.

Support us on Patreon.

License

The engine is available on the terms of LGPL >= 2 license with "static linking exception". This is the same license as used by FPC RTL and Lazarus LCL. In short, you can make commercial and closed-source games using the engine, you only have to share your modifications to the engine core.

See license for details.

Have fun!

Authors

This is the life project of Michalis Kamburelis.

Thank you to all the contributors and supporters for making the engine with me throughout the years. Keep it going please :)

demo-models's People

Contributors

and3md avatar andreasplesch avatar janadamec1 avatar kagamma avatar michaliskambi avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demo-models's Issues

two_textures.x3dv GLSL problem on Intel(R) HD Graphics 4400

Reported originally in #3 by @andreasplesch .

Reproducible on

Version string: 4.3.0 - Build 20...
Renderer: Intel(R) HD Graphics 4400

(the exact GPU details in #3). Not reproducible with other GPU like Michalis NVidia:

Version string: 4.5.0 NVIDIA 384.98
Renderer: GeForce GTS 450/PCIe/SSE2

The error:

two_textures.x3dv:
view3dscene: VRML/X3D warning: Cannot use GLSL shader for shape "IndexedFaceSet": Fragment shader not compiled:
WARNING: 0:4: '' : #version directive missing
ERROR: 0:12: 'texture2D' : no matching overloaded function found (using implicit conversion)
ERROR: 0:14: 'texture2D' : no matching overloaded function found (using implicit conversion)
ERROR: 0:12: 'assign' : cannot convert from 'const mediump float' to 'FragColor 4-component vector of mediump float'

geometry_shader.x3dv GLSL problem on Intel(R) HD Graphics 4400

Reported originally in #3 by @andreasplesch .

Reproducible on

Version string: 4.3.0 - Build 20...
Renderer: Intel(R) HD Graphics 4400

(the exact GPU details in #3). Not reproducible with other GPU like Michalis NVidia:

Version string: 4.5.0 NVIDIA 384.98
Renderer: GeForce GTS 450/PCIe/SSE2

The error:

view3dscene: VRML/X3D warning: Cannot use GLSL shader for shape "Sphere": Geometry shader not compiled:
ERROR: 0:30: '[' : layout must be declared before indexing unsized varying input array with a variable
ERROR: 0:31: '[' : layout must be declared before indexing unsized varying input array with a variable
ERROR: 0:33: '[' : layout must be declared before indexing unsized varying input array with a variable
ERROR: 0:52: '[' : layout must be declared before indexing unsized varying input array with a variable
ERROR: 0:53: '[' : layout must be declared before indexing unsized varying input array with a variable
ERROR: 0:55: '[' : layout must be declared before indexing unsized varying input array with a variable

defaults in xml conversion

Converting the example
https://github.com/castle-engine/demo-models/blob/master/prototypes/proto_events_test.x3dv

to xml encoding with view3dscene

leads to the integerKey field being omitted for IGenerate0:

                        <IntegerTrigger DEF="IGenerate0">
				<IS>
					<connect nodeField="triggerValue" protoField="int" />
				</IS>
			</IntegerTrigger>

The original x3dv file has a integerKey=0 explicit field value.
The xml encoding presumably omits the field value because the converter assumes that 0 is the default value. However, the default value is not defined in v3.2:

https://www.web3d.org/documents/specifications/19775-1/V3.2/Part01/components/utils.html#IntegerTrigger

and is -1 for versions 3.0 and 3.3.

So it is unexpected that 0 is used as a default value for version 3.2.

This is really converter issue, not a demo issue. Perhaps always including the field value if it is explicitly provided in the source file, and omitting it only if it is not given and has the same default value in the target x3d version might work.

Here the complete conversion:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "http://www.web3d.org/specifications/x3d-3.2.dtd">
<X3D profile="Interactive" version="3.2"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
     xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.2.xsd">
<head>
	<meta name="generator" content="view3dscene, https://castle-engine.io/view3dscene.php" />
	<meta name="source" content="proto_events_test.x3dv" />
</head>
<Scene>
	<ProtoDeclare name="LightToggle">
		<ProtoInterface>
				<field accessType="inputOutput" type="SFBool" name="light_on" value="false" />
		</ProtoInterface>
		<ProtoBody>
			<Group>
				<Shape>
					<Appearance>
						<Material />
					</Appearance>
					<Sphere />
				</Shape>
				<DirectionalLight>
					<IS>
						<connect nodeField="on" protoField="light_on" />
					</IS>
				</DirectionalLight>
			</Group>
		</ProtoBody>
	</ProtoDeclare>
	<ProtoDeclare name="ConvertBoolToInt">
		<ProtoInterface>
				<field accessType="inputOnly" type="SFBool" name="bool" />
				<field accessType="outputOnly" type="SFInt32" name="int" />
		</ProtoInterface>
		<ProtoBody>
			<BooleanFilter DEF="BFilter">
				<IS>
					<connect nodeField="set_boolean" protoField="bool" />
				</IS>
			</BooleanFilter>
			<IntegerTrigger DEF="IGenerate0">
				<IS>
					<connect nodeField="triggerValue" protoField="int" />
				</IS>
			</IntegerTrigger>
			<IntegerTrigger DEF="IGenerate1"
				integerKey="1">
				<IS>
					<connect nodeField="triggerValue" protoField="int" />
				</IS>
			</IntegerTrigger>
			<ROUTE fromNode="BFilter" fromField="inputFalse" toNode="IGenerate0" toField="set_boolean" />
			<ROUTE fromNode="BFilter" fromField="inputTrue" toNode="IGenerate1" toField="set_boolean" />
		</ProtoBody>
	</ProtoDeclare>
	<ProtoInstance name="LightToggle" DEF="LT">
	</ProtoInstance>
	<KeySensor DEF="K" />
	<ROUTE fromNode="K" fromField="controlKey" toNode="LT" toField="set_light_on" />
	<Transform
		translation="0 -2 0">
		<DirectionalLight />
		<Switch DEF="LightOnVisualize"
			whichChoice="0">
			<Shape>
				<Appearance DEF="ATextLighOn">
					<Material />
				</Appearance>
				<Text
					string='"Hold Control key for the light." "Light is currently: OFF"' />
			</Shape>
			<Shape>
				<Appearance DEF="ATextLighOn">
					<Material />
				</Appearance>
				<Text
					string='"Hold Control key for the light." "Light is currently: ON"' />
			</Shape>
		</Switch>
	</Transform>
	<ProtoInstance name="ConvertBoolToInt" DEF="BToInt">
	</ProtoInstance>
	<ROUTE fromNode="LT" fromField="light_on_changed" toNode="BToInt" toField="bool" />
	<ROUTE fromNode="BToInt" fromField="int" toNode="LightOnVisualize" toField="set_whichChoice" />
</Scene>
</X3D>

Discussion about how X3D modes and sources can be applied to the IFC schema

Hi there!

I've been developing various foss libraries and applications to do with something known as "IFC". IFC is a data schema for describing buildings used by architects, engineers, and the construction industry.

IFC heavily leans on the X3D specification to support textures (specifically multi textures), and borrows concepts such as modes and sources. I came across your test files and commentary including proposals: https://castle-engine.io/x3d_multi_texturing.php - would you be available for a casual chat (say an hour?) to discuss some of my understanding of your commentary and how this can translates to the IFC spec (including your proposed fixes) and how this maps to more modern material definitions (e.g. PBR workflows in modern rendering engines like Blender's Cycles).

Cheers :) Great website and love the work you're doing by the way!

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

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

  • D3 photo D3

    Data-Driven Documents codes.