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.


Messages - MichaelJPCT

Pages: 1 ... 4 5 [6] 7 8 ... 10
76
Support / trying to make fake shadow with RTT texture applied to a mesh
« on: August 20, 2016, 05:34:56 pm »
i am trying to make fake shadow. my approach is like this:
stick a transparent mesh on an object3D which should be a shadow receiver, but in fact the transparent mesh is the receiver;
render the shadow caster object into a texture and project the texture onto the transparent mesh;
the RTT should have alpha information - the part covered by shadow caster is opaque and black, other part is fully transparent.

now i wonder how to render into the alpha channel of RTT texture - i want to use openGL hardware framebuffer for the RTT task (faster) so the texture should be directly used in GPU (not downloaded for further process).
is setAsShadowMap() meant for this?

77
Support / Re: fog formula?
« on: August 19, 2016, 09:10:43 am »
i found the fixed function pipeline just uses linear fog. any other curve that i tried doesn't match in the render result.

78
Support / fog formula?
« on: August 18, 2016, 06:53:59 pm »
some parts of my scene are rendered with shader while some are not.
i need to know the formula of fog in GL's fixed function rendering and use it in shader so that all parts in the scene have the same fog effect.
i use these settings on the parts without shader:
setFogging(1);
setFoggingMode(1);
setFogParameter(100f,20000f, r,g,b)

79
Support / Re: get unloadTexture flag?
« on: August 17, 2016, 03:19:30 am »
because i have some large textures that i want to unload in a certain condition, and don't want them to be loaded accidentally.
i can write code like this:
if (Texture.isLoaded(frameBuffer)) TextureManager.unloadTexture(frameBuffer, texture);
but , i have other way : i can hide the object3d that has the texture, then the texture won't be loaded accidentally. so it's OK without knowing the flag.

80
Support / Re: get unloadTexture flag?
« on: August 16, 2016, 08:28:46 pm »
an unloaded texture is loaded again automatically when the object3d is rendered. this is not easily known by the  application, but the engine knows it , right?

81
Support / get unloadTexture flag?
« on: August 16, 2016, 05:46:43 pm »
i think it's good that TextureManager has a flag indicating whether a texture is loaded/unloaded, if one needs to strictly manage texture memory usage.

82
Support / Re: alpha channel in image file?
« on: August 14, 2016, 02:25:49 pm »
ok i found out i need to use a constructor of Texture() that has useAlpha parameter , it works now.

83
Support / alpha channel in image file?
« on: August 14, 2016, 02:12:20 pm »
i have a texture which is supposed to act like a mask - some part see through, some part masked - think of 1-bit alpha.
i tried with setTransparencyMode(0) , the result is close, but in JPCT i have to use black color for the see-through part, which doesn't work for me - i need the see-through part to be blue, because there is a little edge area of the texture still visible.
i tried to use image file with transparency information - transparent png and 32-bit TGA. the png transparency doesn't work and tga can't be loaded.
what else can i try?

84
Support / Re: is there Z-offset options?
« on: August 14, 2016, 01:56:31 pm »
i want Z-offset (or depth-offset) to help resolve 2 (nearly) co-planar polygons, one should be seen , the other should be hidden. although moving one of them a little closer can have effect, but with Z-offset the result can be better in some cases.

85
Support / is there Z-offset options?
« on: August 14, 2016, 01:07:17 pm »
i couldn't find any.

86
Feedback / Re: hotspot JVM garbage collection strategy?
« on: August 14, 2016, 12:51:08 pm »
i do have a dynamic sleep system, i haven't noticed gc slowdown yet - my current average CPU time is at about 30%, but i am afraid when the program gets more complicated and CPU time gets to 70% or more, gc may be noticeable.
and it can cause more trouble if i have multiplayer features - lost of data sync & prediction error. it's a far future for me though.
i have quad-core CPU, i hope the parallel gc is real good.
thanks anyway.

87
Support / Re: multiple coordinates for texture stages?
« on: August 14, 2016, 08:58:02 am »
great, it works correctly.

88
Feedback / hotspot JVM garbage collection strategy?
« on: August 14, 2016, 08:47:58 am »
in my JPCT app, i use constant framerate(30fps) by adding Thread.sleep at the end of each frame update. as long as the time needed for each frame update doesn't exceed 0.033333 sec, the app runs well.
but if a full gc is performed, a frame will be delayed, and i can't predict when a gc will be performed.
is there any gc mode that does gc "little by little" so every gc doesn't take longer than... say 0.015 sec ?
can gc be performed when my main thread sleeps?

89
Support / Re: multiple coordinates for texture stages?
« on: August 13, 2016, 05:46:51 am »
thanks. i've read about PolygonManager now.
i would like to know, after manipulating polygons, is the Object3D still compiled (rendered by GL as a batch)? what i concern about is the rendering performance.

90
Support / Re: Compressed Textures
« on: August 13, 2016, 05:43:20 am »
i couldn't find an option for compressed texture in JPCT, is it still not supported by now?

Pages: 1 ... 4 5 [6] 7 8 ... 10