www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: qjvictor on December 06, 2006, 03:48:51 pm

Title: texture transparent problem
Post by: qjvictor on December 06, 2006, 03:48:51 pm
2 Objects, I will merge them into one object.
Can I make one object's texture transparent, while the other one is normal?
Thanks
Title: texture transparent problem
Post by: EgonOlsen on December 06, 2006, 03:56:35 pm
No. Transparency is object based. You have to use one object for the opaque parts and one for the transparent parts.
Title: texture transparent problem
Post by: Mizuki Takase on December 06, 2006, 08:54:04 pm
Making sure, instead of merging the two objects, I can simply just have the main Object3D call addChild(<transparent object>) right?
Title: does addChild work?
Post by: qjvictor on December 07, 2006, 05:41:19 pm
does addChild work?
I had a test, when using addChild, the child object is missing.

when the parent object is built, and added to the world, will  the child object be automatically built and added to the world?
And the same, if the parent object is translated to specific positions, will the child be translated?

And will child object remain the position information in 3ds file when it becomes a child of others?

So many questions,  :(
Title: texture transparent problem
Post by: Mizuki Takase on December 07, 2006, 09:49:18 pm
I always believed that addChild(Objcet3D) is supposed to be used for situations like you have described... I have no idea why your child object went missing...

Yes, whenever the parent gets modified, the child should inherit the translations as well. As quoted from the javadoc...
Quote
Defines an object as a child of this. A child object will inherit all transformations.


To tell the truth, I am not sure about all of the other questions that you have asked since I have not really tried it out before...
Title: texture transparent problem
Post by: EgonOlsen on December 12, 2006, 09:35:15 pm
Child inherit all transformations, i.e. translations, rotations, scaling. Everything else (adding them to the world etc.) is unaffected by the child-parent-relation. You have to do this as if the child wouldn't be a child.
Title: texture transparent problem
Post by: cyberkilla on December 12, 2006, 10:02:24 pm
I wonder, not meaning to highjack the thread;)...

What happens to childobjects if the parent is subjected to keyframe animation?
Title: texture transparent problem
Post by: EgonOlsen on December 12, 2006, 10:04:32 pm
Nothing. It doesn't affect the childs.
Title: texture transparent problem
Post by: cyberkilla on December 12, 2006, 10:15:42 pm
Danke. Now I know ill be making independent keyframes for each
item of clothing.

I am still going to suffer severely from Z-Fighting:)
No idea how I will avoid this.
Title: texture transparent problem
Post by: EgonOlsen on December 12, 2006, 10:18:22 pm
Do have a screenshot of this problem?
Title: texture transparent problem
Post by: cyberkilla on December 12, 2006, 10:21:59 pm
Quote from: "EgonOlsen"
Do have a screenshot of this problem?


I do not, but I will have one posted in the next few hours.

I am in awe of what you have created here;).