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 / Image to 3D Led's

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 11:42 Edited at: 1st Jan 2019 11:52
I gave it a break and thought about it and this is mighty close




oh change objects.insert(CreateObjectBox(1,1,1))
fubar
puzzler2018
User Banned
Posted: 1st Jan 2019 12:09 Edited at: 1st Jan 2019 12:33
Dont know if this will help a little


Press Space to move and identify the true vertices been shifted

EDIT I forgot to -1 so its 1 and 3 vertices,



Shall continue to find the rest

13 and 15 is the next one on the +Z axis



Press Left Mouse to rotate and space to change them

Shall work on the X axis ones now
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 12:40
my next thought was to get the next positions and the previous one of the map and set the vertices to the current one to them like this


fubar
puzzler2018
User Banned
Posted: 1st Jan 2019 12:45
Try this one too, to make that fancy effect it uses some of the Odd vertices



Press Space and rotate
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 13:05
Interesting !!!
fubar
puzzler2018
User Banned
Posted: 1st Jan 2019 13:09 Edited at: 1st Jan 2019 13:10
Here is a cross over



All the same vertexes for each of the starting blocks - the slope just either moved in the X or the Z , so can be refactered somewhat to reduce it down
puzzler2018
User Banned
Posted: 1st Jan 2019 13:21
I shall now work on putting this into a map structure

Type _map

xroads as integer
zroads as integer

xslopes as integer
zslopes as integer

xdirection
zdirection

endtype
global map as _map[64,64]

Something like that... so then can import the image into the map again.

Once this is in place - then worlds our oyster to be able to create many style apps of this nature, but i must now go get something to eat, so catch up soon


fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 13:25 Edited at: 1st Jan 2019 13:59
that's pretty cool

crikey I think ive got it



Map.png
fubar
puzzler2018
User Banned
Posted: 1st Jan 2019 13:56
Wow - I think so too, thats pretty cool too - good on ya!
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 14:01 Edited at: 1st Jan 2019 14:08
Thanks pity about the right edges stuffing up, I wonder if that's the size of the image ohwell that will do for now

The next step is to join the blocks so as its one mesh, theres several ways to do this even if theyre just attached but would
be a great way of making a model and then exporting it. but think I need to leave it at that for now

Even if it had to be imported into blender to do final touches an easy way to make a low poly model
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 22:24
Chafari I added your snippet to get the vertex data from a mesh to this thread of mine
https://forum.thegamecreators.com/thread/222027?page=2

I also would love to have Puzzlers led board there as I think it would come in handy
later. But il leave it up to you Puzzler

I like to use that as a one place stop to revisit old snippets of code usually ive produced as I have
so many snippets lol one of my test code programs is huge and has gigantic sections commented
out lol I have to sort that. But feel that thread is handy for many uses aswell. Your both very much
welcome to post any snippets you have there.

fubar
puzzler2018
User Banned
Posted: 1st Jan 2019 22:33 Edited at: 1st Jan 2019 22:35
Of course - go ahead...Thanks for asking..


Your welcome
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Jan 2019 22:43 Edited at: 1st Jan 2019 22:44
@fubarpk / puzzler .Happy New Year again guys ! At the end you both got it working ! Thanks fubarpk for the credits....feel free to use it as you need . I'm actually with my exporters .x and .obj to save our level . More or less I already got them working .. I've found out lots of tricks to use in 3D as saving and loading levels but I need to polish them a bit and open a new thread to put there all 3D stuff .

Cheers.
I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 23:06
Quote: "Yes an exporter of objects would be great."

1>I want to add all the objects created in the above height map thingy to one mesh
Il have to revisit puzzlers code I think he had a great method of doing so, but last time
I played with it I stuffed it up trying to improve performance and complete redundancy
2>Then the ability to export as an obj I think you both have routines for that and
3>finally import the object into blender. Im thinking that might be the quickest
way to remove those unwanted vertices shooting off on the side. then instead of it just
being a height map creator it can then be a low poly object creator from a height map
which I personally believe would be very handy and a quick way of producing so said objects
Think il leave it up to the expert texturing programs to handle texturing. Just aslong as it will
create one mesh that I can then box map the uvs with using Lithunwrap
fubar
puzzler2018
User Banned
Posted: 6th Jan 2019 19:10
Just thought try something bizarre



Attachments

Login to view attachments
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Jan 2019 23:48
I can't get it work ! I press mouse but nothing happens
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 6th Jan 2019 23:52
keep hold mouse to move camera - and move camera

maybe this


chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Jan 2019 23:54
Nop ..something happens ...
I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 6th Jan 2019 23:55
Hope you don't mind the post here but it was here it all started

I used your image to create a mesh with meshcreator 1.9 using the smoothing function and used lithunwrap to box unwrap the uvs to a texture
then roughly placed your texture where I thought the uvs matched and ended up with this in agks asset viewer



I wouldnt recommend doing the same as the object is a massive 80mb but i really wanted to test the tool, the tool is really only something for the
forums and i definately wouldnt use your images without consent other than to test like this which doesnt give away the image. I hope you dont
mind the post (nice image btw) i will delete the image i just displayed soon enough i have allot of housekeeping of deleting all the uploaded images
etc i have on my webpage that were just to show progress etc

Once again thanks for all your help and inspiration
fubar
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Jan 2019 23:59 Edited at: 7th Jan 2019 00:00
we can unwrap the uvs to a texture into Agk and give to the whole .Obj mesh a new UV's
We can use the trick of Texture projection to achive that
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 6th Jan 2019 23:59
Of course not - your views and opinions are are always welcome

It could be chopped up into 16 x 16 x and z areas and using Occlusion methods - please have a gander at that post
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Jan 2019 00:04
Im sure there is a way and probably only needs to be a small grid of textures
that's just a test and its so simple and quick to do it with lithunwrap im not sure
I want to do the same in AppGameKit but maybe in the future who knows. And I was
looking at puzzlers code for the block world a week ago and thought it was best
to start from scratch as I found it hard to follow as it was mostly a large section
of code that was taking along time to decipher. I just thought ide start from scratch
but his code with the lego style world works great and is superior to what I have
created I just couldn't follow it well enough to just use the bits I wanted
fubar
puzzler2018
User Banned
Posted: 7th Jan 2019 00:05
Chafari - to change the vertexes on a current 256 x 256 map will be very slow on progressing updating. the ultimate size is 16x16 meshes

This map or any map can be chopped up into 16x16 mesh chunks to be able to be quickly changed that ours eyes wont see..

you sitting in the center chunk so all we change is that chunk. the outer chunk meshes get rendered with no effect
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Jan 2019 00:23
Quote: "256 x 256 map will be very slow on progressing updating. the ultimate size is 16x16 meshes"

Agreed

Should be relatively easy to chop up in 16 * 16 chunks as you really only need to chop the image up into chunks
Think doing it that way the hardest part is piecing the chunks back together
fubar
puzzler2018
User Banned
Posted: 7th Jan 2019 18:20
Had a think about it and this is close can get to chopping it up



Can use any size map now - it should just work it out nicely

change the constant size variable.

Indeed the FPS is rubbish, so need to work on that by creating backface occlusion on the cubes and other occlusion techniques

Move about by holding left button and cursors and WD

The gaps in between shows that they are all individual meshes


Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 7th Jan 2019 18:59
Does anyone know the algorithm to create objects in a circular style motion starting at a centre point.

Say we have a 128x128 map... The starting block will be at 64x64 location, and then it builds around that centre point until we finish

Im just not getting it right

I can indeed do a circle with sin and cos - this is not what i mean.

Any thoughts
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 7th Jan 2019 19:43 Edited at: 7th Jan 2019 19:48
What do you wanna really do ?


Edited....Hey ...I'm on your thread and you were in mine lol
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 7th Jan 2019 19:51 Edited at: 7th Jan 2019 19:53
Be easier to write in code in 2D



Change this to 3D - starting on the red box, create boxes starting at the red square outwards towards the end of the lines
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 7th Jan 2019 19:59 Edited at: 7th Jan 2019 20:05
Do you want to create a dome of objects?



Edit...I think now I have understood....let me a second ...


Edit2 I'm pulling my hair to find a solution
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 7th Jan 2019 20:07
For the moment, it will be a starting chunk which the player always lives ontop of the centre box.

The player never moves, its the world surrounding this chunk moves by changing heights on their vertexes on the neighbouring chunks.

The render distance will be how many further chunks will be created surrounding the centre chunk. -

Hope that makes sense lol

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 7th Jan 2019 20:24 Edited at: 7th Jan 2019 20:26
The first thing that crossed my mind was this ..






Edite...but this is a fake...boxes start always by 1...we have to find out a way the the next ring of boxes start in the last created box
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 7th Jan 2019 20:25
Thats it and spot on my good fellow - thank you so much....

puzzler2018
User Banned
Posted: 7th Jan 2019 20:36
There is always a method in my madness though and maybe some are confused as to why require this.

All in good time...
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 7th Jan 2019 21:10
In this new version, boxes doesn't repit any more

I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 7th Jan 2019 21:14 Edited at: 7th Jan 2019 21:17
Thats amazingly faster without the sleep(1) in there too, Thanks

Whoop whoop

Now time to build 16x16 meshes for those individual cubes set on line 22

Cheers

EDIT - can you see what it could be yet!
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 7th Jan 2019 21:39
Ok...I will wait to see what you come up with
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 10th Feb 2019 19:14
Found this tutorial on how 3D Engines work (from scratch) - to show you all, mainly the newcomers/beginners on generally how 3D works.

Its a very interesting tutorials, this chap has a few too - so a nice evening ahead.



Enjoy..
puzzler2018
User Banned
Posted: 10th Feb 2019 20:03 Edited at: 10th Feb 2019 20:03
Dammmm - part #2 goes into a little about backface culling on objects, to make sure that all triangles are created in the same rotation .... Cause we really do need this for meshmemblock programming

Carrying on watching cause this to me is like blooming gold dust!!
puzzler2018
User Banned
Posted: 16th Mar 2019 12:41 Edited at: 16th Mar 2019 12:59
I thought this might come in handy one day




Tier 1 Developer

Login to post a reply

Server time is: 2024-11-05 23:13:18
Your offset time is: 2024-11-05 23:13:18