Crystal Space
Welcome, Guest. Please login or register.
October 25, 2014, 08:30:03 am

Login with username, password and session length
Search:     Advanced search
9011 Posts in 2044 Topics by 8822 Members
Latest Member: Mandrilmar
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Game Content Creation
| | |-+  some question about how to use texture and light in blender ?
« previous next »
Pages: [1] Print
Author Topic: some question about how to use texture and light in blender ?  (Read 5795 times)
Jr. Member
**
Posts: 81


View Profile Email
« on: October 30, 2007, 03:55:30 pm »

 Hi, I am new in CS and Blender.
        Over the last days, I followed the "Portal tutorial" to create a portal in CS. And when i ran the model I see nothing in the window. Then i created a lot of lamps in the model. But i still see nothing. I don't know why! Is lamp are also handled in different way in blender than in crystalspace?!         
        And another problem is that in "General Overview" and "Overlay Interface", it said "Materials are handled in a very different way in blender than in crystalspace. Because of this, a special material tab exists in blender2crystal to set crystalspace related material properties." But in the documents they gave little information about how to use "material tab".       
        Can you tell me where i can get more information about how to use lights and material in blender2crystal?
       
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: October 30, 2007, 03:58:41 pm »

You say you see nothing. But did you add a camera to your scene and is it located at a spot where you can see stuff?

Greetings,
Logged
Jr. Member
**
Posts: 81


View Profile Email
« Reply #2 on: October 31, 2007, 02:48:14 am »

You say you see nothing. But did you add a camera to your scene and is it located at a spot where you can see stuff?

Greetings,

       At the first time I followed the "Portal tutorial", and i could only see the model outside(I didn't use any material in the model, because materials are handled in a very different way in blender than in crystalspace)
      then i took the camera inside the model, but i could still see the model outside(there is only one camera in the model). I don't know why?! Then in the tutorial i found that i could use shift+ctrl+N to invert to look inside. Then i tried, and i still see nothing. I guess that maybe there is no light inside the room, so i can't see anything. After that, i created a lot of lamps inside the room, but i still see nothing. I don't know why!
      And I query the tutorial of "First steps with blender2crystal", in the part of "If all you see is black", it says that "If all you see is black
Check the normals from objects are pointing the correct way, if you made a cube surrounding the player this usually means you need to reverse its normals (in blender buttons window, at the edit tab). " But i don't know the real meaning about the sentence.
      Thank you very much for your help!!!
Logged
Jr. Member
**
Posts: 81


View Profile Email
« Reply #3 on: October 31, 2007, 04:05:01 am »

You say you see nothing. But did you add a camera to your scene and is it located at a spot where you can see stuff?

Greetings,


the export code of the model is below

<?xml version='1.0' encoding='UTF-8'?>
<world>
  <plugins>
    <plugin name='genmesh'>crystalspace.mesh.loader.genmesh</plugin>
    <plugin name='genmeshfact'>crystalspace.mesh.loader.factory.genmesh</plugin>
  </plugins>
  <shaders/>
  <textures>
    <texture name='oldbrickDOT3.png'>
      <file>/lib/stdtex/oldbrickDOT3.png</file>
    </texture>
    <texture name='colors.jpg'>
      <file>/lib/stdtex/colors.jpg</file>
    </texture>
  </textures>
  <materials/>
  <sounds/>
  <settings>
    <clearscreen>yes</clearscreen>
    <clearzbuf>yes</clearzbuf>
  </settings>
  <library>factories/genCube.001</library>
  <library>factories/genCube.004</library>
  <library>factories/genCube.008</library>
  <triggers/>
  <sector name='Scene'>
    <portals name='Mesh'>
      <portal>
        <v y='-2.52000021935' x='-9.95999908447' z='2.4799990654'/>
        <v y='-5.04000043869' x='-9.95999908447' z='2.47999978065'/>
        <v y='-5.04000043869' x='-9.95999908447' z='5.0'/>
        <v y='-2.52000021935' x='-9.95999908447' z='4.99999952316'/>
        <sector>Scene.001</sector>
      </portal>
      <priority>portal</priority>
      <hardmove>
        <v y='0' x='0' z='0'/>
        <matrix/>
      </hardmove>
    </portals>
    <cullerp plugin='crystalspace.culling.frustvis'/>
    <light name='Lamp.003'>
      <center y='-2.42516' x='-13.4606' z='2.0713'/>
      <color blue='1.0' green='1.0' red='1.0'/>
      <radius brightness='1.0'>29.9999828339</radius>
    </light>
    <meshobj name='Cube'>
      <plugin>genmesh</plugin>
      <params>
        <factory>genCube.001</factory>
        <material>colors.jpg</material>
      </params>
      <zuse/>
      <move>
        <v y='0' x='0' z='0'/>
      </move>
    </meshobj>
    <light name='Lamp'>
      <center y='2.23661' x='-13.4606' z='6.79522'/>
      <color blue='1.0' green='1.0' red='1.0'/>
      <radius brightness='1.0'>29.9999828339</radius>
    </light>
  </sector>
  <sector name='Scene.001'>
    <portals name='Cube.001'>
      <portal>
        <v y='-5.04000043869' x='-9.95999908447' z='2.47999978065'/>
        <v y='-2.52000021935' x='-9.95999908447' z='2.4799990654'/>
        <v y='-2.52000021935' x='-9.95999908447' z='4.99999952316'/>
        <v y='-5.04000043869' x='-9.95999908447' z='5.0'/>
        <sector>Scene</sector>
        <clipstraddling/>
      </portal>
      <priority>portal</priority>
      <hardmove>
        <v y='0' x='0' z='0'/>
        <matrix/>
      </hardmove>
    </portals>
    <portals name='Cube.002'>
      <portal>
        <v y='-5.04000043869' x='-4.95999908447' z='2.47999978065'/>
        <v y='-5.04000043869' x='-4.95999908447' z='5.0'/>
        <v y='-2.52000021935' x='-4.95999908447' z='4.99999952316'/>
        <v y='-2.52000021935' x='-4.95999908447' z='2.4799990654'/>
        <sector>Scene.002</sector>
        <clipstraddling/>
      </portal>
      <priority>portal</priority>
      <hardmove>
        <v y='0' x='0' z='0'/>
        <matrix/>
      </hardmove>
    </portals>
    <cullerp plugin='crystalspace.culling.frustvis'/>
    <meshobj name='Cube.003'>
      <plugin>genmesh</plugin>
      <params>
        <factory>genCube.004</factory>
        <material>oldbrickDOT3.png</material>
      </params>
      <zuse/>
      <move>
        <v y='0' x='0' z='0'/>
      </move>
    </meshobj>
    <light name='Lamp.001'>
      <center y='-4.16555' x='-6.86073' z='3.61185'/>
      <color blue='1.0' green='1.0' red='1.0'/>
      <radius brightness='1.0'>29.9999828339</radius>
    </light>
  </sector>
  <sector name='Scene.002'>
    <portals name='Mesh.001'>
      <portal>
        <v y='-5.04000043869' x='-4.95999908447' z='5.0'/>
        <v y='-5.04000043869' x='-4.95999908447' z='2.47999978065'/>
        <v y='-2.52000021935' x='-4.95999908447' z='2.4799990654'/>
        <v y='-2.52000021935' x='-4.95999908447' z='4.99999952316'/>
        <sector>Scene.001</sector>
      </portal>
      <priority>portal</priority>
      <hardmove>
        <v y='0' x='0' z='0'/>
        <matrix/>
      </hardmove>
    </portals>
    <cullerp plugin='crystalspace.culling.frustvis'/>
    <light name='Lamp.004'>
      <center y='1.55288' x='-2.99508' z='2.45526'/>
      <color blue='1.0' green='1.0' red='1.0'/>
      <radius brightness='1.0'>29.9999828339</radius>
    </light>
    <meshobj name='Cube.007'>
      <plugin>genmesh</plugin>
      <params>
        <factory>genCube.008</factory>
        <material>colors.jpg</material>
      </params>
      <zuse/>
      <move>
        <v y='0' x='15' z='0'/>
      </move>
    </meshobj>
    <light name='Lamp.002'>
      <center y='1.55288' x='2.00199' z='6.22663'/>
      <color blue='1.0' green='1.0' red='1.0'/>
      <radius brightness='1.0'>29.9999828339</radius>
    </light>
  </sector>
  <sequences/>
  <start name='Camera'>
    <sector>Scene</sector>
    <position y='5.34367' x='7.48113' z='-6.50764'/>
    <up y='0.895343' x='-0.330657' z='0.298373'/>
    <forward y='-0.445245' x='-0.654862' z='0.610666'/>
  </start>
  <start name='Camera.001'>
    <sector>Scene.001</sector>
    <position y='5.34367' x='7.48113' z='-6.50764'/>
    <up y='0.895343' x='-0.330657' z='0.298373'/>
    <forward y='-0.445245' x='-0.654862' z='0.610666'/>
  </start>
  <start name='Camera.002'>
    <sector>Scene.002</sector>
    <position y='5.34367' x='7.48113' z='-6.50764'/>
    <up y='0.895343' x='-0.330657' z='0.298373'/>
    <forward y='-0.445245' x='-0.654862' z='0.610666'/>
  </start>
</world>
Logged
shangobah@users.sourceforge.net
Newbie
*
Posts: 5


View Profile Email
« Reply #4 on: September 04, 2008, 05:04:14 am »

If you have your basic scene set up correctly then make sure you have relight set on the blender export settings.  If all your lights are non-dynamic and you have not ran relight then the lightmaps will not have been generated.  The first time you run a map with static lights you should always use the -relight option.  You can tell if light maps were generated by opening the world archive.  A cache folder will be added to the world zip archive if light mapping has been performed.  If there is no cache folder after you run the program then that means you need to run the program with the -relight option

If your scene is set up correctly, and you do have cached lightmaps then it is possible that the way your environment is scaled the lights arent actually reaching your objects.  To test this take one or all of your lights and change the distance paramater (under the blender light settings) to something bigger, like 1000.  You can simulate a single global light source, like a sun light in blender by placing that light and giving it a huge distance.  This should reach all of your meshes.  You will have to run the program with -relight each time you change you static light settings I believe in order for the lightmaps to update.  This will cause the app to load slower on the first run, but subsequent executions without relight will run faster because the light maps are cached and don't need to be regenerated.
« Last Edit: September 04, 2008, 05:10:01 am by shangobah@users.sourceforge.net » 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 9.297 seconds with 17 queries.