3D Library Adventure

mdotedot

  • *
  • Posts: 1424

Done:
  • Bind meshes to tiles
  • Hide TileSheet
  • Resource Load block (currently only bitmap+OBJ)


The yellow block on top will be replaced by a Cube. It has the Jump and Run behavior attached to it.

The green block in the middle will remain a Stencyl Actor with the same Jump and Run behavior attached to it.
So you can see the difference between something IN 3D space and a Stencyl actor on top of the 3D world.



We create the rock tiles:



Then we bind the rock tile to the TileSetID and Tile ID:


To add the Chamber of Secrets to the scene:


    Ha: I see that I changed Z coordinate and left the previous one .. well it doesn't matter


This is the gameplay of this particular scene:



Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1424
A new demo.

This is the PointLight feature. It is bound to the (Stencyl) mouse. I can see this happening on a background where a player is walking in front of it. Just like the NobodyX examples.

Cube Mesh:


OBJ Mesh

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1424
The passed days I have been working on the demonstration scenes.

Done:
  • Combined Meshes
  • Lines
  • Camera Controller
  • Background versus SkyBox
  • Tile replacement system

There were some challenges to get it published on all platforms.
I haven't been able to test the new extensions with 3.5 on Android.
Also I can't run/publish to Windows with the latest build.

But older 3.5 beta-versions on Windows and Mac could produce the native targets as well as iOS simulator, Flash and HTML.
(Linux not tested with the latest extensions)

There are some resource issues on a virtual machine running the animated actors.
The 9704 build gives no problems on these resources but the latest releases do: openfl_errors_Error
"Error compiling vertex shader: ERROR: too many uniforms".
So apparently the new openfl/lime set does something to the number of uniforms.

Here is the current Platform1 demo where you can see a Stencyl actor (transparent green block) together with a 3D animated actor.
Both have the jump and run movement behavior attached.

There is a subtle light shift present.



Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1424
Worked on some resource things.

A low poly OBJ file containing several subMeshes.



We are going away on a trip on Easter so next week will be slow on development.

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

merrak

  • *
  • Posts: 2010
The pointlight example is really interesting. One thing I'd like to be able to do is load a normal map into a shader. Did you happen to run into a way to do this? I haven't really looked since switching over to the 3.5 beta.

mdotedot

  • *
  • Posts: 1424
Thank you for your continued interest in this journal!

Shaders are on my To Do list. As well as filters.
I might want to combine several material textures into one resource load block

Normal, Specular and Diffuse mapping are things that are materialized based.
The work that I did this week on the ResourceLoader is a step in the direction of adjusting the materials.

The early examples used some mapping: http://htmlstarter.com/Away3D/html5/BasicShading/

And the current way of using the extension is:


But again, I might change the resource load wrapper block to combine the texture-loading. Not sure if I use a map, or text argument to do so ...
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

ChristianEs

  • *
  • Posts: 213
Worked on some resource things.

A low poly OBJ file containing several subMeshes.



Awesome.

bonzero

  • *
  • Posts: 487
The most ambitious extension I’ve seen, this could be a game changer for Stencyl

merrak

  • *
  • Posts: 2010
The tilt and pan is pretty neat. I noticed there's some clipping problem though. Look near the center. A green polygon flashes in and out. Not sure if anything can be done about it without digging deeper into Away3D library. I noticed the same problem in Cities Skylines and that's a Unity Engine game.

mdotedot

  • *
  • Posts: 1424
@merrak: Yeah after you told me I saw it. And then saw it with some other demos as well. I don't want to delve into the Away3D code just yet. My gut feeling is that it has to do with the meshes which can be altered using a 3D program. Not sure. Need to investigate that later in the year.

This week I've worked on:

  • Upgrade to 984x on my 'latest stencyl' and investigated what needed to be done on the layer system
  • Android publishing
  • Resource Loader
  • Example Game Slider Buttons
  • Example Game ButtonList
  • Demo Platform Game (LD40)

Button ActionList :

Slider Button :


Away3D has a tool AwayBuilder which produces an AWD file. I'm looking to integrate the resulting AWD file.
It works, but I want to have control over the objects that are loaded.
The OBJ file loading made a list as well, so I might use the same technique.

I made some adjustments to the Resource Loader to accomodate the OBJ and AWD lists, but that changed the order of the dropbox list. And that required me to change most of the Example Games.

This week I've also worked on a Location Extension (iOS/Android) for Squeeb.

Hopefully I can work on some Resource Loading and demo game stuff next week.

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

merrak

  • *
  • Posts: 2010
@merrak: Yeah after you told me I saw it. And then saw it with some other demos as well. I don't want to delve into the Away3D code just yet. My gut feeling is that it has to do with the meshes which can be altered using a 3D program. Not sure. Need to investigate that later in the year.

I'm not sure how meshes are structured. I have pretty limited knowledge of 3D modelling. In my renderer, that sort of error is the result of an incorrectly defined normal vector. Normally this happens if I order polygon vertices in the wrong order (counter clockwise instead of clockwise), and so the polygon's normal vector points in the opposite direction that it should.

I'm not sure if a 3D program might mess something like that up (say, a poorly optimized mesh?), if that's even the problem here. I'd be interested in knowing what it is once you figure it out.

Looking forward to seeing what you come up with for LD. (Did you mean 41?)

mdotedot

  • *
  • Posts: 1424
The example game I'm working on is the one I wanted to make for LD40! At the time I couldn't find a way how to change the tiles in a tilesheet to 3D Meshes. So I'm re-making the game with the new extension. At first I am going to make a true Stencyl game.
If that works I export it and import it back again and turn it into a 3D using the extension.
So that I can show what needs to be done on a 'live' game instead of only just 3D example demos.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1424
This week I've been working on the LD40 game.
Yeah I know: That is four months ago.

It obviously takes me four months to complete an entry :D

The 'pure' Stencyl game was made in less than a day work.
But the tileset I was trying to convert into 3D was preventing me to turn it into an entry.

2D GamePlay:



So .. take four months and a new approach to the engine and now the 3D version is complete as well.

3D GamePlay:




Play the games yourself: (There are 5 levels)

PLAY 2D and/or 3D

The scenebehavior with the events that turns 2D into 3D is depicted below with a portion of the Extension blocks for your enjoyment:




I'm going to work on some more textures and maybe even start on some shader implementation.

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

merrak

  • *
  • Posts: 2010
Game worked pretty well, although I'm not sure what I'm supposed to be doing :) I got to level 3.

I'd really like to get the point light effect working like you have. I read how to accomplish it by passing a normal map to a shader. I don't think it would require a 3D engine...just knowing how to use or modify the core shader code in the Stencyl engine. There was a tool someone advertised here once... either Sprite d'light or Sprite Lamp, that would take advantage of it.

mdotedot

  • *
  • Posts: 1424
@Merrak: I think you are referring to this:   http://community.stencyl.com/index.php?topic=36943.0

The latest status is that I worked on:
  • Filters
  • Methods
  • Textures

Filters are entire scene Shaders.
Methods are Material = Object Shaders.

I even have an interface for AGAL Shaders (MyOwnMethod)
You can pass AGAL Code (Assembly Code) into the shader.
I of course don't know what I'm doing and either the whole system crashes or I have a green hue on the material.
I leave it in since maybe one day I know how to give the material something it can use.

Most of the times the effects I'm able to get are not so spectacular.
I made 23 shader examples and deactivated 5 of them since they either didn't do much or
I'm not sure what I need to do with them.

Some of them look nice or have potential:

MotionBlurFilter

Water Method

Projector Method

Semi Transparent PNG Atmosphere

Make solids transparent



Maybe I can work on some more effects before the Ludum Dare next weekend.

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.