Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / MeshMemblock Function

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Oct 2018 23:22 Edited at: 7th Oct 2018 23:42
SkySphere.obj Like santman suggest not sure if textured properly
fubar
puzzler2018
User Banned
Posted: 7th Oct 2018 23:26
wow - thanks for you efforts - great stuff


proof will be in the pudding if this OBJ file works?

Ill test tomorrow eve

Cheers
puzzler2018
User Banned
Posted: 7th Oct 2018 23:36 Edited at: 7th Oct 2018 23:38
A new inverted function will be needed for imported OBJ files - cause how it is for loaded objects at the moment is the outsides - This wont be a poblem to invert.

This would be handy anyway - so it needs to be done.

For example -

A house - we have brickwork outsiide and house internal
puzzler2018
User Banned
Posted: 7th Oct 2018 23:48
Here is my disco festival

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 8th Oct 2018 00:28 Edited at: 8th Oct 2018 00:29
Will try to make a dynamic texturable inverted and normal sphere within the week and see how it goes.

They are a nightmare for UVs
puzzler2018
User Banned
Posted: 8th Oct 2018 00:36
But this is contradicting what Satman suggests been possibly been great solution

Half box
Half ICO
Half Sphere

I can live with all and make the option available in an editor of some sort
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 8th Oct 2018 00:39
Sounds good to me
fubar
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 8th Oct 2018 01:41 Edited at: 8th Oct 2018 01:43
Janbo posted within the last three days in another thread, so I think he's still with us..
puzzler2018
User Banned
Posted: 8th Oct 2018 01:46
thanks
puzzler2018
User Banned
Posted: 8th Oct 2018 03:19
Stay strong jambo
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 8th Oct 2018 09:12
Kind of like half a sphere, but i used less. I'll upload it later.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 9th Oct 2018 11:52 Edited at: 9th Oct 2018 11:55
Did I miss something ?
I feel pretty good, even if the doctors are alarming
But Im not so easy to get down

Would be cool to have some funktions to dynamically create a trail.
Not using particles but something you can collide with and maybe some alternatives to linear interpolation(splines or cubic).
I know there are librarys for splines and such but it still needs to be implemented with UV and Normals with more vertices in the curves to get smother results.
I have some code to create a trail mesh actually.
After the update of my shader pack(very soon) I want to work on a special trail shader in my freetime then.
puzzler2018
User Banned
Posted: 9th Oct 2018 11:55
Thanks again guys.

Tried your dome fubarpk and something not quite right with that - ill check it out more later

Thanks Santman too

Ive been having a go at making half of a ICO Sphere in Blender - - adding a texture that would export successfully mapping the uvs is just not happening

Wow - ive gotta get my blender skills into practice

In the mean time, ive converted the box creation function to be inverted

skybox = LoadImage("\media\skybox2.png")
CreateMeshObjectBoxInvertedWithTexture(0,0,0,10000,8000,10000,0,0)
skybox=CreateObjectFromMeshWithUVTexturing(meshid, skybox)


Pics of the examples with an inverted box

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 9th Oct 2018 11:58
Nice to hear from you Janbo and keeping well.

Yeah the trails thought sounds good.

Do you perhaps have an example - maybe a pic or a youtube vid anywhere to show what this trialing affect does?
puzzler2018
User Banned
Posted: 9th Oct 2018 12:12
Wow - pretty epic

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Oct 2018 12:26
Quote: "Tried your dome fubarpk and something not quite right with that - ill check it out more later"


I mightve stuffed the texture mapping up taking it into meshlab
fubar
puzzler2018
User Banned
Posted: 9th Oct 2018 14:52 Edited at: 9th Oct 2018 15:07
Ok no worries,

I tried to do a textured sphere in blender - its coming in, but lots of disconnected vertices / blanks, any ideas anyone

am i missing anything important in the loader

EDIT - think i know why

The OBJ file for this sphere at least has 4 f's and also has some 3 f's too - I havent accounted for that yet - oh boooo




Attachments

Login to view attachments
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Oct 2018 17:20
Here's a ready made sky dome.

Attachments

Login to view attachments
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Oct 2018 17:24 Edited at: 9th Oct 2018 17:27
I don't think the snow shader is overly hard TBH, it's just adjusting vertic heights based on a texture (note - the snow never gets deeper than it's deepest level as that's a texture value of 1.0 I'm guessing). The issue we have with AppGameKit is you cann't directly edit the memory of a texture, nor can you do it in a shader with AGKs open GL version I don't think, so we have to do it via a memblock and continually convert that into an image and assign it to the object we want to shade which is really slow in realtime.

RDR2 may change this, but games that use this (God of War, Tomb Raider) user a MUCH lower resolution version and you can clearly see it doesn't update every frame....that's the issue with these TechDemo's - it's easy to make wonderful things when that's literally all you have to account for, but in the middle of a fully functional game engine there just isn't the computing power. I think that's why there's 50 games previewed on FB for every one released....everyone starts with graphics using supplied or bought assets, but when you get to fun stuff like AI and level design......well, it's a bit more difficult. Lol.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 9th Oct 2018 18:07 Edited at: 9th Oct 2018 18:52
I guess you(Santman) are thinking of POM (parallax occlusion mapping) and then writing to the height image via memblocks...
Memblocks are to slow for when you try to create footsteps in sand on a terrain as you would need a mega texture like in Rage... splitting the map into small pices might work if you only want to show off that effect.
So writing images is slow right... but you can still archive this in a shader nevertheless.
Although I guess they are using the geometry shader which we don't have in AGK.
But WE CAN still generate the height map for POM using for example a small footstep height map and placing them over the source height map using a 2D Array for the position.
We could also create a texture atlas for different "footsteps" and reduce the calculation time if we remove the footsteps we don't need afterwards.

Also If someday someone finishes deferred rendering in AppGameKit such an effect would be easy to achieve with decals.

[Edit]
Quote: "maybe a pic or a youtube vid anywhere to show what this trialing affect does?"

First here are the Trail Mesh Parts for you

Something like this... (not mine)

Imaging it to always facing the camera like bilboards.
I think we could create 3D ropes/power lines which react to the environment using ragdoll physics or just a trial of a bullet in slowmo
[/Edit]
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Oct 2018 19:08
That's what's I meant.....you could do it using textures but you'd have to keep updating the image using memblocks, which is slow. In open to 3 onwards here's commands to write image data, so I guess you *could* pass in coords then generate the texture in memory, which would be lighting fast.

But not in our open gl. Well, that I know of.
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 9th Oct 2018 20:32
Quote: "That's what's I meant.....you could do it using textures but you'd have to keep updating the image using memblocks, which is slow. In open to 3 onwards here's commands to write image data, so I guess you *could* pass in coords then generate the texture in memory, which would be lighting fast.

But not in our open gl. Well, that I know of."


You dont have to use memblocks...thats the key to get the speed for real time surface modelling....simple apply a texture for the snow iteself and use another texture to store the heights.

Manipulate the heights as an image....just render to the heightmap and add or delete snow.

A really quick example which allows for rough adding and deletion of snow using a shader and image manipulation is attached. If I uncap the frame rate its well over 2000 even when editing snow. Definately the quickest way!

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Oct 2018 20:49
That's cool janbo
Great Example Bengismo

fubar
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 9th Oct 2018 21:11
Ah I suppose, hadn't considered rendering to an image actuly, good call.
puzzler2018
User Banned
Posted: 10th Oct 2018 06:50
Wow thanks for all your comments guys - I didn't expect this much but all good.

@Satman - thanks for your of a skydome too, even though not all the vertices don't get constructed on this too, it is due to the structure of the Obj file (f's) that I haven't programmed yet. but will look at fixing this as soon as I can and then re-post a latest commands.

@Bengismo and @Janbo thanks for your wonderful ideas and demonstrations too - gives me some inspirational ideas to construct something similar - but cause my shader knowledge is still low then will take me a while to develop something in shaders

I have made the InsertMeshObject function to have an option to have the objects be able to be inverted on the textures too, and maybe double sided too one day, this would be useful if want to create houses or circus's domes. (these have different texture on the outside and different on the inside.

Anyway - all is good and catch up over the weekend for more



puzzler2018
User Banned
Posted: 10th Oct 2018 13:00
I will also need to put some structure into this too by means of folder structure.

meaning:-

\media\sounds - for sounds
\media\music - for music
\media\assets - for OBJ files
\media\textures - for textures
\media\skyboxes - for different skybox models

this is so that the resulting world we create using these commands are created and everything is in their rightful place. - and if they
aren't, it will just mention this for either you to move the files into the right directories or it does it for you with a loading command I
will write

if you could Let me know your thoughts, then that would be good too

puzzler2018
User Banned
Posted: 10th Oct 2018 17:26 Edited at: 10th Oct 2018 17:30
Hi

Just thought id collate all the memblock functions we have here



I shall document these up too soon, with knowning how to use them

Shall keep progressing with the OBJ loader to start with though and also a primitative SaveObject command (AGK version is not yet operational,so wonder what this would consist of. but will have a go myself too sometime over next few weeks

EDIT - and of course like to ask if anyone likes to see any more commands - ill try and think of loads more too
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 10th Oct 2018 18:19
Quite allot of commands there

Should make a great document
fubar
puzzler2018
User Banned
Posted: 10th Oct 2018 18:41
Thanks

Hopeully i have fixed the missing vertices on a triangulated OBJ (saw lots of missing triangles)

and here is the result of using Santmans OBJ (Attatched)

Ill try with your version of a skybox a little later to see if we good


Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 10th Oct 2018 20:16 Edited at: 10th Oct 2018 20:29
Just thought

What can do now is have 2 skyboxes - one for the sky (texture inverted) which is way up there and one that you stand one (texture normal way round)

The sky one is obviously sky texture and the land one will have a land texture.

The land texture than can then be dynamically updated with memblock image updates

Wow - its coming together quiet nicely now

Like this

Ill leave it up to you guys for been artistic!!

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 10th Oct 2018 21:42
Its no good me talking about it, so here is the latest so you can see what it looks like

Attached cause so big.

Move up with W for now

Any loading problems cause may have missed something, let me know

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 10th Oct 2018 22:19
Was missing a heap of stuff
added santmans skydome.obj from above
but all the textures that were missing I tried with your attached images
but wasn't exactly sure which was which as they only show as numbers
but I did get it to work just wasn't sure if it looked right
fubar
puzzler2018
User Banned
Posted: 11th Oct 2018 03:52
Thanks

Ive packaged it up to a ZIP instead so not confusing yourself on how its built.

Press the W to go up a little bit and then if you could take a snapshot / snipping of your screen of what your seeing which makes you think it doesnt look right as it looks good at my end

Thanks


Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 11th Oct 2018 07:50
That's much better
fubar
puzzler2018
User Banned
Posted: 11th Oct 2018 12:31
Thanks - did it look ok?

If you all could use the last download as a base project for this thread and any future updates i do will be to the "main.agc" file, so all you'll need to do is re-write over the top of the base one.

Catch up with more over the weekend.


fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 11th Oct 2018 18:31
Quote: "Thanks - did it look ok?"


It had a sweet spot where everything looked good

but with my computer I found the controls a little touchy
and found myself tapping up then down over and over to find the sweetspot
but that was really just camera positioning and nothing to do with what was
done.

But looked really good

fubar
puzzler2018
User Banned
Posted: 11th Oct 2018 22:32 Edited at: 11th Oct 2018 22:34
Thanks.

Blink0K I believe you asked a few things many weeks ago, can you remind me what you like to see

Golehorn - I dream that we have dynamical shatter peices toether but this will take some time - we can make any loadobject into shattering peices now - some development work to do this though - so bear with me
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Oct 2018 01:16
Explode
A function to return an array of information from the mesh and save that array back to a mesh
puzzler2018
User Banned
Posted: 13th Oct 2018 12:50 Edited at: 13th Oct 2018 12:54
Thanks - ill try and work out what you mean..

I have added a shatter function to a loaded OBJ now

function InstanceMeshObjectShatter(id, ObjID, x#, y#, z#, scalex#,scaley#,scalez#, color, inverted)




for a better effect - i have used a larger polygon torus.obj and cube.png

Please use this as seperate proect to the full mesh project one i zipped and posted other day - i will merge this command into the man project one when i have this shatter woking on all types of objects and with own physics too

But i hope you see what this effect is doing


This will only work for the time being with a polygon type OBJ texturable structure at the moment, by all means try with your own OBJs

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 13th Oct 2018 13:31
Wow - this looks funky



Use the torus.obj and cube.png

Press enter
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 13th Oct 2018 19:25
Both effects looks very awesome
fubar
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Oct 2018 21:39
Yes. Super stuff!
puzzler2018
User Banned
Posted: 13th Oct 2018 22:05 Edited at: 13th Oct 2018 22:09
Thank you

Using the same obj and png

how about a bit of shake rock and roll before the big smash



Enjoy!
puzzler2018
User Banned
Posted: 13th Oct 2018 22:32
Anyone realise what im trying to acheive?

Its not a game

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Oct 2018 09:07
Quote: "Anyone realise what im trying to acheive?"


∀ƎpI ON
fubar
puzzler2018
User Banned
Posted: 15th Oct 2018 10:08
The goal is a Base World Editor called MODS - Mesh Object Design System

- Primative Object Construction

- Apply Skyboxes

- Pick and place objects

- Object physics, each having own parameters, velicoty, speed, gravity.

- Independent Rotations / Movements per object

- Shatterable objects

- Texture construction for the mesh.

- Make use of the 255 mesh indexes to apply more textures

- Correct UV Mapping for the above

- Creation of multiple meshes in one scene by rolling mapping or static worlds

- Import and Export the world into your own AppGameKit project - so can add your own code.

That's the idea anyway - ive always been fond of making an engine as such
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 15th Oct 2018 14:49
Make make sure all 255 mesh indices are available. I mention this because the collision system that Paul wrote for DBP would occasionally make use of mesh index 255, so when using the system we would ensure that we didn't use that index. I don't know whether AppGameKit borrows one on occasion.
puzzler2018
User Banned
Posted: 15th Oct 2018 19:12
Thanks for that enlightening info.

Im back to 2D for a little while.

Does anyone know how to do this and make the rendering look good.

- We have a few panels created via the drawbox commands and createtexts labels

- on those panels, we have buttons, sliders, entry boxes - probably still made with drawboxes and 2D sprite collision and effects etc

All those panels are needed to displayed over the top of a 3D rendering view.

Ive tried but got wrong rendering piping is wrong - either the drawboxes was displaying and the text wasnt, or the text was and the panels wasn't, or the 3D world was taking ownership of the whole rendering pipeline.

Somewhat i might have Render2dback, render2dfront, cleardepthbuffer completely messed up totally

Ill try and send an example soon of a bad example

Any thoughts anyone in the mean time
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Oct 2018 22:01 Edited at: 15th Oct 2018 22:02
If your drawboxes and text are sprites this should work

fubar
puzzler2018
User Banned
Posted: 15th Oct 2018 22:10
i often wondered what the quad object thing was about

Thanks.. Ill give it try tomorrow

Login to post a reply

Server time is: 2024-04-19 01:57:01
Your offset time is: 2024-04-19 01:57:01