instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 25, 2018, 07:24:16 am


Login with username, password and session length


Pages: [1] 2
  Print  
Author Topic: multitexture  (Read 10773 times)
danka00
Newbie
*
Posts: 13


View Profile
« on: September 04, 2009, 01:32:28 pm »

I'm creating a VR of an ancient church , I've created the model with diffuse map and a bump map in X3d (with multi texture), on other players such as XJ3d and Vivaty it works, on instant player i can see only the effect of bumpmaps but my diffuse map doesn't seem to work, it appears as a flat color with a bump effect on it.
I need instant player cause I like it very much and I'd like to create  STEREOMODEL.
Hope you can help, thank you very much.

Logged
mzoellner
Jr. Member
**
Posts: 85


View Profile
« Reply #1 on: September 05, 2009, 08:15:08 pm »

Would you please post a short example of your MultiTexture?
Logged
danka00
Newbie
*
Posts: 13


View Profile
« Reply #2 on: September 06, 2009, 11:20:13 am »

OK, here's an example for a simple box with a difuse and a bump map on it.

<Shape DEF='Box1'
  containerField='children'>
  <Appearance
   containerField='appearance'>
   <MultiTexture
    containerField='texture'
    mode='
     "DOTPRODUCT3"
     "MODULATE"' '>
    <ImageTexture
     containerField='texture'

thank you.
     url='
      "muretti_lato_bumpmap.jpg"' ' />
    <ImageTexture
     containerField='texture'
     url='
      "Muretti_lato.jpg"' '/>
   </MultiTexture>
Logged
danka00
Newbie
*
Posts: 13


View Profile
« Reply #3 on: September 06, 2009, 11:34:06 am »

Here are two pictures, one shows
visualization on Instant player, the other pic
as the example runs on other players.
Thanks again.
Logged
pdaehne
Administrator
Sr. Member
*****
Posts: 250


View Profile
« Reply #4 on: September 06, 2009, 04:33:48 pm »

You have to specify texture coordinates for all textures (using "MultiTextureCoordinate" nodes). That's a known bug in InstantPlayer.

Patrick
Logged
danka00
Newbie
*
Posts: 13


View Profile
« Reply #5 on: September 07, 2009, 01:35:30 pm »

ok, thanks. I've just another question at this point, i wrote my code as you can see here(this an exaple for a triangle of my model with multitexture,to make thing simpler i've removed the values and left only the nodes), what I have to do now?  Can I just substitute the word 'TextureCoordinate' with MultiTextureCoordinate' in the node and keep all values as  they are?.
Thank you again very very much!!.

<Shape
  containerField='children'>
  <Appearance
   containerField='appearance'>
   <MultiTexture
    containerField='texture'
    mode='
     "DOTPRODUCT3"
     "MODULATE"'>
    <ImageTexture
     containerField='texture'
     url='
      "../texture/mytexture_bump.jpg"'/>
    <ImageTexture
     containerField='texture'
     url='
      "mytexture.jpg"'/>
   </MultiTexture>
   <Material DEF='mat'
    containerField='material'
    ambientIntensity='1.000'
    shininess='0.145'
    diffuseColor='1 1 1'/>
  </Appearance>
  <IndexedFaceSet DEF='Object-FACES'
   containerField='geometry'
   solid='false'
   creaseAngle='0.524'
   coordIndex='
     0 1 2 -1'
   texCoordIndex='
     989 1003 1004 -1'>
   <Coordinate DEF='Object-COORD'
    containerField='coord'
    point=''/>
   <TextureCoordinate DEF='Object-TEXCOORD'
    containerField='texCoord'
    point=' '/>
  </IndexedFaceSet>
 </Shape>

Logged
pdaehne
Administrator
Sr. Member
*****
Posts: 250


View Profile
« Reply #6 on: September 07, 2009, 02:33:17 pm »

You use a MultiTextureCoordinate node instead of the TextureCoordinate node and put one TextureCoordinate node for each texture into the MultiTextureCoordinate node:

Code:
<MultiTextureCoordinate containerField='texCoord'>
    <TextureCoordinate containerField='texCoord' point='... '/>
    <TextureCoordinate containerField='texCoord' point=' ...'/>
</MultiTextureCoordinate>

(Do not try to reuse the TextureCoordinate node by using DEF/USE, that also does not work in Instant Player, you have to repeat the TextureCoordinate node, even if it contains the same coordinates.)
« Last Edit: September 08, 2009, 09:40:22 am by pdaehne » Logged
danka00
Newbie
*
Posts: 13


View Profile
« Reply #7 on: September 08, 2009, 12:22:48 am »

I tried to modify my code but something was wrong I think, so I attach a screenshot of the errorlog of the console and a short copy of my example code, so that if you want you can see directly where's the problem.
THANK YOU AGAIN FOR YOUR PATIENCE!!!!
Logged
pdaehne
Administrator
Sr. Member
*****
Posts: 250


View Profile
« Reply #8 on: September 08, 2009, 09:41:06 am »

In line 4966, replace

Code:
<MultiTextureCoordinate/>

by

Code:
</MultiTextureCoordinate>

(Sorry, my example was wrong. I've fixed it in the example above.)
Logged
danka00
Newbie
*
Posts: 13


View Profile
« Reply #9 on: September 08, 2009, 12:51:01 pm »

Oh! I must remember not to work in the late night it was so evident, but...it doesn't work yet,...mmmm now it shows this errorlog!
I have no words. Thank you very much!
Logged
pdaehne
Administrator
Sr. Member
*****
Posts: 250


View Profile
« Reply #10 on: September 08, 2009, 12:55:35 pm »

You can ignore these messages. They're wrong.

When it still does not work, please post the full example (WRL+Textures) to this forum. You can attach small files to your posts in this forum.
« Last Edit: September 08, 2009, 12:57:42 pm by pdaehne » Logged
danka00
Newbie
*
Posts: 13


View Profile
« Reply #11 on: September 08, 2009, 08:43:26 pm »

Ok, here's my file with texture, it's not the full model but only a part of it, it would too big to post the complete version. (if this portion works than i can use this tecniques for the rest of themodel i think) I enclose also another version of the file (filename: without multitexture.x3d) to see how the result is without multitexture, only with diffuse map. The problem is that the file runs but it' all black, as if there was no geometry in the model.
Thank you.

Logged
danka00
Newbie
*
Posts: 13


View Profile
« Reply #12 on: September 08, 2009, 08:44:37 pm »

The files..
Logged
danka00
Newbie
*
Posts: 13


View Profile
« Reply #13 on: September 08, 2009, 08:45:14 pm »

Textures..
Logged
pdaehne
Administrator
Sr. Member
*****
Posts: 250


View Profile
« Reply #14 on: September 09, 2009, 11:50:49 am »

It's all black because you do not have coordinates anymore. You did not duplicate your TextureCoordinate node and put it into a MultiTextureCoordinate node, instead you renamed your Coordinate node to TextureCoordinate. (Don't work late at night  Smiley)

A fixed version is attached to this post. I've checked it with Xj3D and Octaga, and the result looked the same as with Instant Player.

Bye,

Patrick
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines