Skip to main content

>100 textures on one polygon?

3 replies [Last post]
wgj000
Offline
Joined: 2005-02-24

I was wondering if there was a way to stick many (100 or so) textures on to a single polygon.

I tried with multitexturing only find out after I got it all working that I was limited to 8 TextureUnitStates on my video card. :-( It's unfortunate because that's exactly the kind of functionality that I want. Is there another way to stick many textures on a single polygon?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Alessandro Borges

very uncommon use of textures...
Did you think about replace the textures at runtime ?

java3d-interest@javadesktop.org escreveu: I was wondering if there was a way to stick many (100 or so) textures on to a single polygon.

I tried with multitexturing only find out after I got it all working that I was limited to 8 TextureUnitStates on my video card. :-( It's unfortunate because that's exactly the kind of functionality that I want. Is there another way to stick many textures on a single polygon?
[Message sent by forum member 'wgj000' (wgj000)]

http://forums.java.net/jive/thread.jspa?messageID=142102

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
[att1.html]

wgj000
Offline
Joined: 2005-02-24

I'm not sure what exactly you mean by replacing the textures at runtime.

There are some twists to what I want to do. The locations and sizes of the images are not know ahead of time. The images may or may not overlap.

I could stick all the images into one big image and then texture that onto the polygon. I would rather not do this because there could be a lot of empty space between the images taking up a lot of bytes.

Or I could break the polygon up in fragments and stick one image on each polygon fragment. I would really rather not do this as I might have to resample the polygon to make the polygon fragments line up with each image. Maybe not though. It depends on if I want to cover the polygons exactly. There would also be problems with overlapping polygons and contention for who gets displayed.

Alessandro Borges

>I'm not sure what exactly you mean by replacing the textures at runtime

Set a new texture to your TextureUnitState array, reassign Appearance instance to your shape3d.(This last step is needed to update appearance)
You can also get texture's ImageComponent2D and use setSubImage() to change part or all texture.
Read the javadocs and set proper capability bits.

Just tips, maybe it can help you.

---------------------------------
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!
[att1.html]