Crystal Space
Welcome, Guest. Please login or register.
November 27, 2014, 09:53:50 pm

Login with username, password and session length
Search:     Advanced search
9026 Posts in 2046 Topics by 9147 Members
Latest Member: Nikitaen
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Game Content Creation
| | |-+  How to fit a texture
« previous next »
Pages: [1] Print
Author Topic: How to fit a texture  (Read 5454 times)
MaryCon
Guest


Email
« on: July 25, 2005, 09:14:04 am »

Hi! I've got a level defined using CS XML format and i would like to know how can i do to fit a texture in a region i'd defined. I think that i should use <texlen> tag but i can't fit the image ok, can someone tell me how to do it??
Thanks
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: July 25, 2005, 09:15:15 am »

Hi! I've got a level defined using CS XML format and i would like to know how can i do to fit a texture in a region i'd defined. I think that i should use <texlen> tag but i can't fit the image ok, can someone tell me how to do it??
Thanks

Is the polygon on which you want to map the image a square?

Greetings,
Logged
MaryCon
Guest


Email
« Reply #2 on: July 25, 2005, 09:59:10 am »

No, it's a rectangle although the texture is a 1024*1024 image
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #3 on: July 25, 2005, 10:07:55 am »

No, it's a rectangle although the texture is a 1024*1024 image

I think you can use <firstlen> and <secondline> instead of <texlen> like this:

<firstlen>3</firstlen>
<secondlen>5</secondlen>

With 3 the dimension of the rectangle in world units for u coordinate and
5 the dimension of the rectangle in world units for v coordinate. Try if that works.

Greetings,
Logged
MaryCon
Guest


Email
« Reply #4 on: July 25, 2005, 10:27:18 am »

This is the code i use:
<material>ventana_ayunt_01</material>
                <textlen>1</texlen>
      <firstlen>3</firstlen>
      <secondlen>5</secondlen>
      <p name="dcha_suelo5_09">
         <v>53</v><v>52</v><v>44</v><v>45</v>
      </p>

and when i try to load the map i get this error:

       crystalspace.syntax.badtoken:  Unexpected token 'firstlen'!
       [node: world,meshfact(name=walls),params,firstlen]
       ALERT: crystalspace.syntax.badtoken:  Unexpected token 'firstlen'!
       [node: world,meshfact(name=walls),params,firstlen]

where should i put this lines?
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #5 on: July 27, 2005, 11:27:48 am »

This is the code i use:
<material>ventana_ayunt_01</material>
                <textlen>1</texlen>
      <firstlen>3</firstlen>
      <secondlen>5</secondlen>
      <p name="dcha_suelo5_09">
         <v>53</v><v>52</v><v>44</v><v>45</v>
      </p>

and when i try to load the map i get this error:

       crystalspace.syntax.badtoken:  Unexpected token 'firstlen'!
       [node: world,meshfact(name=walls),params,firstlen]
       ALERT: crystalspace.syntax.badtoken:  Unexpected token 'firstlen'!
       [node: world,meshfact(name=walls),params,firstlen]

where should i put this lines?

Put them inside a <texmap>

Greetings,
Logged
Sergnov
Newbie
*
Posts: 2


View Profile WWW Email
« Reply #6 on: June 27, 2013, 10:04:17 am »

Thanks jorrit , your answer help me too.
Logged
Mariashawn
Newbie
*
Posts: 1


View Profile Email
« Reply #7 on: September 11, 2013, 10:16:18 am »

Nice 3D alien Game design i like this game Smiley

__________________
Download braindumps questions and answers with self paced tibco certification dumps practice test to successfully complete ARM certification.For more details visit now Rockefeller University and wikipedia best wishes.
« Last Edit: August 04, 2014, 11:55:26 am by Mariashawn » Logged
Tetak18
Newbie
*
Posts: 1


View Profile Email
« Reply #8 on: October 25, 2013, 09:32:48 am »

I was looking for something like this. Great

Thank you Smiley
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 6.333 seconds with 16 queries.