Googe for “texture splatting” and I think you’ll find what you are looking for. It’s a common way of doing terrain texturing wich rely heavily on multi-texturing and/or multipass rendering.
EDIT: Actually, that’s not what I need either. I’m not trying to mix the textures, I’m trying to have one overlap on the other. I’ll have to go with the extra polys solution.
Tried the extra polys solution with very… mixed results. Technically it’s working, Java just handles the display terribly. Problems with transparency blending again. I’ll post about them on the other thread.
For using screenScale, are you specifying View#setScreenScalePolicy( View.SCREEN_EXPLICIT ) ? If not, try it. As an alternative to screenScale or scaling the ViewWorld, you could also try using a scaling on the ViewPlatform Transform.
[quote]For using screenScale, are you specifying View#setScreenScalePolicy( View.SCREEN_EXPLICIT ) ? If not, try it. As an alternative to screenScale or scaling the ViewWorld, you could also try using a scaling on the ViewPlatform Transform.
[/quote]
Good idea. I’ve used SCALE_EXPLICIT (I think) with some success, but I’m going to give the TransformGroup option a shot.
One more question. Is there any simple way to synchronise my Geometry updates with the main rendering loop within the Canvas3D? The preRender(), postRender() etc. methods won’t allow me to do this, and pure immediate-mode rendering is probably more hassle than I need right now.
Also, an exact explanation of how to convert from screen x/y coordinates to their equivalents in 3d space (assuming fixed depth and a straightforward axial projection.) I’ve tried fiddling about with physicalScreenWidth in Screen3D but can’t seem to get the exact numbers I need. Also, clipping distances seem to alter when I resize the screen.
Correction- I seem to have fixed the screen coordinates problem. I suppose the issue of update synchronisation isn’t vital at least until I can port to Xith.
Yes
Put your stuff you want frame synched ina beahvior witha a wakeup condition of WakeOnFrame(0).
You cna look at JNWN for an example, this is how all my behaviors run.
A silly question, more out of curiosity. Why do you feel a need to move to Xith?
JK
Oops, sorry, been a little hectic.
[quote]Put your stuff you want frame synched ina beahvior witha a wakeup condition of WakeOnFrame(0).
[/quote]
Good idea. I’ll try that out. The only problem I’ve had with this is that, for some reason, it’s caused me occasional trouble with referenced Geometry…
[quote]A silly question, more out of curiosity. Why do you feel a need to move to Xith?
[/quote]
I was originally planning to insert my code into an applet, but due to the scarcity of users with j3d installed, I’ve settled on using java webstart and trying to keep my code slim and beautiful as an adjunct to distribution. 5-10 megs versus 500k, no contest. Also, not having to deal with extraneous doubles, explicit access permissions or excess threading beaurocracy has a distinct appeal. Plus, it supports shadow-casting, and being open-source, I can hack it according to my needs, and fulfil all those eye-candy ambitions we discussed before. (Theoretically, you can do the same thing with j3d, but they haven’t released the OSX source.) It also seems to directly support various forms of terrain rendering and UI display, which I’m having to code myself at the moment. Anyways, cheers.