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

Pages: [1] 2
Support / Re: Rotations, I hate em! Help, please :)
« on: January 16, 2013, 04:33:24 pm »

Ok so here is a better example, the flaps on a plane.

If I design the plan so it is facing into X axis as shown in Blender.

I want to (in game) rotate the flaps around the red line labeled hinge line. This is not on a direct X, Y or Z axis.

How do I know what axis to rotate the flaps around?

Do I have to figure it out in Blender, and then do math on it when the object is moved around in the game world?

Support / Re: Rotations, I hate em! Help, please :)
« on: January 15, 2013, 04:26:13 pm »
So you are saying that when I MAKE the model before exporting, I have to align it along whatever axis I want it to rotate around?

If I want to rotate that cylinder like it is in the second picture, and that is how it was exported... I dont have a rotation matrix to save....

Does that make sense?

Support / Re: Rotations, I hate em! Help, please :)
« on: January 14, 2013, 11:02:40 pm »
I will do my best to try and explain my question:

When rotating an object, you can say rotateX or rotateaxis and give the axis.

Using rotateX rotates the object around the "world" x axis. If the object was originally made in a way that when you rotateX it rotates around the worlds X axis, then that is ok.

But what if that object is somehow randomly rotated in who knows what angle, and you still want to rotate it around the objects "x axis"?

Now I know I can do that by getXaxis. But it get's the original x axis of when it was loaded into jPCT correct?

I attached two pics.

1. So I want to rotate this cylinder around the  worlds x axis because that is how it happens to be aligned when it is loaded in, right? so that is easy. I know the axis rotate around, X!

2. This cylinder has been rotated at some random angle and exported. If I tried to rotate around X axis, it would rotate very funny and not like the other one. So somehow I need to get the angle of its "x axis" although this information does not exist anymore, if I am correct. I would need to know from Blender what this axis is somehow and give that information to jPCT wouldn't I? That means if I have some object in a game, lets say a truck.  I rotate it easily because I know I built it facing into the xaxis. But what if I rotate it around as it's driving etc, and the player saves the game. I guess I need to "set" its axis somehow?

Hopefully that made sense, would really appreciate some help with understanding this.


[attachment deleted by admin]

Support / Re: Smoke and dirt
« on: January 08, 2013, 04:52:19 pm »
Sounds good to me, they are doing pretty well!

Am I being stupid or what... I can't find the config for mipmapping?!?

Searching the forum I see people using this sometimes: Config.glMipmap = true; but I don't see that in the javadoc for Android.

Maybe Config.glTrilinear is what I want?

Support / Re: Smoke and dirt
« on: January 07, 2013, 10:00:12 pm »
What texture aliasing are you talking about?

I'll take a look at the color texture thing, thanks.

Support / Re: Getting started!?
« on: January 07, 2013, 06:03:53 pm »
Yes, you need to learn Java.

Bones is for animation stuff.

Look at some of the example projects, like Hello World.

Support / Re: Smoke and dirt
« on: January 07, 2013, 05:45:26 pm »

Got it working enough for me... and actually no moving parts, just changing transparency levels!

Hey, I have always wondered this... is there a way to change a materials color after it's been loaded in?

For example, if I make a truck and its main body color is "red" and the material name is "truck_body"... this gets loaded in and set when I load the 3DS file in with jPCT.

Is there a way to edit the color value of "truck_body" material from its default color of "red"?

Support / Re: Smoke and dirt
« on: December 29, 2012, 06:43:14 am »
I used some smoke blob I made, came from exhaust and went up and got larger. Tried using 100 particles but still looked cartoony. I don't understand how I would make it look thick and black at stack and then turn into a big rolling poofy cloud.

Do I need to use billboarding? I have different camera angles.

Thanks for the help!

Support / Smoke and dirt
« on: December 28, 2012, 06:17:44 pm »
Ok, I know this has been somewhat discussed before, but I'm really really wanting to figure this out.

I know that a "particle" system would be the easiest and most simple approach, and the only one discussed, but I have no idea how to generate the smoke I specifically need in that manner. I need thick black exhaust smoke, and LOTS of it!


I've used a particle system before trying this, but it just looks pretty cartoony with puffs of smoke coming up, and I used hundreds.

Any ideas? And any ideas about making dirt from the tires spinning come out?


Bugs / Re: HelloShader crashed error
« on: December 07, 2012, 04:56:04 pm »
Are you trying to run this from an emulator?

Support / Re: Overlapping overlays, using!?
« on: November 27, 2012, 08:44:12 pm »
I thought I'd inform you of what I have gotten to work, seemingly perfectly...

Code: [Select]
overlay_world = new World();

TextureManager.getInstance().addTexture("rpm_gauge", new Texture(res.openRawResource(R.raw.rpm_gauge_128), true));
rpm_gauge = new Overlay(overlay_world, 0, 0, 128, 128, "rpm_gauge");
TextureManager.getInstance().addTexture("rpm_gauge_needle", new Texture(res.openRawResource(R.raw.rpm_gauge_needle_128), true));
rpm_gauge_needle = new Overlay(overlay_world, 0, 0, 128, 128, "rpm_gauge_needle");

sb.render(world, fb);

The little snippet at bottom that goes into the ondraw is what made it work (specifically the fb.clearZBufferOnly(); before drawing the overlay_world)

This what you expected?

Support / Re: Rotations, I hate em! Help, please :)
« on: November 27, 2012, 08:40:10 pm »
That's... ingenious!!!  ;)

Thanks  ;D

Support / Re: Rotations, I hate em! Help, please :)
« on: November 27, 2012, 07:33:39 pm »
Is there no way to set an object's position? Do I have to use translate?

I was hoping I could do something like: smoke.setPosition(smoke_pipe.getTransformedCenter());

But that doesn't exist. So I will have to do some math to figure out where I need to translate it to?

Code: [Select]
smoke[i].translate(smoke_pipe.getTransformedCenter().x-smoke[i].getTransformedCenter().x, smoke_pipe.getTransformedCenter().y-smoke[i].getTransformedCenter().y, smoke_pipe.getTransformedCenter().z-smoke[i].getTransformedCenter().z);

That seems to have done the trick, sweet! I'll have to use these dummy objects more often... I still wish there was a way to just set the position to a vector, and not have to calculate the translation myself. No big deal if that is what has to be done... but is there a set position command?

Thanks as always!

Support / Rotations, I hate em! Help, please :)
« on: November 27, 2012, 03:18:57 am »
Ok, I have created my little smoke particle creator code, it's working decent enough... basically while the vehicle is at origin I set the smoke (a texture on x number of planes) to come out of where the exhaust is on top of tractor, works great. I can make it move with the tractor in a straight line easy enough, but getting it to rotate as the tractor rotates is the hard part... To make the tractor drive in the direction of its rotated angle, here is my code:

Code: [Select]
move_vector = vehicle.getXAxis();
move_vector.x = move_vector.x * delta_x;
move_vector.y = 0;
move_vector.z = move_vector.z * delta_x;

The wheels and tractor are imported together but are two objects. The tractors pivot point is the wheels original pivot point. (Does this pivot point translate as the wheels move by the way?)
Code: [Select]
for(int ii=1; ii<max_smoke; ii++) {

That moves the smoke well enough that it's moving down the track with the tractor, however it's not being rotated to stay right over the exhaust pipe of tractor. I simply rotate the tractor with rotateY when I am rotating. With not changing the smokes pivot point, it just rotates around its own center of course, which doesnt help. Setting it's pivot point to the wheels makes it go crazy even when not trying to rotate it... so I am at a lost as to how to keep it right over the exhaust.

I wish there was a way to set something to the relative coordinates of the object, and not global world. There's not an easy way to do something like that is there? To always set it's position to be at a certain position on the tractor?

Thanks for any help! :)

Support / Re: Overlapping overlays, using!?
« on: November 21, 2012, 11:48:19 pm »
Well what do you know, I was... I will try out the zsorting now.

Another question, it seems like the colors I choose in Blender almost never come out looking that way in the game. My orange is basically red... I have a single light (sun) at 255,255,255 about 50 units above origin... any suggestions?

Pages: [1] 2