Hey Boris - this problem should be put onto a faq somewhere.

The problem stems from the fact that you aren't actually multitexturing in
this case, you want to create different material groups on the objects, and
there are three main ways to accomplish this -

(1) Uv tricks. Simply make a 256x256 texture and divide into quadrants. You
now have 4 128x128 textures to work with. Unwrap the mesh's uv's into a
suitable configuration and presto - different textures (or so it appears) on
the same object.

Problems: obviously, max texture resolution is much lower. filtering might
be wonky if the quadrants have dissimilar 'border' colors.
Upsides: Extremely memory efficient, no complicated vert sets.

(2) Two by-ref triangle objects sharing the same indice set but having
different vertex/texture/normal/color offsets and validVertexCounts. This
way you still have a full list of verts and normals for a single geometry
for bones purposes and such, but can also apply different appearances to the
two different by-ref shape sets.

Problems: much more complicated to set up than #1, you need to create a new
updater for the byref geometry.
Upsides: by-ref rules. very l33t.

(3) Create two non-by-ref shapes, and manually copy over data per-material
group.

Problems: maybe shading inconsistancies across the two shapes, but if the
normals are the same across the sharing edge, this shouldn't be a problem.
Memory consumption is potentially much higher for the big objects. Needs
more complicated middle-processing for bones support.
Upsides: quite possibly more efficient (vertex list creation and such) than
the previous option.


The largest parallel to what you are asking about is 3dsmax's multi/sub
object material. Eventually an exporter should be made that will export this
information into one of the above options. This feature will not be part of
my exporter's initial release. Possibly in the future.


>From: Boris <[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [JAVA3D] Multi-texturing problem
>Date: Wed, 17 Apr 2002 12:55:02 -0600
>
>Java3D Gurus,
>
>I have a challenging (as I see it) multitexturing problem at hand.
>Please, let me know how if it can be solved with current JAVA3D API
>
>Here is the problem. I have a Geometry object (in fact it is
>TriangularArray). I want to place one texture at one part of it and another
>texture at the other. Also, I would like to keep texture highlighting as
>well.
>
>Is it possible to do?
>
>Boris
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".




------------------------

Chris Forrester

http://www.geocities.com/Psionic81


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to