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

Topics - aZen

#1
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?
#2
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)
#3
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?
#4
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
#5
Support / Texture Limit
February 19, 2014, 05:56:25 PM
Is there a maximum number of textures that one can have? I'm investigating some issues and want to get the easy-to-check things out of the way first =)
#6
Support / Rapid Texture loading/unloading
February 10, 2014, 12:14:51 PM
So, I have a problem when rapidly loading and unloading textures in a multithreaded environment with several viewports, worlds, etc

In particular the problem occurs when unloading a texture, then immediately loading it again (same image and name) and creating an object that uses the texture (all without redraw). The texture then appears without the texture and is colored in the setAdditionalColor(...) color. I suspect that the texture doesn't get unloaded from the FrameBuffer. However when I add another object with the same texture "a little bit later" (after redraw), it is textured fine.

I tried to create a simple test case, but no luck. The workaround I have now is that I use

        if (textureManager.containsTexture(name)) {
            textureManager.replaceTexture(name, texture);
        } else {
            textureManager.addTexture(name, texture);
            textureManager.replaceTexture(name, texture);
        }


Will this cause a lot of extra load? How bad practice is this?

Thank you!
#7
Support / Texture Memory Usage
February 09, 2014, 07:02:27 AM
Is there an easy way to determine the texture memory usage in the software renderer? Trying to optimize textures and the would be quite helpful.
#8
Support / Rendering Quality
January 27, 2014, 10:23:46 PM
Is there a way to create a frame buffer that allows for rendering with different sampling modes (quality)? Or do I have to create two instances (seems like it's redundant, memory wise)?

I would like to be able to render with low quality when frame rate is important and with high quality when quality is. Would that be possible to implement it?
#9
Support / Triangle Count
December 11, 2013, 11:38:47 PM
Is there an easy way to access how many triangles were rendered in the previous frame (software renderer)?

I'd like to use it for my dynamic optimization algorithm (it's actually only an idea right now).

Thanks!
#10
Support / Polyline
December 09, 2013, 10:32:32 PM
I'm trying to add a Polyline to the world. However it is never rendered. Does it not work with the software renderer? Or am I missing something obvious?

Polyline polyline = new Polyline(triangle, Color.BLACK);
polyline.setWidth(2f);
addPolyline(polyline);


...is the code that I'm using.

Thank you!
#11
Support / Texture Interpolation Request
December 09, 2013, 02:58:58 PM
So when you use a texture and the uv position is right on the edge (when at least one position is zero or one), the outside of the texture is interpolated with black. That results in black pixels "on the edge" which looks awful. I was wondering if you could make an option so that the border color of the texture is used for interpolation (instead of black). E.g. the arbitrary point (-5,-7) would be interpolated with (0,0) of the texture and so on.

I'm not sure if this would be easy for you to implement, but it seems like something that should be done "on your side". Alternative I could "frame" the textures before adding them.

Please let me know!
#12
Support / Texture Access
December 09, 2013, 12:25:05 PM
I'm dealing with a lot of textures that are changing rapidly. I'm wondering if it would be possible (or even make sense) to give access to the underlying pixel data of the texture.

Would it make sense to change the pixel data directly opposed to creating a new texture (I'm using the software renderer)? Would the change be visible if the texture is already loaded or would I need to reload it?

Goal is to have less memory allocation. I'm assuming that the underlying pixel data of the image that is used to instantiate the texture is duplicated into the texture. Is that correct or is a reference used?

Thank you!
#13
Feedback / Tapatalk
December 05, 2013, 01:02:23 PM
Would you mind registering the forum with tapatalk? Would make things much easier for me (and probably others)!

Thank you!
#14
Projects / VoxelShop - voxel editor
November 11, 2013, 06:01:18 PM
This project relies on JPCT on a large scale and I'm very grateful for it!

>> VoxelShop - a voxel editor with animation support



This currently uses the software renderer and I'm still planning to change that.

Please consider using the Blackflux forum if you want to give feedback. I will probably not be able to check this thread regularly in the future.

Regards,
flux
#15
Support / Performance Questions
May 18, 2013, 07:00:38 PM
Two questions:

A) Would it be possible to render only certain parts of the whole FrameBuffer in software mode? I'm updating only certain, well defined areas and would like to avoid re-rendering everything every time I do an update. I've already experimented with moving the camera, but that is extremely tricky to get right.

B) Hit testing is a performance problem for me at a certain point (when I have a lot of objects). I'm assuming you're using some kind of index for all the triangles and then doing a hit-test with the ray? I'm using http://www.jpct.net/doc/com/threed/jpct/World.html#calcMinDistanceAndObject3D%28com.threed.jpct.SimpleVector,%20com.threed.jpct.SimpleVector,%20float%29. Would it be possible/helpful to support this function with a set of possible objects or an area (using my own index)?

Thank you!
#16
Support / Flat Shading + Culling = Black
May 16, 2013, 12:57:06 PM
When I use

object3D.setAdditionalColor(SOME_COLOR);
object3D.setShadingMode(Object3D.SHADING_FAKED_FLAT);
object3D.setTransparency(0);
object3D.setCulling(false);


in software mode, everything is rendered transparent, but just black. Is this something that could be fixed without too much effort?

Thank you,
aZen

Edit: Edited the title to reflect the problem better.
#17
Support / Multithreading Freezes Program
May 01, 2013, 08:35:43 PM
Hello EgonOlsen,

I'm having a strange problem: When I set useMultipleThreads = true I can run the application fine on my virtual machine (win 7, 32 bit). However when I start it on a non virtual os (win 7, 64 bit) the application simply freezes (tested on two different computers).

With useMultipleThreads = false there is no problem at all. Could this be a problem with 64 bit os? I'm using the latest jpct built (http://jpct.de/download/beta/jpct.jar).

Thanks you,
aZen
#18
Support / Visible Objects
February 08, 2013, 07:09:44 PM
Is there an efficient way to get all visible objects (or all objects rendered in last frame)? I tried using world.getVisibilityList(), but did not understand how to access the VisList object.

Thanks for your help!
aZen
#19
Bones / Animation Editor
November 06, 2012, 05:41:21 PM
Hey there!

I have to admit I'm a bit lost right now, so I'm hoping for some awesome advice!

Here is my situation: I've written a 3D modelling program in JPCT (works really great) and I want to use bone animation to animate the objects that are modeled. The user can already set the initial bone frame of the object and then define key-frames that lead to animations. This is in theory, because I have no idea how to link the "bones" to the actual objects in the world.

What I have right now:
1) Plenty of objects in the world
2) Connected lines that are the bones
3) Different frames for these "bones"

How do I link all the objects in the world to those "bones" (they're just a list of dots and connections right now) and animate them?

Don't get me wrong, I'm not looking for a full fledged solution. Just want a starting point. I browsed through the samples, but couldn't find what I needed.

Thank you very much,
aZen
#20
Support / Getting rid of System.out.println()
September 01, 2012, 10:32:58 AM
Hello everyone!

When I start JPCT it starts printing to the java console, e.g.:

Java version is: 1.6.0_33
-> support for BufferedImage
Version helper for 1.5+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized


How do I get rid of these messages? I looked around in the world object and the config, but was not able to find anything.

Cheers,
aZen