Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Xith3DTerrainTest and Textures  (Read 1306 times)
0 Members and 1 Guest are viewing this topic.
Offline wrightmf

Senior Newbie




Is that on the list?


« Posted 2004-01-05 18:02:26 »

Hello all.

Does anyone know offhand why Xith3DTerrainTest does not apply the stone.jpg texture correctly? At first, I just assumed it was something with my setup, but after looking at the screenshot of the demo on xith.org, it appears to be lacking texturing even in the screenshot.

I pawed through the source of it and noticed that it sets the path to "." and "..". I copied stone.jpg into a separate directory along with the Xith3DTerrainTest.java source file. Upon compiling and running, I get the same results as running it from the Xith3D package (and web start). The terrain looks great, but it lacks texture.

-M

Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #1 - Posted 2004-01-06 06:12:22 »

There is related topic

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1070469523, topic name "Texturing Terrain". I guess you'll find more info there.

Yuri

Yuri Vl. Gushchin
JProof Group
Offline wrightmf

Senior Newbie




Is that on the list?


« Reply #2 - Posted 2004-01-06 10:09:57 »

Grrrrrr....

I searched the forums for terrain texture and found nothing!  Angry

Thanks!

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline EBTTRT

Senior Newbie





« Reply #3 - Posted 2004-01-06 14:15:13 »

I started that particular link, but have moved on without finding a solution. Sad

The Demo does actually work - it just stretches the image across the entire terrain so you get no detail.  

What I need to work out is how to tile each triangle with an image just to get some detail.  I'm not experienced in graphics but I assume it would not be a good idea to try to put a huge detailed image over the huge terrain.

So tiling the triangles & then giving each a certain level of detail depending if they are in view, close or a long way away I think is the best way.
Offline wrightmf

Senior Newbie




Is that on the list?


« Reply #4 - Posted 2004-01-21 17:28:52 »

Quote
The Demo does actually work - it just stretches the image across the entire terrain so you get no detail.  

I'm not certain this is true. At least not on my workstation. I created a few much larger textures (2048, 4096, etc. ... this is on Radeon 9800 Pro) and tested them with the Xith3DTerrainTest class. The textures consist of a white square with various red lines splattered on it. None of them seem to load at all. I understand that the code should map a texture from 0,0 to 1,1 and cover the entire terrain. Initially, considering the small size of the stone.jpg texture, I believed that perhaps it was being applied but that the stretching was causing a perceived failure in the texture loading process. Now, however, I believe something else is going on. After loading these larger textures in, I still don't get any apparent texturing. I simply see terrain with a gradient from dark to light grey.

I have attached a screenshot of what I see. I'd love to see screenshots of the terrain test working with a texture applied. Does anyone have any shots of this working?




Offline EBTTRT

Senior Newbie





« Reply #5 - Posted 2004-01-23 11:27:44 »

Try a 1pixcel by 1pixcel image (say green) & you should see some colour on your terrain.  Then you should have a green terrain - but no detail of course.
This is how I assumed something strechy was taking place somehow.  This as far as I got.  
It's the triangles thing I was on about which needs solving to get good terrain like grass, stone, etc...  

In the demo if you switch to the line mode & see the triangles - these individually need texturing I think.

I'm probably not being much help, just adding moral support I hope!
Offline wrightmf

Senior Newbie




Is that on the list?


« Reply #6 - Posted 2004-01-23 12:03:13 »

Quote
Try a 1pixcel by 1pixcel image (say green) & you should see some colour on your terrain.  Then you should have a green terrain - but no detail of course.


Built a 1x1 green jpg and replaced texture call in Xith3DTerrainTest.java with the new image. Still nothing. See screenshot below.


Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (13 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!