Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 11:34 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Tue Oct 21, 2008 1:03 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Sorry guys!
Since the textures of the cal3D models were showing wrong after the tga patching I have done a few test and here is the final one.
I asked a friend of mine to do a 1024x512 TGA directly from PSD (with default options).
I tested it "as is" and then I tried with compressed and inverted gimp options.
I=inverted flag in gimp
C=compressed flag in gimp

    Type( flags detected during texture load)
    PSD direct ( 0 0 0 0 0 )
    - - ( 0 0 0 0 1 )
    - I ( 0 0 0 0 0 )
    C - ( 0 0 0 0 1 )
    C I ( 0 0 0 0 0 )
Problem is... in all those combinations the texture are ALWAYS UPSIDE UP. So the invert flag is ignored.
Am I missing something about this new behavior, or there is a real bug?


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 1:06 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Confirmed, there is a problem :?
I have done this patch: http://pastebin.com/f3122a7f0
When a TGA is oposite-to-raydium origin then it (really) flips the image during load.
Can you check this?
For testing I recommend custom created TGAs and external to raydium TGAs. In fact I noticed this with models textures. A few ones were OK and another fews were wrong.
Now all works.


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 11:28 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
This morning I have created a skybox directly from blender and I can confirm the UV of the skybox renderer is flipped in raydium :(
I'm waiting for ST reports about this matter with his applications.


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 11:58 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Meanwhile, a patch for sky:
http://pastebin.com/f16e391f5
Looks like all is ok now.

Update:
I have tested raydium skybox, ST skyboxes, custom skyboxes, sprite apps, anim apps, maniadrive, a custom texture viewer with raydium and externals textures and photoshop and gimp and blender generated TGAs. And now all are OK.
More things to test?


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 2:27 pm 
Offline

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
On IRC vicente wrote:
Can you tell me if you had to flip your sky textures to fit raydium-rules? I'm testing them and all are flipped.
I assume you are talking about the "original" sky box packages posted here and not about the (now modified) sky boxes on the repository.
Before the Targa improvements I'd to save the images without RLE compression and with origin bottom left. I've rechecked this using an older revision ("svn up -r 780") to bring back my memories. Else wise the sky box textures were all flipped.
My answer to your question is then: Yes, I can tell you that I didn't had to flip the sky box textures to fit the Raydium rules, because it's the default setting in The GIMP, except the RLE compression option, which is activated by default.

vicente wrote:
I'm waiting for ST reports about this matter with his applications.
All looks the same like before the Targa improvements. My observation is that the tested demos (test6, anim, volcano, ...) all look the same with Raydium revision R801, also without the needed repository update posted in the news entry, I don't have updated to the new repository files yet.
With the current Raydium revision R801 the sky boxes look alright without any update or modification (They were saved using The GIMP without RLE compression and origin bottom left as written above). But the sky boxes look also alright with or without RLE compression, origin bottom left or top left.

Summary: My observation is that the Targa improvements a) autodetect the origin or b) ignore the origin option within the TGA files and that the textures render the same way. I've also posted a question on the news entry related thread about which TGA settings are valid for all Raydium sections globally and how to export the Targa correctly for Raydium using The GIMP.
Now an additional question to the "How to save Raydium ready TGA files?" question: How to say Raydium that I want to flip the texture since it cannot be done within the TGA file?


Last edited by st on Wed Oct 22, 2008 2:36 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 2:36 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
Well, you should apply my patch before doing those tests :) The current svn code is ignoring the flipping of the image, specially shown using external files.


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 2:51 pm 
Offline

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
vicente wrote:
Well, you should apply my patch before doing those tests :) The current svn code is ignoring the flipping of the image, specially shown using external files.
Which patch do you mean exactly? Sky or texture, or perhaps both patches, since you say only patch? And what textures are you currently using? The (now modified) ones from the repository? I need a bit more input about what to test, which revision, files... :mrgreen:

I'm a bit confused about TGA flipping behavior. Looks all the same, I don't have to check the save settings under The GIMP, wonderful! :lol: Everything looks ok for me, whatever I use the a revision before or after the Targa improvements.


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 3:15 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
st wrote:
or perhaps both patch[i][b][u]es
Sorry, yes, both of them ;)
For testing you can do one image and save it (4 times) with the next options in gimp:
compressed and inverted
compressed and non-inverted
non-compressed and inverted
non-compressed and non-inverted

Common sense say that 2 of them should be upside-down, right? That's the test.
By the way, the compression should work 100% since a previous Ouille commit.


Quote:
I'm a bit confused about TGA flipping behavior. Looks all the same, I don't have to check the save settings under The GIMP, wonderful! :lol: Everything looks ok for me, whatever I use the a revision before or after the Targa improvements.

That's exactly the problem. Raydium is ignoring the flip flag so it is always upside up (but that's a bad behavior).


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 3:33 pm 
Offline

Joined: Tue Jul 08, 2008 2:37 am
Posts: 181
Thanks for the explanations, I also have re-read the whole thread. Seems I've double checked your initial tests. ;)
Your patches were applied locally and everything went as expected. Thank you very much!
Targa RLE compression works also very fine, thanks to ouille! :D


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 4:23 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

I'll try to come on irc tonight to make a point.

Ok ?

Have a nice day.
Ouille


Top
 Profile  
 
PostPosted: Wed Oct 22, 2008 4:55 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
fine


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group