Forum Replies Created
-
AuthorPosts
-
Constraints now renamed to joints in develop branch – joints also work in mojo3d scene files, see jointchain-scene.mojo3d!
How about a reset rotation key for when you’re on the ground?
Woah, yes, the camera needs some work! But it’s starting to remind me a lot of Zarch..
One quick question before I get too carried away with new stuff – should I rename ‘Constraint’ to ‘Joint’? And ‘PointToPointConstraint’ to something like ‘BallSocketJoint’? So far, I’ve just used the bullet names directly, but they’re kind of cumbersome…
Just pushed LinearFactor and AngularFactor properties to develop.
You should find it much more controllable now
Yes, I could actually fly around for a bit before crashing wildly into the ground!
individual browser/driver/platform combinations
Yeah, but I’m also reminded of the time glGetError() was causing major slowdowns on chrome, and the ‘100% cpu’ issue that was related to using glGet. In both cases, the fix was easy, ie: don’t use glGetError or glGet. I wonder if there’s something else here I shouldn’t be doing…
mserver has never been part of the repos, you need to install it separately from the downloads page.
Would need this to restrict to x/y movement entirely.
Another thing that would be fun to play with is transforming thrust/offset vectors from camera space to rocket space, ala the space->space transformation post from a while back.
This would give you mario64-like control where left/right meant left/right in camera space, not model space.
I have no idea if it’d fun or not but it’d be interesting to play with – it should at least be easier!
Working well here, are you using the new damping stuff? Does it actually do anything?
Would need this to restrict to x/y movement entirely.
No problem, will add it later today.
Nah, I haven’t grasped collision groups properly
Yeah, it is confusing, I will probably work on making it easier to use a bit later, but for now it’s just the way bullet works by default.
The framerate is around 13fps on chrome here on the last bust link. Not sure why.
Can you post some system specs including chrome version?
For sure, you can double click on model files from within the ted2go project browser, or drag ‘n’ drop them into ted2go from the OS file explorer.
With difficulty.
There is no direct support for these features in mojo/mojo3d so you’d have to implement them yourself either by hacking mojo/mojo3d or writing your own engine from scratch in GL. You may need to tweak the opengl module along the way to add any missing GL functions/consts.
For now, I only plan to support a common subset of features that are available on both GLES2 and desktop GL and these are advanced features that are not supported in GLES2 (and in probably in a lot of desktop GL implementations) so they wont be happening for a while yet, if ever. I would in fact be more inclined to consider moving to vulkan for the next API instead of GLES3 or equivalent desktop GL…
AmbientTexture and AmbientColor now up in develop branch!
Monkey123456789Local material:=New PbrMaterial( Color.White,0,1 )material.ColorTexture=Texture.Load( "asset::Slate Tiles II_D.png" )material.AmbientTexture=Texture.Load( "asset::pointlight_light.png" )material.AmbientFactor=Color.White_model=Model.CreateBox( New Boxf( -1,1 ),1,1,1,material )_model.Mesh.CopyTexCoords()AmbientTexure/Color always use second set of texcoords for now, so you need to CopyTexCoords after creating a mesh. Also, gltf2 appears to support 2 sets of texcoords so I’ll add support for that ASAP.
Working well here on chrome/nightly, windows 10, 60fps all the way. Like all games these days, too freakin’ hard for me though!
My rocket keeps rotating, but I can’t see that we have (at least Monkey-side) angular damping
Will add linear/angular damping for next release.
Can we have fixed constraints added?
Will add eventually. Are you using ApplyImpulse for thrust? Have you looked at the ApplyImpulse( dir:Vec3f,offset:Vec3f ) version? This should allow you to provide off centre, ‘local space’ thrust, ie: offset is similar to LocalPosition for child entities.
Unrelated: how do you export PixelFormat.I8 from a paint program?
I use paint.net and save as 8bit png.
is there a way to detect collision at the moment?
Yes, see: Entity.Collided. I did have it going in tests/shapes.monkey2 at one point, but it’s commented out now I think. Still, should show you roughly how to use it.
Nice demo! Dig the ‘god ray’ too…
Just working on this now, and the way I’m planning to implement LightTexture is to add light texture texels to Scene.AmbientLight when rendering the ambient pass, so perhaps LightTexture should be renamed AmbientTexture? LightTexture is pretty vague…
Using light texture to simply modulate ColorTexture would be another approach, but this wouldn’t take into account metalness, roughness etc, which can affect ambient lighting. If you did just want to modulate ColorTexture I’d rather use something like ColorTexture2, so total Color is ColorTexture * ColorTexture2 * ColorFactor etc.
And of course, we could have both ColorTexture2 and AmbientTexture eventually, but for now I just want to get something working and AmbientTexture seems to be more in line with what you want to do?
Hmm, I get different results here with a black env and no lights. I get whatever’s coming through emissive, ie: just the ‘fake’ light, no color:

…and the setup code (no light):
Monkey123456789scene.AmbientLight=Color.Blackscene.ClearColor=Color.Blackscene.EnvColor=Color.Black 'turn off all env mapping.Local material:=New PbrMaterial( Color.Magenta,0,1 )Local texture:=Texture.Load( "asset::pointlight_light.png",TextureFlags.FilterMipmap )material.EmissiveTexture=texturematerial.EmissiveFactor=Color.White_donut=Model.CreateBox( New Boxf( -1,1 ),1,1,1,material )So it’s ‘working’ here (IMO), but I get that this isn’t what you want anyway, which is effectively a separate ‘self illuminating’ texture similar to what hezkore has been doing with the quake stuff.
Here’s what I’m thinking:
- Add a LightTexture to PbrMaterial. A material with a light texture is a ‘static material’, ie: it’s not really expected to move…
- Static materials will NOT be lit by scene static lights (via eg: LightFlags.Static, possibly directional lights by default?)
- Static materials effectively provide their own ‘static light’ via the LightTexture, and ARE lit once using this ‘light’.
- Static materials are still also dynamically lit by ambient light and dynamic lights though.
- Light textures use second set of vertex tex coords.
Does that sound right?
I’ve actually been working on related stuff over the last few days (have cleaned up the shader system considerably, ouch) and have been thinking about static lighting etc. and am looking forward to getting it going ASAP!
For starters, you need this in the code:
#Import “<mojo3d-loaders>”
Without this, the assimp module that includes thre 3ds loader wont even be present! Have a look at some of the tests in modules/mojo3d-loaders/tests.
Also, you parent the model to the camera and then move it up 2.5 units. This means that no matter where you move the camera, the model is always above the camera which might be a problem. Also, if the model is too big or too small it wont be visible.
Can you view the model in the ted2go IDE?
Shr is signed if operands are signed, eg: -64 Shr 1 does a signed shift right (ie: -32) while print UInt(-64) shr 1 does an unsigned shift right.
This has been added and is now available from the develop branch at github!
So you can now do this:
Local myArray:=New Int[2,2]( 1,2,3,4 )
You need to get number of initializers exactly right or a runtime error will occur.
See LoadDir in the filesystem module, eg:
Monkey12345Local files:=LoadDir( DesktopDir() )For Local f:=Eachin filesPrint fNext -
AuthorPosts