Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - aZen

#1
Projects / Re: VoxelShop - voxel editor
July 02, 2016, 05:17:17 AM
IMPORTANT UPDATE:
VoxelShop is now open source! Always looking for contributors and feedback! If you have any issues or suggestions please post them here: https://github.com/simlu/voxelshop/issues

I'm not monitoring this thread regularly. Github is your best bet if you want a timely response!
#2
Depending on where your objects are, yes. Also make sure you set the far plane correctly.
#3
Projects / Re: VoxelShop - voxel editor
March 12, 2014, 10:17:07 PM
Quick Update: I've added a cool help system, so it might be time to check out the program again =)

#4
Projects / Re: Voxel Engine
March 09, 2014, 07:28:10 PM
Sweet, thank you for your reply! I'll do some testing and come back here when I have something cool we can talk about =)
#5
Projects / Voxel Engine
March 07, 2014, 08:28:44 PM
I'm planning to write my own software rendering engine for voxels, since unfortunately the speed of the JPCT software renderer (even with mesh optimization) doesn't cut it for me. Inspiration is drawn form Slab6,which uses software renderer and is <lightning> fast.

I was wondering if you could give me some input to get started @ EgonOlsen. Thank you!

Edit: Also, do you think it's a good idea? Do you think I could get similar rendering speed in Java compared to Slab6?
#6
Support / Re: FrameBuffer.getPixels()
March 05, 2014, 01:02:58 PM
Ah, yeah I guess that makes sense. I mixed up the conversion in my head, that's why I didn't get it at first.

Thank for explaining!
#7
Support / Re: FrameBuffer.getPixels()
March 05, 2014, 12:29:46 AM
Mhmm, I figured it out. It seems that the height is stretched while the width is not?! Is that by design?

Anyway, the correct relation is:

   pixels[(c/(w*2*2))*w + (c/2)%w] = zBuffer[c]

Note that the division rounds down, so you can not remove it!
#8
Support / FrameBuffer.getPixels()
March 04, 2014, 11:46:55 PM
Could you explain how the int array FrameBuffer.getPixels() is structured?

I'm having a hard time understanding how it works when oversampling. In normal mode I can simple access it in my software shader and everything works as expected. When using oversampling the pixels are "distorted" and I can not predict which pixel I am accessing. Let me clarify that a bit.


(click to enlarge)

So with normal sampling there is a one to one map from the zBuffer to the getPixels() buffer. With oversampling I was expecting a 4 -> 1 map, but that is not the case. In the "Oversampling" example in the picture I'm using a 2 -> 1 map (i.e. pixels[c/2] = zBuffer[c]). I can not figure out how to do it correctly and have already spent way to much time on it.

So my question is: How do the zBuffer and the getPixels() array relate when using oversampling?

Edit: This is what I get when using a 4->1 mapping.

(click to enlarge)
#9
Support / Re: Drawing with true alpha
March 04, 2014, 10:12:02 PM
Quote from: EgonOlsen on March 04, 2014, 10:03:09 PM
[...] no idea if that version works better or colors everything like a rainbow [...]

Haha, those are great alternatives =)
Everything seems to work fine now! Thank you very much!
#10
Support / Re: Drawing with true alpha
March 04, 2014, 09:42:07 PM
Thank you! Unfortunately it's still not correct. It appears that the pixels are first blended with the background and then the alpha transparency is applied.

If this is problematic to implement on your end I can always do two render passes with black and white and calculate the correct transparency and color myself.


(left with black background and right with white background, you can see the white pixels in the right image)
#11
Support / Re: Drawing with true alpha
March 04, 2014, 08:32:16 PM
I should have clarified: I'm using oversampling (FrameBuffer.SAMPLINGMODE_OGSS). So I'm expecting the edges where the background and the object are anti-aliased to blend smoothly. At the moment the transparency is either 1 or 0. I was hoping it would blend as 0 to 255.
#12
Here is what I'm using in my VoxelShop application (desktop software renderer) @ http://blackflux.com/node/11

    public static final float SIDE_VIEW_MIN_ZOOM = 10000f;
    public static final float SIDE_VIEW_MAX_ZOOM = 60000f;
    public static final float SIDE_VIEW_ZOOM_START = 20000f;
    public static final float SIDE_VIEW_ZOOM_FOV = 0.015f;

Should give you a good starting point.
#13
Support / Drawing with true alpha
March 04, 2014, 12:48:02 AM
I've tried:

        Config.useFramebufferWithAlpha = true;
        FrameBuffer fb = new FrameBuffer(getWidth(), getHeight(), FrameBuffer.SAMPLINGMODE_OGSS);
        fb.clear(new Color(255,255,255,0));
        world.renderScene(fb);
        world.draw(fb);
        fb.update();
        BufferedImage result = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
        fb.display(result.getGraphics());
        Config.useFramebufferWithAlpha = false;
        return result;


But the alpha value is only "1" or "0", so the edges don't appear smooth. Is there an easy way to fix this?
#14
Support / Re: Request: Array Textures
February 27, 2014, 01:57:36 AM
Gosh, I feel stupid. I totally misunderstood how they are working. Let me get back to you on that one... T_T
#15
Support / Request: Array Textures
February 26, 2014, 10:57:22 AM
Would it be possible to add support for array textures to the software/hardware renderer? To me it seems that this could be a relative easy thing to do (at least for the software renderer). However this depends on how things are currently implemented.

I know that the desktop renderer is not your most used engine, however my voxel editor would greatly benefit from such a thing. Thank you for considering!

http://www.opengl.org/wiki/Array_Texture