Recent

Author Topic: Castle Game Engine demo WIP  (Read 8358 times)

lainz

  • Hero Member
  • *****
  • Posts: 3228
    • Lainz
Castle Game Engine demo WIP
« on: February 25, 2018, 09:51:56 pm »
This starts from here:
http://forum.lazarus.freepascal.org/index.php/topic,40180.msg277717.html#msg277717

We're making a demo for Castle Game Engine, trying to show the power of the 3D engine.

Files
https://github.com/lazarusccr/cge_demo/releases

lainz

  • Hero Member
  • *****
  • Posts: 3228
    • Lainz
Re: Castle Game Engine demo WIP
« Reply #1 on: February 25, 2018, 11:33:57 pm »
Hi, this is a new version of the room made with Blender, hopefully it looks almost the same or better in Castle Game Engine.

https://github.com/lazarusccr/cge_demo/releases/download/1.0/CastleDemo_3D_v2.7z

It requires Blender 2.79.

« Last Edit: February 25, 2018, 11:38:29 pm by lainz »

Paul_

  • Full Member
  • ***
  • Posts: 130
Re: Castle Game Engine demo WIP
« Reply #2 on: February 25, 2018, 11:41:02 pm »
It's Castle vs Blender game engine? Blender is no racer :)

lainz

  • Hero Member
  • *****
  • Posts: 3228
    • Lainz
Re: Castle Game Engine demo WIP
« Reply #3 on: February 25, 2018, 11:44:18 pm »
It's Castle vs Blender game engine? Blender is no racer :)

No. We're using blender to make the scene. Then Eugene Loza is creating the program to view the scene with Castle Game Engine.

Edit: attached how it looks in Unity-
« Last Edit: February 26, 2018, 02:44:19 am by lainz »

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: Castle Game Engine demo WIP
« Reply #4 on: February 26, 2018, 04:15:01 am »
unity looks better not to many shines but it would be better if we could have the same view angle on both.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Eugene Loza

  • Hero Member
  • *****
  • Posts: 561
    • My "almost daily" development blog
Re: Castle Game Engine demo WIP
« Reply #5 on: February 26, 2018, 06:29:29 am »
Then Eugene Loza is creating the program to view the scene with Castle Game Engine.
It's mostly not about creating the program (it's really simple - just Scene.Load and setting a few parameters), but about specifying/faking the correct parameters for blender x3d exporter which is unfortunately very buggy (e.g. it doesn't have "on=true" for lights, also it doesn't handle multitextures, etc.) :)
Lazarus 1.9 + FPC 3.1.1 Debian Jessie 64 bit.

My Free and Open Source games in Lazarus/FreePascal/CastleGameEngine:
https://decoherence.itch.io/
(and some ancient games in Turbo Pascal too)
Sources are here: https://github.com/eugeneloza?tab=repositories

lainz

  • Hero Member
  • *****
  • Posts: 3228
    • Lainz
Re: Castle Game Engine demo WIP
« Reply #6 on: February 26, 2018, 05:06:03 pm »
unity looks better not to many shines but it would be better if we could have the same view angle on both.

I will try.

Maybe is somewhat different because I used postprocessing filters (https://assetstore.unity.com/packages/essentials/post-processing-stack-83912).

Also the materials that are just plain colors are rendered different.

And the lights for some reason are not imported, so I've added the lights by hand on Unity scene.

Then Eugene Loza is creating the program to view the scene with Castle Game Engine.
It's mostly not about creating the program (it's really simple - just Scene.Load and setting a few parameters), but about specifying/faking the correct parameters for blender x3d exporter which is unfortunately very buggy (e.g. it doesn't have "on=true" for lights, also it doesn't handle multitextures, etc.) :)

Well, Unity does not import the lights also, and normal maps, I must add them by hand.. Maybe the same buggy exporter from blender to FBX.
« Last Edit: February 26, 2018, 05:14:19 pm by lainz »

RAW

  • Hero Member
  • *****
  • Posts: 794
Re: Castle Game Engine demo WIP
« Reply #7 on: February 26, 2018, 05:32:57 pm »
The wall in UNITY doesn't look good to me at all !!!  :)

It looks much more distorted than the blender wall...maybe that depends on the viewpoint...
Maybe it's normal in 3D games... the last time I played some 3D type of game is some time ago...  :)
« Last Edit: March 01, 2018, 09:59:00 pm by RAW »
Windows 7 Pro (x64 Sp1) And Windows XP Pro (x86 Sp3) - LAZARUS 2.0.4 FPC 3.0.4 - TRUNK 2.1.0 FPC 3.3.1

lainz

  • Hero Member
  • *****
  • Posts: 3228
    • Lainz
Re: Castle Game Engine demo WIP
« Reply #8 on: February 26, 2018, 06:34:29 pm »
Hi again, this is the executable for Windows so you can test how it looks on Unity from any angle:
https://github.com/lazarusccr/cge_demo/releases/download/1.0/Demo_Unity_ReleaseWindows.7z

I'm waiting Eugene Loza demo on Castle Game Engine.

The goal I think is that on Castle Game Engine looks the same or better than in Unity.

If someone needs the Unity project just ask.

I updated the room.blend also, because some normals was pointing to the wrong side, and the plant was not 'baked' into a regular object, it was still a particle system.
https://github.com/lazarusccr/cge_demo/releases/download/1.0/room.blend

(Notice that the .blend does not have textures, you must download first this https://github.com/lazarusccr/cge_demo/releases/download/1.0/CastleDemo_3D_v2.7z and replace the blend file.)
« Last Edit: February 27, 2018, 08:09:17 pm by lainz »

Paul_

  • Full Member
  • ***
  • Posts: 130
Re: Castle Game Engine demo WIP
« Reply #9 on: February 26, 2018, 11:35:11 pm »
I'm curious about the result :)

By the way Unity is still behind Cryengine (strong in exteriors/nature) and Unreal Engine in lighting methods and renderer.
Unity 3D games often looks like that 3d objects are made from paper, this scene isn't bad.

lainz

  • Hero Member
  • *****
  • Posts: 3228
    • Lainz
Re: Castle Game Engine demo WIP
« Reply #10 on: February 27, 2018, 12:30:01 am »
I'm curious about the result :)

By the way Unity is still behind Cryengine (strong in exteriors/nature) and Unreal Engine in lighting methods and renderer.
Unity 3D games often looks like that 3d objects are made from paper, this scene isn't bad.

I doubt is a problem of Unity, but the problem of the designers. I'm not the greatest designer and I don't have a lot of practice doing this 3D things. My scene is very simple.
https://www.youtube.com/watch?v=UfPPEqmxrYI
https://www.youtube.com/watch?v=MX1qRM-lTEU
« Last Edit: February 27, 2018, 12:31:49 am by lainz »

lainz

  • Hero Member
  • *****
  • Posts: 3228
    • Lainz
Re: Castle Game Engine demo WIP
« Reply #11 on: February 27, 2018, 08:09:02 pm »
I think this is how it should look on Castle Game Engine
https://www.artstation.com/artwork/PWe4n (Blender Cycles)

Maybe not today, but some day  :)

Video (Unity):
https://youtu.be/csvNMzq8H5M

Paul_

  • Full Member
  • ***
  • Posts: 130
Re: Castle Game Engine demo WIP
« Reply #12 on: February 27, 2018, 08:16:13 pm »
Maybe with raytracing :)

kagamma

  • New member
  • *
  • Posts: 7
Re: Castle Game Engine demo WIP
« Reply #13 on: April 18, 2018, 03:39:38 pm »
A bit late to the party, but since I am also interested in this subject I tried to do it myself and here's the result:
https://i.imgur.com/2SuAo6H.png
https://i.imgur.com/UXuXCqf.png

Some notes:
- The image was taken using view3dscene, which uses castle game engine as renderer.
- The room was exported using castle game engine's X3D exporter, with bump mapping disabled (I got a lot of errors if I enable it together with shadow mapping).
- Castle game engine doesn't support shadow casting from point light source so I changed all light sources in the room to spotlight.
- I removed 6 light sources so only 3 left (this is just my laziness, I didn't want to edit all of it using view3dscene).
- The lights were edited using view3dscene, but I couldn't save the scene (it saved but I got a lot of errors when I tried to load it). So the scene file attached here is the one without any major light modifications .
- Castle game engine doesn't support .tiff file format so in order to load the scene those .tiff files need to be converted to png.

Another one with only 1 light source + no shadow, but with bump mapping enabled :P:
https://i.imgur.com/hMUt3oG.png
« Last Edit: April 18, 2018, 08:05:11 pm by kagamma »

lainz

  • Hero Member
  • *****
  • Posts: 3228
    • Lainz
Re: Castle Game Engine demo WIP
« Reply #14 on: April 18, 2018, 06:43:50 pm »
Nice, thankyou!