Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Pixel Rebirth

138
Posts
1
Topics
29
Followers
15
Following
A member registered Nov 21, 2016 · View creator page →

Creator of

Recent community posts

For sprite objects with the plane behavior you need to add a spritesheet in your project folder. 

If you know you do not need animations use a tiled background object instead which does not require this step.

Do you mean as a property or where do you want to enter those parameters?

Okay so we are talking about the box behavior.

Actions to change UV at runtime (for box and plane) will be added to the next update.

(1 edit)

Unfortunately I'm not sure I'm understanding your question correctly.

If you're trying to scale an imported model after the fact this action is missing currently. The next update will add it.

EDIT: Update is released!

The only behavior that can obey to runtime changes in dimensions is Plane (Resize property). However it does this by disposing and creating the mesh anew which is not a particularly elegant solution.

Now all mesh behaviors should be able to follow changes in dimensions by scaling. Will very likely be included in the next update.

If you need to do this currently you'll have to scale yourself via events.

You're supposed to add B3D Model objects for different model files. That's how it's designed to work.

If you were trying to do something like a model viewer or level editor (did you mean that by "customize the level"?) this would indeed become a problem. Something like the "Override" action of the box behavior could remedy this.

Again though for a regular game it's not necessary. I'll see about bringing "Override" to other behaviors/plugins.

How would this be different to just making your event system create the desired model? Other than avoiding a bigger event tree and multiple objects... 

I guess I'm curious what exactly you're trying to achieve here.

Since the plugin uses its own canvas blend modes or effects used on Construct 2 layers won't take effect.

Sadly there isn't really a workaround for this other than making the plugin render to a texture instead that then would be it's own C2 plugin to be placed on a layer - I believe this is what the Q3D plugin did for example.

I have mentioned in other places that this was also my initial plan which I failed at and fell back on the straightforward additional canvas solution. I also said I may be revisiting this at a later date. 

Be aware though such a change wouldn't be trivial and require reworking any projects you may already have too. It's not a can of worms I plan to open any time before 1.0 to be honest.

I'm sorry if this makes things difficult for your project.

(1 edit)

Please give me the link to this model if you can (is it a free asset?) so I can test it out for myself.

If a complex model gets saved again with different options the output of Babylon.js might become weird, I will say that much... but I would require an example model that demonstrated a general problem.

Appears to work fine for me. Are you using the correct naming convention?

If you share the capx I will take a look.

But that's what I want to know. You're having a specific issue?

May I refer you to this topic: https://itch.io/t/5595165/how-does-the-skybox-work

Sure it just needs to be a doublesided mesh in Babylon.js/ have no backface culling.

Are you talking about using the "Add sphere" action here? Because that one has been there a long time just for testing and doesn't really provide anything in the way of manipulating the sphere beyond positioning.

So yes what you're asking is perfectly possible but unless you're using an imported sphere model that's properly set up in the way you suggest you will not have much luck with the things the plugin provides directly.

Maybe that should change.

There's two places you need to take a look at in that example. 

First the property "Multi-face" needs to be set to "Yes" to get a unique image on each side of the box.

Then open the tiled background image of the box in Construct 2 and you will see that it's a strip of six 16x16 images making a 96x16 texture.

The first 16x16 is the left side, second right side, then front, back, top and down. You have to think of the front face looking in direction of the angle the box is facing. 

Let me know if this helps you. Happy easter!

In a scene like this or even a significantly bigger one it doesn't matter much if you switch to lower resolution texture manually.

Are you running into any issues like low performance or what's the reason for wanting to apply some kind of LOD system here? 

Babylon.js doesn't know about any textures you may have in your Construct 2 project folder until you use them with "Set mesh texture".

Currently the previous texture however stays in memory when you use the action. With the next update this changes and the texture will be disposed.

(1 edit)

I have already checked it out and made the necessary alterations.

Since it was saved with my current unreleased version of the plugin it has the potential to give you errors when opening. So I would want to hold off until the next update releases which will be later this week.

If you absolutely cannot wait here it is, but you've been warned: https://www.dropbox.com/scl/fi/ml2kqs716uotxqtrp8o06/forJDev.capx?rlkey=ildk4l8b...

I still left a little challenge in there for you. While jumping is implemented there are no checks for hitting something above you, so you will currently get pushed out when doing that. Once you understand the events you should be able to add that functionality yourself. Cheers!

There are actually quite a few issues with texture management I have to admit, so you are correct to question this.

While materials should already be disposed of properly in most circumstances, I was ignorant so far to the texture situation itself.

Improvements are planned for an upcoming update where materials automatically get rid of their textures. But this will unfortunately not address "Set mesh texture". 

Proper texture management in the future (before 1.0) will have the aim to dispose of any texture in memory that is not currently used by any object and also probably provide shared textures for non-instanced objects.

Speaking more generally I don't know if it's the best approach to load/dispose the texture every time for a supposed LOD change. What kind of objects/behaviors are you trying to apply a level of detail system to like this? And are you using large textures?

Basically you just add a jump value to the player Z position which you decrease every tick by some gravity value. Then increase the gravity by some factor once you're falling again (for a better less floaty feel).

Of course you need to implement checks to see if the player is on ground. This has to be your own event logic. Check for overlaps and compare Z top positions of your geometry to the player bottom position (feet if you will) and also player top for colliding above when jumping - alternatively you could also use ray picking for this which will probably run faster but might introduce some other difficulties.

In general using some kind of state machine (via the plugin of the same name is pretty handy) helps in such endeavors.

If you want to I can still take a look at your capx file, sure.

Thank you! I did grant access to the file just now.

Using "Load models" is not necessary anymore since version 0.97. Since it gives you an alert this also indicates to me you are not actually using the latest version of the plugin. Please update.

(1 edit)

Here's the most minimal example of showing a model: https://drive.google.com/file/d/11-Wg3IkP4sJ06jPNEezIQ4tLTNtil12D/view?usp=shari...

Error "0" doesn't seem right do you have a screenshot of this (with console) or maybe even an example file?

So I went ahead and made this slightly trippy white void version of a basic third person camera and controls.

https://drive.google.com/file/d/1R-o6JJ-MscUvzhFbKllTcb9AjJB8Idex/view?usp=shari...

Check it out it should answer most of your questions when you study it (it's only 13 events). 

WASD moves the character box, mouse moves the camera around it. Mouse wheel up/down zooms in/out.

Oh yeah this example requires the Simple Mouselock plugin.

For a third person view like this you should create a camera that is at a certain radius from the character while always looking at it and offset in elevation (Z) to look from above basically.

Something similar is shown in the 8 direction billboard example where the camera rotates around the billboard character in the center.

Now when you simply slap 8 direction movement on your character you will get probably undesired results since the character is not moving relative to the perspective (regular third person movement) or depending on where the character is facing (tank controls).

For first person controls (which does not apply here) and tank controls I'm actually using an edited version of the 8 direction behavior called wasd movement which is adjusted to move its object relative to its angle and defaults to w,a,s and d instead arrow keys. Maybe I should share this at some point.

For regular third person movement, which I haven't actually used myself in anything I've created with Baby 3D yet, you should apply vectorX and vectorY of the 8 direction movement behavior relative to the camera angle. Unless I'm totally thinking of something stupid and wrong right now...

If this doesn't help enough I guess I can cook up an actual example in the next few days

So you are saying the fog color is grey and only appears on that model? Since boxes or any behavior meshes cannot be excluded from fog I am surprised by this outcome.

What's the light setup of the scene? Probably best to share the capx if you can so I can properly see for myself.

Screenshot at least or it didn't happen... 

In other words: please provide more details.

(1 edit)

You can set the sampling mode to NEAREST, BILINEAR and TRILINEAR via property for the Plane behavior. I just noticed you can't yet for Box/Cylinder (defaults to NEAREST atm) so it will be added in the next update.

If you want a really blurry look for some reason (N64 chique?) you can also try using FXAA.

There actually is one since the last update. 

"Set mesh rotation" is part of the main plugin.

Here is your edited capx: https://www.dropbox.com/scl/fi/lwujjl1kgp83pk6nucwet/horrorEdit.capx?rlkey=45rt5...

I basically just removed the camera behavior, added a camera via the main plugin and set its position and angle every tick like the behavior would've done automatically. Comments are at the two relevant spots in the event sheet. 

Can't open your capx because I'm missing an older plugin I can't seem to easily find: HTML | iFrame by PlayLive. 

Please share the plugin or point me to the proper place to download. Or if possible at all remove it from your project.

(1 edit)

Hey, I haven't looked at the capx yet but the issue last time was the use of camera behaviors instead of cameras created by the main plugin.

The behavior camera is bound to a layout object and therefore destroyed on layout change/restart which can lead to unintended glitches and errors. Therefore I have to strongly recommend for most cases adding cameras via the main plugin.

Hey there!

Babylon.js is definitely able to generate noise textures.

Are you looking to actually use it as opacity texture (since you were talking about transparency)?

And yes I do think this could be a welcome feature. Strongly considering right now...

Hello there!

For the model plugin to work you have to first import the model file (glb/gltf or obj) you want to use into your project's files folder. 

Then in the model object's properties you set 'File name' to the name of the file you just imported. Now the model should actually show up in your scene when you run it.

Let me know if you need further assistance. There probably should be an example file for this in the future.

Just to be clear: you want to get the yaw, pitch and roll of a hit face? What's the use case if I may ask?

Afaik you could use a bit of math and get yaw and pitch of the face from the normalized normal. However the normal from the ray hit is being used internally, it's not exposed via expressions or anything currently. 

Maybe such expressions could be useful.

If you want create a ray at a certain angle all you need to be familiar with is cos and sin and apply it.

So speaking from a topdown view having the ray at an angle of 45 degrees would be simply X vector set to cos(45) and Y vector to sin(45).

That's sounds to me like the basic operation of frustum culling (which is true by default). So it's an engine feature.

You cannot instead you should try to create different model objects for each LOD level and switch between. Probably avoid destroying/(re-)creating and go instead for making things invisible and visible again.

I haven't actually tried this but this seems like the first logical approach.

Yes I do. It's gonna be most likely the last major addition before hitting 1.0.

(1 edit)

Thanks for bringing this up.

There was some bad oversight on my part. I uploaded version 0.97 anew with that error fixed. 

So please download again and replace the main plugin.

Hey!

Since the latest update your imported model can be completely excluded from picking by setting the property "Pickable" to false;

But you're right to assume that an imported model with different meshes can currently not be altered separately. 

I just noticed a related issue with picking against imported models. For submeshes it will actually return NaN and therefore won't be really useable. It's clearly something to think about for the next little maintenance update.

With the addition of a general mesh visibility action your suggestion would become fully feasible.