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 - IZACIZAC

Pages: [1] 2
1
Projects / Re: Range Shooter 3D - my first game
« on: March 26, 2014, 10:53:10 pm »
that has a really nice look to it, love the farm

2
Support / Re: shadowhelper/projector help
« on: January 28, 2014, 01:11:32 am »
Alright, I'm just going to ignore the issue for now and decide what to do later. Thanks for your help

3
Support / Re: shadowhelper/projector help
« on: January 27, 2014, 09:28:15 pm »
: /  I can but it just means the shadow no longer looks right, warped depending on where I move the projector, or placed on the wrong side if I move the projector out of the model sideways. I guess I cant use shadows this way... Wanted it to be like my player was holding a lamp as he moved around

4
Support / Re: shadowhelper/projector help
« on: January 26, 2014, 11:56:53 pm »
I had commented out shadowHelper.drawScene() 

>.>. That sorted the dissapearing bit



My final problem is that it is casting a shadow in two areas. The box outlined in blue is the only caster, and the light is at the yellow dot. Why do I get a second shadow by the red question mark?

Here is a 2nd image without that 'player' box for clarification

5
Support / Re: shadowhelper/projector help
« on: January 26, 2014, 11:11:18 pm »
The light in this case does glow from within the player, but the player does not cast a shadow.


Light source is roughly where the red dot is, hovering above the ground. In this case, the grey box on the right of each picture is a caster, and the surrounding room is the reciever.
Left picture shows with shadows, its making the wall transparent. Right picture is without shadows.

I'm just confused I think, I don't know what the projector really does, and how I should set it up for this situation (if its even possible). Should my Projector instead be in the same position as the Camera?

6
Support / shadowhelper/projector help
« on: January 26, 2014, 09:29:50 pm »
I'm trying to use the shadowhelper and projector by following the advanced example on the wiki but can't get it right. Part of my models dissapears and part becomes invisible.

I have a cube (the player) that a light follows. - this is my only light source, ambient light is 0.

 Then I have 2 objects3Ds,
-the level that is rendered and is a reciever of shadows
-a large box (from primitives) that casts shadows



This is my code
Code: [Select]
        projector = new Projector();
        projector.setFOV(1.5f);
projector.setYFOV(1.5f);

        sh = new ShadowHelper(world, buffer, projector, 2048);
        sh.setCullingMode(false);
        sh.setAmbientLight(new Color(30, 30, 30));
        sh.setLightMode(true);
        //sh.setLightMode(false); neither makes any difference
        sh.setBorder(1);

        sh.addCaster(shadowbox);

        sh.addReceiver(level)

then

Code: [Select]
            projector.setPosition(player.getTransformedCenter());            //player is object3d that light follows
            projector.lookAt(level.getTransformedCenter());
            sh.updateShadowMap();

It sort of works on occasion, but parts of level are becoming transparent and looking bizzare. Am I doing something wrong with the code?

7
Projects / Re: Thinking about some RPG..Android version.
« on: January 22, 2014, 05:36:00 am »
that looks quality, he looks like he's about to pick those red berries from the bush

8
Support / Re: lighting problem
« on: January 21, 2014, 07:39:39 pm »
Oh I see, thanks. Importing then re-exporting from Blender gave it perfect normals

9
Support / lighting problem
« on: January 20, 2014, 11:12:09 pm »
Hi, I have a textured model and a light in my scene

Code: [Select]
level.compileAndStrip();
l = new Light(world);
l.setAttenuation(800);
l.setIntensity(200, 200, 200);

my light follows my camera
l.setPosition(camera.cam.getPosition());


I found though that because I was using one single poly for a huge wall, when I went near the center the wall lost all light, presumably because of how vertex lighting works, no light reached any of the corners.



So I split my wall into several individual peices (seperated by the beams running either way). attenuation is set to -1 in this screenshot. The result was fine for the middle parts, but the bottom and top row seem to be working the opposite way? Points nearest the camera, and so light source, are darkest?

(Also, does JPCT triangulate models when you load one in?)

10
Support / Re: Code snippet: Nicer buttons with 9-Patches
« on: December 31, 2013, 06:48:28 am »
Always wondered but never bothered to look it up, thanks Irony this looks very useful

11
Support / Re: How to use renderTarget?
« on: December 06, 2013, 07:00:05 pm »
I tested it and think I had the same issue. The texture that is blitted into the corner is not the same as the other full screen rendering, it is a slightly smaller field of view, missing some from the top and bottom.

Doing    buffer.setVirtualDimensions(800, 480);  //your screen width and height
seems to help solve this, though its still a tiny bit out

12
Support / Re: How to use renderTarget?
« on: December 05, 2013, 07:26:31 pm »
frameBuffer.blit(mTexture, 0, mTexture.getHeight(), 0, 0, mTexture.getWidth(), -mTexture.getHeight(), Display.getWidth()/4, Display.getHeight()/4, -1, false);

This will solve that problem. Also I changed to the blit method that instead scales the image you are blitting, because the previous version was cutting out some of what is shown on the screen (for me at least)

13
Support / Re: Importing OBJ from sketchup
« on: June 26, 2013, 04:55:49 am »
Nevermind I had inadvertently deleted .PNG from the names I added to the texture manager.. ignore me from now on ^^, thanks anyway

14
Support / Re: Importing OBJ from sketchup
« on: June 26, 2013, 01:45:30 am »
I am adding the texture to the manager with the exact same name, its just the models from sketchup that I cant get to display textured.  As a test I downloaded a bunch of free 3ds and obj textured models which all work with my code.

15
Support / Importing OBJ from sketchup
« on: June 25, 2013, 05:38:23 am »
Has anyone succesfully imported OBJ files from sketchup, if so, how?

My model (block) is initially completed gray, I think its a problem with the MTL file, I'm seeing

Code: [Select]
map_Kd block_Textures/Concrete_Aggregate_Smoke.PNG
block_Textures is a folder sketchup created, that I deleted as I load them from some other place. My textures are added to the texturemanager just as the png name, so

Code: [Select]
Texture named Concrete_Aggregate_Smoke.PNG added to TextureManager!
So I changed the line in the MTL file to

Code: [Select]
map_Kd Concrete_Aggregate_Smoke.PNG
But still its just grey. If I delete that line entirely though its draw in one solid colour, roughly the right colour but not a texture

The OBJ file contains

Code: [Select]
mtllib block.mtl
and

Code: [Select]
usemtl Concrete_Aggregate_Smoke
 Anyone know what I am doing wrong?




Pages: [1] 2