Logo by DsyneGrafix - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. March 28, 2024, 08:54:46 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Failed to load texture  (Read 3675 times)
0 Members and 1 Guest are viewing this topic.
cyberxaos
Forums Newbie
*
Posts: 4



WWW
« on: November 18, 2012, 09:25:48 PM »

Can someone please help me understand why Fragmentarium is not running the Textures.frag tutorial example?  I am getting the following in the log:

Parse: /Applications/Fragmentarium/Examples/Tutorials/04 - Textures.frag
Including file: /Applications/Fragmentarium/Examples/Include/2D.frag
Added texture: texture -> /Applications/Fragmentarium/Examples/Include/texture2.jpg
Setting texture to: /Applications/Fragmentarium/Examples/Include/texture2.jpg
Failed to load texture: /Applications/Fragmentarium/Examples/Include/texture2.jpg
Compiled script in 21 ms.
Found 'default' index. Executing...

...and then I get a black render area, of course.  Any *.frag files that use textures fail to load them, in this manner, even though the texture files are present at the specified path.

I understand the Textures.frag src is based on http://www.iquilezles.org/apps/shadertoy/?p=tunnel which runs just fine on my system. 
Logged
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #1 on: November 18, 2012, 11:28:25 PM »

What happens if you choose another image file by using the filechooser (the [...] button)  for 'texture' in the 'MySystem' tab?
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #2 on: November 19, 2012, 12:08:28 AM »

I had to reload textures THEN do a rebuild.  The example didn't work way to great for me- I ended up writing my own script based off of something else you (Mikael) did to put the images onto a fractal....  and used rotations to spin them around.

Code:
//PARTIAL CODE!!!


#group Rotations
//  Spokes number
uniform float Spokes; slider[-4,3,20]

uniform vec3 RotVector1; slider[(0,0,0),(1,1,1),(1,1,1)]
uniform float RotAngle1; slider[0.00,0,360]

mat3 rot1= rotationMatrix3(normalize(RotVector1), RotAngle1);

uniform vec3 RotVector2; slider[(0,0,0),(1,1,1),(1,1,1)]
uniform float RotAngle2; slider[0.00,0,360]

mat3 rot2= rotationMatrix3(normalize(RotVector2), RotAngle2);

uniform vec3 RotVector3; slider[(0,0,0),(1,1,1),(1,1,1)]
uniform float RotAngle3; slider[0.00,0,360]

uniform float time;
uniform float TimeStep; slider[-1.00,1,2.00]

mat3 rot3= rotationMatrix3(normalize(RotVector3), RotAngle3+time*TimeStep*.1);
//mat3 rot3;
uniform vec3 RotVector4; slider[(0,0,0),(1,1,1),(1,1,1)]
uniform float RotAngle4; slider[0.00,0,360]

mat3 rot4= rotationMatrix3(normalize(RotVector4), RotAngle4);

uniform sampler2D tex; file[quart.jpg]
uniform float TextureIter; slider[.1,5,100]

vec3 cycle(vec3 c, float s) {
return vec3(0.5)+0.5*vec3(cos(s*Cycles+c.x),cos(s*Cycles+c.y),cos(s*Cycles+c.z));
//return vec3  (texture2D(tex, c.yz)*orbitTrap.x*s*Cycles
  //  + texture2D(tex,c.xz)*orbitTrap.y*s*Cycles
   // + texture2D(tex, c.xy)*orbitTrap.z*s*Cycles);
}

vec3 color(vec3 p) {
orbitTrap = vec4(1.0);
vec3 position=p;
inside(p);

orbitTrap.w = sqrt(orbitTrap.w);
vec3 orbitColor;
if (CycleColors) { //  DOES NOT CYCLE!!!  USED AS A BOOLEAN SWITCH
//orbitColor = cycle(X.xyz,orbitTrap.x)*X.w*orbitTrap.x +
p=(p)*rot3*(rot4)*(TextureIter*length(orbitTrap));    // * abs(orbitTrap)
orbitColor = texture2D(tex, p.yz)*(X.w+AOStrength*.25)
    + texture2D(tex, p.xz)*(Y.w+AOStrength*.25)
    + texture2D(tex, p.xy)*(Z.w+AOStrength*.25);
} else {

p=(p+position)*rot3*(rot4)*(TextureIter*length(orbitTrap));    // * abs(orbitTrap)
orbitColor = texture2D(tex, p.yz)*(X.w+AOStrength*.25)
    + texture2D(tex, p.xz)*(Y.w+AOStrength*.25)
    + texture2D(tex, p.xy)*(Z.w+AOStrength*.25);
}




return orbitColor;

}


Logged

cyberxaos
Forums Newbie
*
Posts: 4



WWW
« Reply #3 on: November 19, 2012, 02:35:18 PM »

What happens if you choose another image file by using the filechooser (the [...] button)  for 'texture' in the 'MySystem' tab?

Nothing, even if I rebuild.  Same error message with the new filename.
« Last Edit: November 19, 2012, 02:39:25 PM by cyberxaos » Logged
visual.bermarte
Fractal Fertilizer
*****
Posts: 355



« Reply #4 on: November 19, 2012, 03:32:40 PM »

@cyberXaos: Try writing directly the absolute path
« Last Edit: November 19, 2012, 03:51:26 PM by visual.bermarte » Logged
cyberxaos
Forums Newbie
*
Posts: 4



WWW
« Reply #5 on: November 19, 2012, 04:47:42 PM »

@cyberXaos: Try writing directly the absolute path

It doesn't make any difference.  Same error message.
Logged
cyberxaos
Forums Newbie
*
Posts: 4



WWW
« Reply #6 on: December 05, 2012, 12:05:05 AM »

All the texture examples I tried were attempting to load jpgs.  It turns out that png and hdr load fine, but jpg, for some reason, will not.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Using a network to share CPU animation load? Other / General Discussion tomot 1 2783 Last post December 28, 2012, 01:18:43 AM
by Catelee2u
Load M3D formulas or parametars in Mandlebulber Mandelbulber nikola108 5 2673 Last post March 30, 2011, 06:57:18 PM
by Buddhi
failed db move... Fractal Forums News cKleinhuis 12 2802 Last post August 01, 2011, 06:52:10 PM
by cKleinhuis
Failed DE over 2900 % - what am I doing wrong Mandelbulber darksky 6 2471 Last post September 23, 2011, 05:22:04 PM
by Buddhi
how do i load parameter files Mandelbulb 3d igfractal 1 3833 Last post July 02, 2013, 11:43:21 AM
by Sockratease

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.172 seconds with 26 queries. (Pretty URLs adds 0.008s, 2q)