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 / How many planes are reasonable?

Author
Message
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 26th Mar 2018 17:43
When I started playing with image memblocks, I quickly found out that I could convert each pixel in an existing image to a series of planes. This has evolved, and now I'm working on a VR pixelart editor, where each pixel is a seperate plane. So far, I keep it at 64x64 pixels, because I feel that 4096 planes is quite enough. But just how many planes are reasonable? And are there any way to make the planes eat less resources?

PS: check out my gif!

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 26th Mar 2018 18:59
Looks good with your pixelart for starters.

ive experienced with using createobjectplane will be far more resources than instanceobject

With these two commands, I have managed

- createobjectplane (30k) before it boooms

- instanceobject, can reach more than treble but fps will start to get you down

so go with instanceobject and if already are then keep going. you will be fine with that

Hope this helps
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 26th Mar 2018 20:52
Thanks! When I posted, I kind of wondered how you handled the boxes over that the minecraft thread. I didn't knew about instanceobject, but it was pretty easy to implement. Framerate is pretty crucial in VR. If it drops, the game is broken. So I try to play it safe!
puzzler2018
User Banned
Posted: 26th Mar 2018 20:56
Mesh building is the way to go for the type of game like Minecraft

Your welcome
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 26th Mar 2018 21:03
You dont need a separate plane for each pixel you have.

You can have one textured plane that displays the whole image. You then just change the pixels in the image and update the image from the memblock and it will display on the plane object.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 26th Mar 2018 21:22
Yeah, I considered that! But sadly, CreateImageFromMemblock() is too heavy to use in realtime.
puzzler2018
User Banned
Posted: 26th Mar 2018 22:13 Edited at: 26th Mar 2018 22:15
You GIF suggests that you already created a plane - been the canvas

you suggesting that when you paint on the canvas is to create individual planes for each pixel.

thats heavy

cause if create planes over and over again in the same area - soon you will run out of memory, - unless you put if a plane already exists there then delete it

Meshing is probably best way for you too

each pixel color is changed on the mesh in real time - be a lot quicker too
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 26th Mar 2018 22:14
Its not "too heavy" at all. I have framerates upwards of >2100fps continiously updating an image memblock. (An image 400 x 300 pixels) I posted a demo of this a while ago.

And you dont need to create the memblock each frame... you can just update one that you keep the ID of while your editing it and upload it to the image each frame instead.

Its more than fast enough for what your doing.
puzzler2018
User Banned
Posted: 26th Mar 2018 22:17 Edited at: 26th Mar 2018 22:18
It is when cover the same pixel over and over and over again without detecting if there is already a plane there

Or just create

64x64 planes, and dynamically change the color with setobjectcolor

Bengismo - please show some apps you have created ... Be nice to see what your developing at moment
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 26th Mar 2018 23:23 Edited at: 26th Mar 2018 23:50
Hi Puzzler

I cant show the apps that Ive made as they are paid for by customers of the company i work for, [EDITED TO REMOVE PRIVATE INFORMATION]....AGK is just what i do for fun.

If you give me a minute I will quickly code up editing an image in 3d but with 1 plane instead of many....
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 26th Mar 2018 23:40 Edited at: 26th Mar 2018 23:42
Ok...its past my bed time ....but here is a little 3D artist painting program.

Imagine a being a painter where you spray colour at an image in 3D using your left mouse button and fly around using the right mouse button and WSAD keys.



Its probably got bugs as i havent spent long on it.... (20 mins)

Its set at 300FPS just to show the performance should be good on PC's and that editing image memblocks in real time is possible pretty fast.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 26th Mar 2018 23:46
Oh ... this is amazing!
puzzler2018
User Banned
Posted: 26th Mar 2018 23:48
thank you bengismo - i know this treats your skills very well as i imagined
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 27th Mar 2018 15:11
I have found out why I thought CreateImageFromMemblock() was too slow. Turns out what actually slowed down my code was adjusting each memblock pixel in real-time!

So I have tried to get into Bengismos code, and I feel that I have gotten some degree of understanding. I converted it to VR, using the B Button on the Right controller for drawing. Of course, the canvas size of 10 x 10 meters was way too big. Not something you'll ever notice on the monitor, but in VR, it's rather extreme!

The painting seems to be offset half a pixelart-pixel vertically and horizontally. Should be easy to adjust, or so I think. I'm still in the process of trying to 'get', the code, but I'm getting there, slowly.

Login to post a reply

Server time is: 2024-03-29 10:22:22
Your offset time is: 2024-03-29 10:22:22